/* Pocket Royale - Custom Styles */

/* ===== GLOBAL ANIMATIONS ===== */

/* Hero background pattern */
.hero-bg {
  background-image: url('../assets/images/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Text shadow for hero */
.text-shadow-hero {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Logo pulse animation */
.logo-pulse {
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(26, 123, 212, 0.3)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 0 40px rgba(232, 168, 33, 0.5)); }
}

/* Float animations for hero characters */
.float-animation {
  animation: floatUp 4s ease-in-out infinite;
}

.float-animation-delayed {
  animation: floatUp 4s ease-in-out 2s infinite;
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ===== NAVIGATION ===== */

.nav-scrolled {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Nav link hover with underline sweep */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #E8A821, #1A7BD4);
  transition: width 0.3s ease, left 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

.nav-link:hover {
  text-shadow: 0 0 12px rgba(232, 168, 33, 0.4);
}

/* Contact CTA button in nav */
.nav-cta {
  background: linear-gradient(135deg, #E8A821, #D4961A);
  color: #1A1A2E !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.nav-cta:hover::before {
  transform: translateX(100%);
}

.nav-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(232, 168, 33, 0.4);
  text-shadow: none;
}

.nav-cta::after {
  display: none;
}

/* ===== BUTTONS ===== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #E8A821, #D4961A);
  color: #1A1A2E;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(232, 168, 33, 0.4), 0 0 15px rgba(232, 168, 33, 0.2);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(232, 168, 33, 0.3);
}

/* Secondary button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: rgba(26, 123, 212, 0.15);
  color: #1A7BD4;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.75rem;
  border: 1px solid rgba(26, 123, 212, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-secondary:hover {
  background: rgba(26, 123, 212, 0.25);
  border-color: #1A7BD4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 123, 212, 0.2);
}

/* Store badge hover glow */
.store-badge {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.store-badge:hover {
  transform: scale(1.08) translateY(-3px);
}

.store-badge:hover img {
  filter: drop-shadow(0 0 20px rgba(232, 168, 33, 0.5));
}

/* ===== CARDS ===== */

/* Feature cards entrance animation */
.feature-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
  animation: forceVisible 0s 4s forwards;
}

.feature-card.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.feature-card:hover .feature-icon {
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.2) rotate(-5deg); }
  60% { transform: scale(1.1) rotate(3deg); }
}

/* Character cards entrance */
.character-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.character-card.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.character-card:hover {
  box-shadow: 0 12px 40px rgba(232, 168, 33, 0.15);
}

/* Safety net: if JS hasn't applied .visible within 4s, show cards anyway */
@keyframes forceVisible {
  to { opacity: 1; transform: translateY(0); }
}

.character-card {
  animation: forceVisible 0s 4s forwards;
}

/* Blog cards */
.blog-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.blog-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.blog-card:hover .blog-tag {
  background: #E8A821;
  color: #1A1A2E;
}

/* ===== SECTION TITLE ANIMATIONS ===== */

.section-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gold text shimmer */
.shimmer-gold {
  background: linear-gradient(90deg, #E8A821, #ffd700, #E8A821);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ===== LEADERBOARD ===== */

.leaderboard-row {
  transition: all 0.3s ease;
}

.leaderboard-row:hover {
  background: rgba(26, 123, 212, 0.1);
  transform: scale(1.01);
}

.rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.rank-1 { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #1A1A2E; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #1A1A2E; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #b06c28); color: #1A1A2E; }

/* ===== PATCH NOTES ===== */

.patch-card {
  position: relative;
}

.patch-card::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1A7BD4;
  border: 2px solid #1A1A2E;
  box-shadow: 0 0 10px rgba(26, 123, 212, 0.5);
}

.patch-timeline {
  border-left: 2px solid rgba(26, 123, 212, 0.3);
  padding-left: 20px;
}

/* ===== SUGGESTION FORM ===== */

.suggestion-card {
  transition: border-color 0.3s;
}

.suggestion-card:hover {
  border-color: rgba(232, 168, 33, 0.3);
}

/* Upvote button */
.upvote-btn {
  transition: all 0.2s;
}

.upvote-btn:hover {
  transform: scale(1.15);
  color: #E8A821;
}

.upvote-btn.active {
  color: #E8A821;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===== PARTICLE CANVAS ===== */

#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.4;
}

/* ===== SCROLLBAR ===== */

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ===== PAGE TEMPLATES ===== */

.page-header {
  background: linear-gradient(135deg, #1A7BD4 0%, #1562A8 100%);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/background.png');
  background-size: cover;
  opacity: 0.15;
}

.page-content {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.page-content h2 {
  font-family: 'Bangers', cursive;
  font-size: 1.75rem;
  color: #E8A821;
  letter-spacing: 0.05em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.page-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page-content p,
.page-content li {
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.page-content ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.page-content a {
  color: #1A7BD4;
  text-decoration: underline;
}

.page-content a:hover {
  color: #E8A821;
}

/* ===== FORM STYLES ===== */

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  color: #ffffff;
  font-size: 0.875rem;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  outline: none;
}

.form-input:focus {
  border-color: #1A7BD4;
  box-shadow: 0 0 0 3px rgba(26, 123, 212, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ===== GLOBAL ===== */

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(26, 123, 212, 0.4);
  color: white;
}

/* Tilt on hover for interactive elements */
@media (hover: hover) {
  .tilt-hover {
    transition: transform 0.3s ease;
  }
  .tilt-hover:hover {
    transform: perspective(800px) rotateY(-2deg) rotateX(2deg) scale(1.02);
  }
}

/* Fade-up animation class for JS */
.fade-up {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.0s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* Count-up number animation */
.count-up {
  font-variant-numeric: tabular-nums;
}
