.section-game-guide {
  position: relative;
  overflow-x: hidden;
  overflow-y: visible; /* ✅ */
  padding: var(--spacing-3xl) var(--spacing-xl);
}

/* Background with gradient overlays */
.section-game-guide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(0, 217, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 80%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-bg-deep) 0%, var(--color-bg-dark) 100%);
  z-index: 0;
}

.game-guide-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
   margin-top: -120px;
}

/* Section Header */
.guide-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--color-gold);
  text-align: center;
  text-shadow: 0 0 30px var(--glow-gold);
  margin-bottom: var(--spacing-sm);
}

.guide-subtitle {
  font-size: 1rem;
  text-align: center;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-2xl);
}

/* Game Features Grid */
.game-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-3xl);
}

.game-feature {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: rgba(16, 16, 16, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--easing-out);
}

/* Shine effect on hover (PRESERVED) */
.game-feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  transition: left 0.5s var(--easing-out);
}

.game-feature:hover::before {
  left: 100%;
}

.game-feature:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 20px var(--glow-gold);
}

/* Feature Icon (PRESERVED bounce animation on hover) */
.feature-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  transition: all var(--duration-normal) var(--easing-out);
}

.game-feature:hover .feature-icon {
  transform: scale(1.1) rotate(10deg);
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.feature-content h3 {
  color: var(--color-gold);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.feature-content p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/*HOW TO PLAY SECTION */
.howto-container {
  width: 100%;
  max-width: 1200px;
  margin: var(--spacing-3xl) auto 0;
}

.howto-image {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin-bottom: var(--spacing-3xl);
  cursor: pointer;
}

.howto-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradient overlay on image */
.howto-image .image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8));
  transition: background var(--duration-normal) ease;
  z-index: 1;
}

/* How to Play Title */
.howto-title {
  position: absolute;
  bottom: 30px;
  left: 40px;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--color-gold);
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Play Button Overlay (PRESERVED) */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: all var(--duration-normal) ease;
  z-index: 3;
}

.howto-image:hover .play-overlay {
  opacity: 1;
}

/* Play Button Circle (PRESERVED with pulse animation) */
.play-btn-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-ring 2s ease-out infinite;
  box-shadow: 0 0 30px var(--glow-gold);
}

.play-btn-circle i {
  font-size: 2.5rem;
  color: var(--color-bg-dark);
}

.play-text {
  margin-top: var(--spacing-lg);
  font-size: 1.1rem;
  color: var(--color-text-primary);
  font-weight: 600;
}

/* Pulse ring animation */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 var(--glow-gold);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

/* How to Play Text Section */
.howto-text {
  padding: 0 var(--spacing-xl);
}

.section-subtitle {
  color: var(--color-gold);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: var(--spacing-lg);
  text-transform: uppercase;
  font-weight: 700;
}

/* How to Play Steps Grid */
.howto-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
}

.step {
  display: flex;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  background: rgba(16, 16, 16, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.15);
  transition: all var(--duration-normal) var(--easing-out);
}

.step:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
  transform: translateY(-5px);
}

.step-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--color-gold);
  flex-shrink: 0;
}

.step-content h3 {
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
  font-size: 1.2rem;
  font-weight: 700;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  opacity: 0.85;
}

/* VIDEO MODAL STYLES (PRESERVED) */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
}

.video-modal.active {
  display: flex;
  opacity: 1;
}

.video-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.video-modal-container {
  position: relative;
  z-index: 2001;
  width: 90%;
  max-width: 1000px;
  background: var(--color-bg-elevated);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
}

.video-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--color-gold);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--spacing-sm);
  transition: all var(--duration-normal) ease;
  z-index: 2002;
}

.video-close-btn:hover {
  transform: rotate(90deg);
  color: var(--color-gold-light);
}

.video-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--color-gold);
}

.video-header i {
  font-size: 1.5rem;
}

.video-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.video-wrapper {
  flex: 1;
  padding: var(--spacing-lg);
}

.video-wrapper video {
  width: 100%;
  height: auto;
  max-height: 500px;
  border-radius: var(--radius-md);
}

.video-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  text-align: center;
  color: var(--color-text-secondary);
}

@media (max-width: 1024px) {
  .game-features-grid {
    grid-template-columns: 1fr;
  }

  .howto-image {
    height: 250px;
  }

  .howto-title {
    font-size: 2rem;
    bottom: 20px;
    left: 20px;
  }
}

@media (max-width: 768px) {
  .game-features-grid {
    gap: var(--spacing-md);
  }

  .howto-image {
    height: 200px;
    margin-bottom: var(--spacing-xl);
  }

  .howto-title {
    font-size: 1.5rem;
    bottom: 15px;
    left: 15px;
  }

  .howto-text {
    padding: 0 var(--spacing-lg);
  }

  .howto-steps {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .step {
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }

  .video-modal-container {
    width: 95%;
    max-height: 80vh;
  }
}

@media (max-width: 480px) {
  .game-guide-content {
    padding: 0 var(--spacing-md);
  }

  .howto-image {
    height: 150px;
    margin-bottom: var(--spacing-lg);
  }

  .howto-title {
    font-size: 1.2rem;
    bottom: 10px;
    left: 10px;
    letter-spacing: 2px;
  }

  .play-btn-circle {
    width: 70px;
    height: 70px;
  }

  .play-btn-circle i {
    font-size: 1.8rem;
  }

  .play-text {
    font-size: 0.95rem;
  }

  .howto-text {
    padding: 0;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .howto-steps {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .step-number {
    font-size: 1.8rem;
  }

  .step-content h3 {
    font-size: 1rem;
  }

  .video-modal-container {
    border-radius: var(--radius-lg);
  }

  .video-header,
  .video-wrapper,
  .video-footer {
    padding: var(--spacing-md);
  }
}

/* ============================================================
   GAME GUIDE — SCROLL ANIMATION ADDITIONS
   ============================================================ */

/* ── SECTION BASE ───────────────────────────────────────────── */
.section-game-guide::before {
  opacity: 0;
  transition: opacity 1.4s ease 0.1s;
}

.section-game-guide.is-visible::before {
  opacity: 1;
}

/* ── HEADER — guide-title hidden base ───────────────────────── */
.guide-title {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition:
    opacity   0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.guide-subtitle {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity   0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: 0.18s;
}

/* ── TITLE GLOW PULSE — loops after enter ───────────────────── */
.section-game-guide.is-visible .guide-title {
  animation: guideTitleGlow 3.5s ease-in-out infinite;
  animation-delay: 1.1s;
}

@keyframes guideTitleGlow {
  0%, 100% {
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
  }
  50% {
    text-shadow:
      0 0 60px rgba(212, 175, 55, 0.8),
      0 0 120px rgba(212, 175, 55, 0.2);
  }
}

/* ── GAME FEATURES GRID — wrapper fade ──────────────────────── */
.game-features-grid {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity   0.6s ease 0.2s,
    transform 0.6s ease 0.2s;
}

.section-game-guide.is-visible .game-features-grid {
  opacity: 1;
  transform: translateY(0);
}

/* ── GAME FEATURE — hidden base (alternating left/right) ─────── */
.game-feature {
  opacity: 0;
  transition:
    opacity        0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform      0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color   var(--duration-normal) var(--easing-out),
    box-shadow     var(--duration-normal) var(--easing-out);
  will-change: transform, opacity;
}

/* Alternate: even cards from left, odd from right */
.game-feature:nth-child(odd)  { transform: translateX(-50px) scale(0.95); }
.game-feature:nth-child(even) { transform: translateX( 50px) scale(0.95); }

/* ── FEATURE ENTERED ────────────────────────────────────────── */
.game-feature.feat-entered {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* ── FEATURE ICON — spin-in on enter ───────────────────────── */
.feature-icon {
  opacity: 0;
  transform: scale(0) rotate(-120deg);
  transition:
    opacity   0.5s ease,
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    background var(--duration-normal) var(--easing-out),
    border-color var(--duration-normal) var(--easing-out);
}

.game-feature.feat-entered .feature-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition-delay: 0.18s;
}

/* ── FEATURE CONTENT — slide up on enter ───────────────────── */
.feature-content h3,
.feature-content p {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity   0.5s ease,
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.game-feature.feat-entered .feature-content h3 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}

.game-feature.feat-entered .feature-content p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}

/* ── FEATURE BORDER GLOW FLASH ON ENTER ─────────────────────── */
@keyframes featureFlashGold {
  0%   { box-shadow: 0 0 0px rgba(212, 175, 55, 0);   }
  35%  { box-shadow: 0 0 30px rgba(212, 175, 55, 0.6),
                     0 0 60px rgba(212, 175, 55, 0.15); }
  100% { box-shadow: 0 0 0px rgba(212, 175, 55, 0);   }
}

@keyframes featureFlashTeal {
  0%   { box-shadow: 0 0 0px rgba(0, 217, 255, 0);   }
  35%  { box-shadow: 0 0 30px rgba(0, 217, 255, 0.5),
                     0 0 60px rgba(0, 217, 255, 0.12); }
  100% { box-shadow: 0 0 0px rgba(0, 217, 255, 0);   }
}

.game-feature.flash-gold { animation: featureFlashGold 1.1s ease forwards; }
.game-feature.flash-teal { animation: featureFlashTeal 1.1s ease forwards; }

/* ── HOWTO IMAGE BANNER — fade + scale up ───────────────────── */
.howto-image {
  opacity: 0;
  transform: scale(0.96) translateY(30px);
  transition:
    opacity   0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.howto-image.img-entered {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ── HOWTO TITLE — slides up from image ─────────────────────── */
.howto-title {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity   0.6s ease,
    transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.howto-image.img-entered .howto-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}

/* ── SECTION SUBTITLE (HOW TO PLAY) ─────────────────────────── */
.section-subtitle {
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity   0.6s ease,
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-subtitle.sub-entered {
  opacity: 1;
  transform: translateX(0);
}

/* ── STEPS — hidden base ────────────────────────────────────── */
.step {
  opacity: 0;
  transform: translateY(45px) scale(0.94);
  transition:
    opacity        0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform      0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color   var(--duration-normal) var(--easing-out),
    box-shadow     var(--duration-normal) var(--easing-out);
  will-change: transform, opacity;
}

/* ── STEP ENTERED ───────────────────────────────────────────── */
.step.step-entered {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── STEP NUMBER GLOW FLASH ON ENTER ────────────────────────── */
@keyframes stepNumberGlow {
  0%   { text-shadow: none; }
  40%  { text-shadow: 0 0 20px rgba(212, 175, 55, 0.9),
                      0 0 40px rgba(212, 175, 55, 0.3); }
  100% { text-shadow: none; }
}

.step.step-entered .step-number {
  animation: stepNumberGlow 1s ease forwards;
  animation-delay: 0.2s;
}

/* ── STEP CONTENT FADE ──────────────────────────────────────── */
.step-content h3,
.step-content p {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity   0.45s ease,
    transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.step.step-entered .step-content h3 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.22s;
}

.step.step-entered .step-content p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.33s;
}

/* ── STEP BORDER FLASH ──────────────────────────────────────── */
@keyframes stepFlash {
  0%   { border-color: rgba(212, 175, 55, 0.7);
         box-shadow:   0 0 20px rgba(212, 175, 55, 0.4); }
  100% { border-color: rgba(212, 175, 55, 0.15);
         box-shadow:   none; }
}

.step.step-entered { animation: stepFlash 1.2s ease forwards; }

/* ── HOWTO CONTAINER — wrapper fade ─────────────────────────── */
.howto-container {
  opacity: 0;
  transform: translateY(15px);
  transition:
    opacity   0.6s ease 0.1s,
    transform 0.6s ease 0.1s;
}

.section-game-guide.is-visible .howto-container {
  opacity: 1;
  transform: translateY(0);
}

/* ── SECTION EXIT — dims when scrolled past ─────────────────── */
.section-game-guide.section-exit .guide-title,
.section-game-guide.section-exit .guide-subtitle {
  opacity: 0.3;
  transition: opacity 0.5s ease;
}

.section-game-guide.section-exit .game-feature.feat-entered,
.section-game-guide.section-exit .step.step-entered {
  opacity: 0.35;
  transition: opacity 0.5s ease;
}

.section-game-guide.section-exit .howto-image.img-entered {
  opacity: 0.4;
  transition: opacity 0.5s ease;
}

/* ── REDUCED MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .section-game-guide::before,
  .guide-title,
  .guide-subtitle,
  .game-features-grid,
  .game-feature,
  .feature-icon,
  .feature-content h3,
  .feature-content p,
  .howto-image,
  .howto-title,
  .section-subtitle,
  .step,
  .step-content h3,
  .step-content p,
  .howto-container {
    transition:  none !important;
    animation:   none !important;
    opacity:     1    !important;
    transform:   none !important;
  }
}