/* ==========================================================================
   FRUIT BLAST - 2026 ULTRA-MODERN NATURE DESIGN SYSTEM & CSS ENGINE
   ========================================================================== */

:root {
  /* 2026 Nature Color System */
  --color-primary: #84cc16;
  --color-primary-dark: #4d7c0f;
  --color-secondary: #f59e0b;
  --color-accent-blue: #3b82f6;
  --color-accent-purple: #a855f7;
  --color-accent-red: #ef4444;

  --wood-border: #a16207;
  --wood-gold-stroke: #fde047;
  --wood-dark-shadow: #291002;

  --font-heading: 'Fredoka One', cursive, sans-serif;
  --font-body: 'Outfit', sans-serif;

  --spring-easing: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* GLOBAL RESET & BASE STYLES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #022c22;
  font-family: var(--font-body);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ACCESSIBILITY & SEO CRAWLER UTILITY (W3C Modern Standard) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 2026 RESPONSIVE APP CONTAINER */
#app-container {
  position: relative;
  width: var(--app-w, 100vw);
  max-width: var(--app-w, 480px);
  height: var(--app-h, 100dvh);
  max-height: var(--app-h, 100%);
  background: url('assets/ui/bg_nature.png') center/cover no-repeat;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(132, 204, 22, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: clamp(0px, 2vw, 24px);
  transition: width 0.2s ease, max-width 0.2s ease, height 0.2s ease;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 5;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
}

.hidden,
.modal-overlay.hidden,
.screen.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* 3D SPRING POP ANIMATION FOR MODALS & TOASTS */
.animate-pop {
  animation: animatePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes animatePop {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(16px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================================================
   0. CINEMATIC 3D GAMING PRELOADER / SPLASH SCREEN
   ========================================================================== */
.splash-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #032b14 0%, #01150a 65%, #000a04 100%);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-sizing: border-box;
}

.splash-screen.splash-exit {
  opacity: 0 !important;
  transform: scale(1.05) !important;
  pointer-events: none !important;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(92%, 460px);
  padding: clamp(16px, 3vh, 32px) clamp(16px, 3vw, 24px);
  text-align: center;
  gap: clamp(12px, 2.2vh, 22px);
  box-sizing: border-box;
}

.splash-logo-box {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.splash-ambient-glow {
  position: absolute;
  width: clamp(200px, 60vw, 300px);
  height: clamp(120px, 30vh, 180px);
  background: radial-gradient(ellipse at center, rgba(74, 222, 128, 0.35) 0%, rgba(250, 204, 21, 0.15) 50%, transparent 75%);
  border-radius: 50%;
  filter: blur(20px);
  animation: ambientPulse 3s ease-in-out infinite;
  pointer-events: none;
}

.splash-logo-img {
  width: min(320px, 85%);
  max-height: clamp(90px, 22vh, 160px);
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.9)) drop-shadow(0 0 35px rgba(74,222,128,0.5));
  animation: logoFloat 3.5s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.splash-tagline {
  font-family: var(--font-heading);
  font-size: clamp(10px, 1.2vw, 13px);
  font-weight: 900;
  letter-spacing: clamp(3px, 0.5vw, 6px);
  color: #fde047;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
  white-space: nowrap;
}

.splash-progress-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.6) 0%, rgba(5, 46, 22, 0.8) 100%);
  border: 2px solid rgba(74, 222, 128, 0.3);
  border-radius: 20px;
  padding: clamp(12px, 1.8vh, 18px) clamp(14px, 3vw, 20px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.15);
  backdrop-filter: blur(var(--glass-blur, 12px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 12px));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.splash-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-family: var(--font-heading);
}

.splash-status-text {
  font-size: clamp(11px, 1.1vw, 13px);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 78%;
}

.splash-percent {
  font-size: clamp(13px, 1.3vw, 16px);
  color: #4ade80;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
}

.splash-track-wood {
  position: relative;
  width: 100%;
  height: 18px;
  background: #0f172a;
  border-radius: 12px;
  border: 2px solid #a16207;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.8);
  overflow: visible;
  padding: 2px;
  box-sizing: border-box;
}

.splash-fill-emerald {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #15803d, #22c55e, #86efac, #fde047);
  border-radius: 8px;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.8);
}

.splash-runner-mascot {
  position: absolute;
  right: -12px;
  top: -11px;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.8));
  animation: runnerBob 0.6s infinite alternate ease-in-out;
}

@keyframes runnerBob {
  0% { transform: translateY(0) scale(1) rotate(-5deg); }
  100% { transform: translateY(-4px) scale(1.1) rotate(5deg); }
}

.splash-footer-pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

.splash-pill {
  font-family: var(--font-heading);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 12px;
}

/* 1. TOP GLOBAL BAR (LIVES & COINS) */
#global-bar {
  position: absolute;
  top: clamp(10px, 2vh, 18px);
  left: clamp(10px, 3vw, 18px);
  right: clamp(10px, 3vw, 18px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: auto;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
  border: 3px solid var(--wood-gold-stroke);
  border-radius: 25px;
  padding: 5px 16px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.6), inset 0 2px 0 rgba(255,255,255,0.4);
  font-family: var(--font-heading);
}

.stat-icon {
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.stat-val {
  font-size: 20px;
  color: #ffffff;
  text-shadow: 1px 2px 0 #000;
}

.stat-label {
  font-size: 12px;
  color: #4ade80;
  font-weight: bold;
}

.btn-plus {
  background: linear-gradient(180deg, #4ade80 0%, #15803d 100%);
  border: 2px solid #ffffff;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 0 #052e16;
  transition: transform 0.1s var(--spring-easing);
}

.btn-plus:active {
  transform: scale(0.9);
}

.top-quick-btns {
  display: flex;
  gap: 10px;
}

.icon-btn-sm {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, #60a5fa 0%, #1d4ed8 100%);
  border: 3px solid #ffffff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 0 #1e3a8a, 0 6px 12px rgba(0,0,0,0.5);
  transition: transform 0.15s var(--spring-easing);
}

.icon-btn-sm:active {
  transform: translateY(3px);
}

/* 2. START MENU SCREEN */
#screen-start {
  justify-content: center;
  padding: clamp(10px, 2vh, 16px);
  background: url('assets/ui/bg_nature.png') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.start-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: clamp(2px, 0.8vh, 8px);
  z-index: 10;
  padding: clamp(10px, 2.5vh, 24px) clamp(8px, 2.5vw, 16px) clamp(6px, 1.5vh, 14px);
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.game-logo-container {
  position: relative;
  margin-top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex: 0 1 auto;
}

.main-logo-img {
  width: clamp(150px, 48vw, 290px);
  max-height: clamp(65px, 16vh, 135px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.7));
}

.start-menu-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.2vh, 10px);
  width: 90%;
  max-width: 360px;
  margin: 0 auto;
  flex: 0 1 auto;
  justify-content: center;
}

.btn-pill-hero {
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(44px, 6.0vh, 56px) !important;
  font-size: clamp(20px, 5.2vw, 26px) !important;
  letter-spacing: 2px !important;
}

.start-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 1.2vw, 10px);
  width: 100%;
}

.start-menu-grid .btn-pill {
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(38px, 5.0vh, 48px);
  font-size: clamp(13px, 3.4vw, 16px);
  letter-spacing: 0.8px;
  padding: 0 4px;
}

/* 2026 ULTRA-VIBRANT 3D GLOSSY PILL BUTTONS */
.btn-pill {
  position: relative;
  width: 100%;
  height: clamp(38px, 5.0vh, 48px);
  border-radius: 40px;
  border: 3px solid #ffffff;
  font-family: var(--font-heading);
  font-size: clamp(13px, 3.4vw, 17px);
  letter-spacing: 1px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85), 0 4px 10px rgba(0, 0, 0, 0.6);
  box-shadow: 
    inset 0 3px 0 rgba(255, 255, 255, 0.65),
    inset 0 -3px 0 rgba(0, 0, 0, 0.35),
    0 4px 0 rgba(0, 0, 0, 0.45),
    0 6px 12px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s var(--spring-easing), box-shadow 0.12s ease;
  overflow: visible;
  box-sizing: border-box;
}

.btn-pill:active {
  transform: translateY(3px) scale(0.97);
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.5);
}

/* 1. PLAY - ULTRA-JUICY EMERALD & LIME GREEN */
.btn-pill-green {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 35%, #16a34a 70%, #15803d 100%);
  border-color: #dcfce7;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 6px 0 #14532d,
    0 12px 22px rgba(0, 0, 0, 0.7);
}

/* 2. ZEN MODE - VIVID TROPICAL TEAL & CYAN */
.btn-pill-teal {
  background: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 35%, #0d9488 70%, #0f766e 100%);
  border-color: #ccfbf1;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 6px 0 #134e4a,
    0 12px 22px rgba(0, 0, 0, 0.7);
}

/* 3. LEVELS - JUICY TANGELO SUNSET ORANGE */
.btn-pill-orange {
  background: linear-gradient(180deg, #fb923c 0%, #f97316 35%, #ea580c 70%, #c2410c 100%);
  border-color: #ffedd5;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 6px 0 #7c2d12,
    0 12px 22px rgba(0, 0, 0, 0.7);
}

/* 4. LUCKY SPIN - ELECTRIC CANDY MAGENTA / PINK */
.btn-pill-pink {
  background: linear-gradient(180deg, #fb7185 0%, #f43f5e 35%, #e11d48 70%, #be123c 100%);
  border-color: #ffe4e6;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 6px 0 #881337,
    0 12px 22px rgba(0, 0, 0, 0.7);
}

/* 5. QUESTS - ELECTRIC SKY BLUE & CYAN */
.btn-pill-cyan {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 35%, #0284c7 70%, #0369a1 100%);
  border-color: #e0f2fe;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 6px 0 #0c4a6e,
    0 12px 22px rgba(0, 0, 0, 0.7);
}

/* 6. LEADERBOARD - ROYAL AMBER GOLD */
.btn-pill-gold {
  background: linear-gradient(180deg, #fde047 0%, #facc15 35%, #eab308 70%, #ca8a04 100%);
  border-color: #fef9c3;
  color: #ffffff;
  text-shadow: 0 2px 4px #713f12, 0 4px 8px rgba(0, 0, 0, 0.8);
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.8),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 6px 0 #854d0e,
    0 12px 22px rgba(0, 0, 0, 0.7);
}

/* 7. SETTINGS - ROYAL CANDY PURPLE */
.btn-pill-purple {
  background: linear-gradient(180deg, #c084fc 0%, #a855f7 35%, #9333ea 70%, #7e22ce 100%);
  border-color: #f3e8ff;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 6px 0 #581c87,
    0 12px 22px rgba(0, 0, 0, 0.7);
}

/* 8. PLAYER LOGIN / DASHBOARD BUTTON */
.btn-pill-login {
  background: linear-gradient(180deg, #f472b6 0%, #ec4899 35%, #db2777 70%, #be185d 100%);
  border-color: #fdf2f8;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: clamp(10px, 2.8vw, 14px) 18px;
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 800;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 6px 0 #831843,
    0 12px 22px rgba(0, 0, 0, 0.7);
  margin-top: 4px;
  margin-bottom: 4px;
  border-radius: 999px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}
.btn-pill-login:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.9),
    inset 0 -4px 0 rgba(0, 0, 0, 0.3),
    0 8px 0 #831843,
    0 16px 26px rgba(236, 72, 153, 0.6);
  color: #ffffff;
}
.btn-pill-login:active {
  transform: translateY(3px);
  box-shadow: 
    inset 0 2px 0 rgba(0, 0, 0, 0.3),
    0 2px 0 #831843;
}
.login-btn-svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.btn-gift-icon {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  margin-left: 4px;
}

/* BOTTOM QUICK BUTTONS (NATURAL FLOW) */
.bottom-quick-bar-left {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 2.5vw, 14px);
  width: 100%;
  margin-top: 2px;
  flex-shrink: 0;
}

.icon-btn-orange {
  width: clamp(38px, 8.5vw, 48px);
  height: clamp(38px, 8.5vw, 48px);
  border-radius: 50%;
  background: linear-gradient(180deg, #fde047 0%, #f97316 50%, #c2410c 100%);
  border: 2.5px solid #ffffff;
  font-size: clamp(16px, 3.8vw, 20px);
  cursor: pointer;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.8), 0 4px 0 #78350f, 0 8px 14px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s var(--spring-easing);
  flex-shrink: 0;
}

.icon-btn-orange:active {
  transform: translateY(3px) scale(0.95);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 2px 0 #78350f;
}

/* 3. GAMEPLAY SCREEN & HUD */
#screen-game {
  justify-content: space-between;
  padding: clamp(10px, 2vh, 18px) clamp(8px, 2.5vw, 14px) clamp(6px, 1.5vh, 12px);
  gap: clamp(4px, 1vh, 10px);
  overflow: hidden;
  box-sizing: border-box;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: clamp(4px, 1.4vw, 8px);
  margin-top: 0;
  flex-shrink: 0;
}

.game-box {
  background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
  border: 2.5px solid var(--wood-gold-stroke);
  border-radius: clamp(12px, 3vw, 18px);
  padding: clamp(3px, 0.7vh, 6px) clamp(5px, 1.4vw, 10px);
  text-anchor: middle;
  text-align: center;
  box-shadow: 0 4px 0 #291002, 0 6px 12px rgba(0,0,0,0.6);
  flex: 1;
}

.moves-box {
  flex: 0.85;
}

.time-box {
  flex: 0.95;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.time-box.time-warning {
  background: linear-gradient(180deg, #991B1B 0%, #7F1D1D 50%, #450A0A 100%);
  border-color: #FCA5A5;
  animation: timeWarningPulse 0.7s infinite alternate ease-in-out;
}

.time-box.time-warning .box-label {
  color: #FCA5A5;
}

.time-box.time-warning .box-value {
  color: #FEF08A;
  text-shadow: 0 0 8px #EF4444, 2px 2px 0 #000;
}

@keyframes timeWarningPulse {
  0% { transform: scale(1); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6), 0 5px 0 #291002; }
  100% { transform: scale(1.05); box-shadow: 0 0 18px rgba(239, 68, 68, 0.95), 0 5px 0 #291002; }
}

.score-box {
  flex: 1.25;
}

.box-label {
  font-family: var(--font-heading);
  font-size: clamp(9px, 2.5vw, 12px);
  color: #fde047;
  letter-spacing: 0.6px;
}

.box-value {
  font-family: var(--font-heading);
  font-size: clamp(16px, 4.2vw, 24px);
  color: #ffffff;
  text-shadow: 1.5px 2px 0 #000;
  line-height: 1.1;
}

.star-progress-container {
  position: relative;
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 5px;
  margin-top: 4px;
  overflow: visible;
}

.star-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fde047, #eab308);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.star-node {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  font-size: 11px;
  line-height: 1;
  opacity: 0.35;
  filter: grayscale(1);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.star-node.s1 { left: 40%; }
.star-node.s2 { left: 70%; }
.star-node.s3 { left: 98%; }

.star-node.achieved {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  transform: translate(-50%, -50%) scale(1.25);
  animation: starNodePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes starNodePop {
  0% { transform: translate(-50%, -50%) scale(0.6); }
  50% { transform: translate(-50%, -50%) scale(1.6); }
  100% { transform: translate(-50%, -50%) scale(1.25); }
}

.icon-btn-pause {
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border: 3.5px solid #ffffff;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 5px 0 #052e16, 0 8px 14px rgba(0,0,0,0.5);
  transition: transform 0.15s var(--spring-easing);
  flex-shrink: 0;
}

.icon-btn-pause:active {
  transform: translateY(3px);
}

.target-badge-bar {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid #eab308;
  border-radius: 25px;
  padding: clamp(4px, 0.8vh, 6px) clamp(10px, 2.5vw, 20px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1.5vw, 14px);
  font-family: var(--font-heading);
  font-size: clamp(12px, 3.2vw, 15px);
  color: #fde047;
  margin: 4px auto;
  max-width: 96%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

/* 2026 CRYSTAL WOOD BOARD & GRID */
.board-wrapper {
  position: relative;
  width: var(--board-size, min(94vw, calc(100dvh - 145px), 400px));
  height: var(--board-size, min(94vw, calc(100dvh - 145px), 400px));
  aspect-ratio: 1 / 1;
  background: rgba(15, 23, 42, 0.92);
  border: clamp(4px, 1.2vw, 6px) solid #a16207;
  border-radius: clamp(16px, 4vw, 24px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.9), inset 0 0 20px rgba(0,0,0,0.9);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  touch-action: none !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  contain: layout paint;
}

#line-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  touch-action: none !important;
  transform: translateZ(0);
}

.grid-container {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: clamp(3px, 0.9vw, 6px);
  width: 95%;
  height: 95%;
  touch-action: none !important;
  transform: translateZ(0);
}

.fruit-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.4), 0 4px 8px rgba(0, 0, 0, 0.45);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, box-shadow 0.15s ease;
  touch-action: none !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transform: translate3d(0, 0, 0);
  contain: layout paint;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.fruit-cell.selected {
  background: rgba(253, 224, 71, 0.55);
  border-color: #fde047;
  transform: scale3d(1.14, 1.14, 1);
  box-shadow: 0 0 18px #fde047;
  z-index: 15;
}

.fruit-img {
  width: 92%;
  height: 92%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.45));
  transition: transform 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  transform: translateZ(0);
}

/* Fruit Fall & Gravity Bounce Animations */
.fruit-dropping {
  animation: fruitDropAnim 0.34s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  will-change: transform, opacity;
}

.fruit-spawning {
  animation: fruitSpawnAnim 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  will-change: transform, opacity;
}

@keyframes fruitDropAnim {
  0% { transform: translate3d(0, -36px, 0) scale(0.92); opacity: 0.8; }
  70% { transform: translate3d(0, 3px, 0) scale(1.05, 0.95); }
  100% { transform: translate3d(0, 0, 0) scale(1, 1); opacity: 1; }
}

@keyframes fruitSpawnAnim {
  0% { transform: translate3d(0, -80px, 0) scale(0.6); opacity: 0; }
  65% { transform: translate3d(0, 4px, 0) scale(1.1, 0.9); opacity: 1; }
  100% { transform: translate3d(0, 0, 0) scale(1, 1); opacity: 1; }
}

/* Juice Splash Particle Burst Effect */
.juice-particle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  z-index: 50;
  animation: juiceBurst 0.42s ease-out forwards;
  will-change: transform, opacity;
}

@keyframes juiceBurst {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--tx), var(--ty), 0) scale(0.2);
    opacity: 0;
  }
}

/* Floating Combo Score Popup */
.floating-score {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 22px;
  color: #FDE047;
  text-shadow: 0 0 8px #EAB308, -1.5px -1.5px 0 #78350F, 1.5px 1.5px 0 #78350F;
  pointer-events: none;
  z-index: 60;
  animation: floatScore 0.75s ease-out forwards;
}

@keyframes floatScore {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  30% {
    transform: translate(-50%, -80%) scale(1.25);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -150%) scale(1);
    opacity: 0;
  }
}

/* BOOSTERS TOOLBAR */
.boosters-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 1.4vw, 10px);
  width: 100%;
  padding-bottom: clamp(2px, 0.8vh, 8px);
  flex-shrink: 0;
  box-sizing: border-box;
}

.booster-btn {
  position: relative;
  width: clamp(42px, 12.8vw, 56px);
  height: clamp(42px, 12.8vw, 56px);
  border-radius: clamp(12px, 3vw, 18px);
  background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
  border: 2.5px solid #fde047;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 0 #291002, 0 8px 14px rgba(0,0,0,0.5);
  transition: transform 0.15s var(--spring-easing);
  flex-shrink: 0;
}

.booster-btn:active {
  transform: translateY(3px);
}

.booster-btn img {
  width: clamp(24px, 7vw, 34px);
  height: clamp(24px, 7vw, 34px);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.booster-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: #ef4444;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: clamp(9px, 2.8vw, 12px);
  width: clamp(18px, 4.5vw, 22px);
  height: clamp(18px, 4.5vw, 22px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* 4. UNIVERSAL MODALS & DIALOGS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 44, 34, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: clamp(8px, 2.5vw, 16px);
  box-sizing: border-box;
}

.wooden-card {
  position: relative;
  width: min(94vw, 400px);
  max-height: min(90dvh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #854d0e 0%, #78350f 50%, #451a03 100%);
  border: 4px solid var(--wood-gold-stroke);
  border-radius: clamp(20px, 4vw, 28px);
  padding: clamp(16px, 3vh, 24px) clamp(12px, 3vw, 20px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.9), inset 0 2px 4px rgba(255,255,255,0.4);
  text-align: center;
  box-sizing: border-box;
}

.banner-ribbon {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border: 3px solid #ffffff;
  border-radius: 20px;
  padding: 8px 24px;
  font-family: var(--font-heading);
  font-size: 22px;
  color: #ffffff;
  margin: -40px auto 16px;
  width: fit-content;
  box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}

.close-btn-red {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* ==========================================================================
   SETTINGS MENU 3D WOOD & PARCHMENT UPGRADED DESIGN SYSTEM
   ========================================================================== */

/* Outer overlay */
#modal-settings {
  background: rgba(4, 24, 16, 0.75);
}

/* Outer Wooden Card Frame */
.settings-wood-card {
  position: relative;
  width: min(92vw, 420px);
  max-height: min(88dvh, 660px);
  background: linear-gradient(180deg, #965425 0%, #7A3E14 45%, #592B0A 100%);
  border: 4.5px solid #B6783E;
  border-radius: 28px;
  padding: 16px 14px 18px;
  box-shadow: 
    0 18px 40px rgba(0, 0, 0, 0.85),
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    inset 0 -5px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  box-sizing: border-box;
}

.settings-scroll-body {
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 6px;
  max-height: calc(88dvh - 90px);
  scrollbar-width: thin;
  scrollbar-color: #fde047 rgba(0, 0, 0, 0.4);
}

.settings-scroll-body::-webkit-scrollbar {
  width: 6px;
}

.settings-scroll-body::-webkit-scrollbar-thumb {
  background: #fde047;
  border-radius: 10px;
}

/* Foliage / Corner Leaves */
.settings-wood-card .leaf-decor {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
}

.settings-wood-card .leaf-top-left {
  top: -12px;
  left: -8px;
  width: 52px;
  height: 52px;
  transform: rotate(-15deg);
}

.settings-wood-card .leaf-top-right {
  top: -16px;
  right: 28px;
  width: 48px;
  height: 48px;
  transform: rotate(35deg) scaleX(-1);
}

.settings-wood-card .leaf-bottom-right {
  bottom: -10px;
  right: -6px;
  width: 46px;
  height: 46px;
  transform: rotate(-40deg);
}

/* Header Wooden Board */
.settings-header-board {
  position: relative;
  width: calc(100% + 12px);
  margin-top: -32px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #A8602E 0%, #884518 50%, #682E09 100%);
  border: 3.5px solid #C4874E;
  border-radius: 18px;
  padding: 8px 10px;
  text-align: center;
  box-shadow: 
    0 6px 14px rgba(0,0,0,0.65),
    inset 0 2px 0 rgba(255,255,255,0.4),
    inset 0 -3px 0 rgba(0,0,0,0.4);
  z-index: 10;
}

/* Header Title "SETTINGS" */
.settings-title {
  font-family: var(--font-heading);
  font-size: 28px;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 
    -2px -2px 0 #522306,
     2px -2px 0 #522306,
    -2px  2px 0 #522306,
     2px  2px 0 #522306,
     0px  4px 0 #361402,
     0px  6px 10px rgba(0,0,0,0.6);
  line-height: 1.1;
  margin: 0;
}

/* Shiny Red Close Button Overlapping Top Right */
.settings-close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FF6B6B 0%, #EE2A2A 50%, #B71C1C 100%);
  border: 3.5px solid #FFFFFF;
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 6px 14px rgba(0,0,0,0.6),
    inset 0 3px 0 rgba(255,255,255,0.6);
  z-index: 30;
  transition: transform 0.15s var(--spring-easing);
}

.settings-close-btn span {
  display: inline-block;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
  transform: scale(0.9);
}

.settings-close-btn:active {
  transform: scale(0.9) translateY(2px);
}

/* Parchment Central Card */
.settings-parchment-card {
  width: 100%;
  background: linear-gradient(180deg, #FDF4DE 0%, #F5E5C4 100%);
  border: 2.5px solid #D6B485;
  border-radius: 20px;
  padding: 8px 14px;
  box-shadow: 
    inset 0 3px 6px rgba(133, 77, 14, 0.18),
    0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

/* Individual Row inside Parchment */
.settings-parchment-card .setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1.5px solid #E6D0A9;
}

.settings-parchment-card .setting-row:last-child {
  border-bottom: none;
}

.setting-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(80,40,10,0.25));
}

.setting-label {
  font-family: var(--font-heading);
  font-size: 16px;
  color: #4A2508;
  letter-spacing: 0.8px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

/* 3D Green Toggle Switch with "ON" / "OFF" text and knob */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 82px;
  height: 38px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #888888 0%, #555555 100%);
  border: 2px solid #FFFFFF;
  border-radius: 30px;
  box-shadow: 
    inset 0 3px 4px rgba(0, 0, 0, 0.4),
    0 2px 5px rgba(0,0,0,0.25);
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.toggle-switch input:checked + .slider {
  background: linear-gradient(180deg, #8EE635 0%, #5CB918 50%, #3B8C0A 100%);
  border-color: #DCFCE7;
  box-shadow: 
    inset 0 3px 3px rgba(255, 255, 255, 0.5),
    inset 0 -3px 3px rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0,0,0,0.3);
}

.slider-text {
  font-family: var(--font-heading);
  font-size: 14px;
  color: #FFFFFF;
  text-shadow: 0 1.5px 2px rgba(0, 0, 0, 0.6);
  z-index: 1;
  pointer-events: none;
}

.slider-text.text-on {
  display: none;
  margin-left: 2px;
}

.slider-text.text-off {
  display: block;
  margin-left: auto;
  margin-right: 2px;
}

.toggle-switch input:checked + .slider .text-on {
  display: block;
}

.toggle-switch input:checked + .slider .text-off {
  display: none;
}

/* White 3D Slider Knob */
.toggle-switch .knob {
  position: absolute;
  top: 2.5px;
  left: 3px;
  width: 29px;
  height: 29px;
  background: linear-gradient(180deg, #FFFFFF 0%, #E2E8F0 100%);
  border: 1px solid #CBD5E1;
  border-radius: 50%;
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.4),
    inset 0 2px 0 #FFFFFF;
  transition: transform 0.25s var(--spring-easing);
  z-index: 2;
}

.toggle-switch input:checked + .slider .knob {
  transform: translateX(43px);
}

/* Styled Select Dropdown (LANGUAGE) */
.select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.styled-select {
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(180deg, #FFF6E5 0%, #F5E0B7 100%);
  border: 2px solid #C8A36E;
  border-radius: 14px;
  padding: 6px 32px 6px 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #4A2508;
  cursor: pointer;
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.15);
  outline: none;
}

.select-arrow {
  position: absolute;
  right: 10px;
  pointer-events: none;
  font-size: 10px;
  color: #4A2508;
}

/* Action Buttons below Parchment */
.settings-action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.settings-btn {
  width: 100%;
  height: 48px;
  border-radius: 16px;
  border: 3px solid #FFFFFF;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 1px;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  box-shadow: 
    inset 0 3px 0 rgba(255, 255, 255, 0.5),
    0 5px 0 rgba(0, 0, 0, 0.35),
    0 8px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s var(--spring-easing), box-shadow 0.12s ease;
}

.settings-btn:active {
  transform: translateY(3px);
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.4);
}

.settings-btn-blue {
  background: linear-gradient(180deg, #42B5FF 0%, #1A8BD8 50%, #0C61A4 100%);
  border-color: #BBE4FF;
}

.settings-btn-red {
  background: linear-gradient(180deg, #FF5252 0%, #E53935 50%, #B71C1C 100%);
  border-color: #FFCDD2;
}

/* ==========================================================================
   PAUSED MENU 3D WOOD & PARCHMENT UPGRADED DESIGN SYSTEM
   ========================================================================== */

/* Outer overlay */
#modal-pause {
  background: rgba(4, 24, 16, 0.75);
}

/* Outer Wooden Card Frame */
.pause-wood-card {
  position: relative;
  width: 90%;
  max-width: 340px;
  background: linear-gradient(180deg, #965425 0%, #7A3E14 45%, #592B0A 100%);
  border: 4.5px solid #B6783E;
  border-radius: 28px;
  padding: 18px 16px 20px;
  box-shadow: 
    0 18px 40px rgba(0, 0, 0, 0.85),
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    inset 0 -5px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

/* Foliage / Corner Leaves */
.pause-wood-card .leaf-decor {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
}

.pause-wood-card .leaf-top-left {
  top: -12px;
  left: -8px;
  width: 52px;
  height: 52px;
  transform: rotate(-15deg);
}

.pause-wood-card .leaf-top-right {
  top: -16px;
  right: 28px;
  width: 48px;
  height: 48px;
  transform: rotate(35deg) scaleX(-1);
}

.pause-wood-card .leaf-bottom-right {
  bottom: -10px;
  right: -6px;
  width: 46px;
  height: 46px;
  transform: rotate(-40deg);
}

/* Header Wooden Board */
.pause-header-board {
  position: relative;
  width: calc(100% + 12px);
  margin-top: -32px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #A8602E 0%, #884518 50%, #682E09 100%);
  border: 3.5px solid #C4874E;
  border-radius: 18px;
  padding: 8px 10px;
  text-align: center;
  box-shadow: 
    0 6px 14px rgba(0,0,0,0.65),
    inset 0 2px 0 rgba(255,255,255,0.4),
    inset 0 -3px 0 rgba(0,0,0,0.4);
  z-index: 10;
}

/* Header Title "PAUSED" */
.pause-title {
  font-family: var(--font-heading);
  font-size: 28px;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 
    -2px -2px 0 #522306,
     2px -2px 0 #522306,
    -2px  2px 0 #522306,
     2px  2px 0 #522306,
     0px  4px 0 #361402,
     0px  6px 10px rgba(0,0,0,0.6);
  line-height: 1.1;
  margin: 0;
}

/* Shiny Red Close Button Overlapping Top Right */
.pause-close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FF6B6B 0%, #EE2A2A 50%, #B71C1C 100%);
  border: 3.5px solid #FFFFFF;
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 6px 14px rgba(0,0,0,0.6),
    inset 0 3px 0 rgba(255,255,255,0.6);
  z-index: 30;
  transition: transform 0.15s var(--spring-easing);
}

.pause-close-btn span {
  display: inline-block;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
  transform: scale(0.9);
}

.pause-close-btn:active {
  transform: scale(0.9) translateY(2px);
}

/* Inner Parchment Card Container */
.pause-parchment-card {
  width: 100%;
  background: linear-gradient(180deg, #FDF4DE 0%, #F5E5C4 100%);
  border: 2.5px solid #D6B485;
  border-radius: 20px;
  padding: 16px 14px;
  box-shadow: 
    inset 0 3px 6px rgba(133, 77, 14, 0.18),
    0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 3D Glossy Action Buttons */
.pause-btn {
  width: 100%;
  height: 52px;
  border-radius: 18px;
  border: 3px solid #FFFFFF;
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 
    -1.5px -1.5px 0 rgba(0,0,0,0.4),
     1.5px -1.5px 0 rgba(0,0,0,0.4),
    -1.5px  1.5px 0 rgba(0,0,0,0.4),
     1.5px  1.5px 0 rgba(0,0,0,0.4),
     0px  3px 4px rgba(0, 0, 0, 0.7);
  box-shadow: 
    inset 0 3.5px 0 rgba(255, 255, 255, 0.65),
    0 5px 0 rgba(0, 0, 0, 0.35),
    0 9px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s var(--spring-easing), box-shadow 0.12s ease;
}

.pause-btn:active {
  transform: translateY(3px);
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.4);
}

.pause-btn-green {
  background: linear-gradient(180deg, #8EE635 0%, #5CB918 50%, #3B8C0A 100%);
  border-color: #DCFCE7;
}

.pause-btn-orange {
  background: linear-gradient(180deg, #FFB830 0%, #F59E0B 50%, #D97706 100%);
  border-color: #FEF3C7;
}

.pause-btn-blue {
  background: linear-gradient(180deg, #42B5FF 0%, #1A8BD8 50%, #0C61A4 100%);
  border-color: #BBE4FF;
}

.pause-btn-red {
  background: linear-gradient(180deg, #FF5252 0%, #E53935 50%, #B71C1C 100%);
  border-color: #FFCDD2;
}

/* ==========================================================================
   LEVEL SELECT MENU (NATURE MAP & 3D NODE TRAIL) UPGRADED DESIGN SYSTEM
   ========================================================================== */

#screen-levels {
  background: url('assets/ui/bg_nature.png') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Floating Back Button & Header Title */
.levels-header {
  position: absolute;
  top: clamp(65px, 9vh, 80px);
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  pointer-events: auto;
}

.icon-btn-back {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFB830 0%, #F59E0B 50%, #D97706 100%);
  border: 3px solid #FFFFFF;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 
    0 5px 12px rgba(0,0,0,0.5),
    inset 0 3px 0 rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s var(--spring-easing);
}

.icon-btn-back:active {
  transform: translateY(3px) scale(0.95);
}

.levels-title {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-shadow: 
    -2px -2px 0 #522306,
     2px -2px 0 #522306,
    -2px  2px 0 #522306,
     2px  2px 0 #522306,
     0px  4px 8px rgba(0,0,0,0.7);
  background: linear-gradient(180deg, #A8602E 0%, #884518 50%, #682E09 100%);
  border: 3px solid #C4874E;
  border-radius: 20px;
  padding: 6px 20px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.6), inset 0 2px 0 rgba(255,255,255,0.4);
}

/* Map Scroll Area */
.map-scroll-area {
  flex: 1;
  width: 100%;
  margin-top: clamp(110px, 15vh, 130px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 0 60px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.map-scroll-area::-webkit-scrollbar {
  display: none;
}

/* Map Container with Winding Path Layout */
.map-path-container {
  position: relative;
  width: 100%;
  min-height: 950px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 28px;
  padding: 40px 20px;
}

/* Level Node Item */
.map-node {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s var(--spring-easing);
}

/* Winding Serpentine Path S-Curve Layout */
.map-node:nth-child(5n+1) { align-self: center; margin-left: 0; }
.map-node:nth-child(5n+2) { align-self: flex-start; margin-left: clamp(8%, 15vw, 18%); }
.map-node:nth-child(5n+3) { align-self: flex-start; margin-left: clamp(16%, 30vw, 36%); }
.map-node:nth-child(5n+4) { align-self: flex-end; margin-right: clamp(8%, 15vw, 18%); }
.map-node:nth-child(5n+0) { align-self: flex-end; margin-right: clamp(16%, 30vw, 36%); }

.map-node:active {
  transform: scale(0.92);
}

/* 3D Circular Badge */
.node-badge {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 28px;
  color: #FFFFFF;
  text-shadow: 
    -1.5px -1.5px 0 rgba(0,0,0,0.5),
     1.5px -1.5px 0 rgba(0,0,0,0.5),
    -1.5px  1.5px 0 rgba(0,0,0,0.5),
     1.5px  1.5px 0 rgba(0,0,0,0.5),
     0px 3px 5px rgba(0,0,0,0.6);
  border: 3.5px solid #FFFFFF;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.7),
    0 6px 0 rgba(0, 0, 0, 0.35),
    0 10px 18px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--spring-easing), box-shadow 0.2s ease;
}

/* Default Unlocked Level Node (Green) */
.map-node .node-badge {
  background: linear-gradient(180deg, #8EE635 0%, #5CB918 50%, #3B8C0A 100%);
  border-color: #DCFCE7;
}

/* Current Active Level Node (Orange / Gold Glow) */
.map-node.current .node-badge {
  background: linear-gradient(180deg, #FFC107 0%, #FF9800 50%, #E65100 100%);
  border-color: #FFF9C4;
  animation: nodePulse 1.8s infinite ease-in-out;
  box-shadow: 
    inset 0 4px 0 rgba(255, 255, 255, 0.8),
    0 0 22px #FFD54F,
    0 6px 0 #BF360C,
    0 10px 20px rgba(0,0,0,0.6);
}

@keyframes nodePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Special Alternate Level Node (Blue) */
.map-node.node-blue .node-badge {
  background: linear-gradient(180deg, #42B5FF 0%, #1A8BD8 50%, #0C61A4 100%);
  border-color: #E0F2FE;
}

/* Locked Level Node (Dark Gray Slate) */
.map-node.locked {
  cursor: not-allowed;
  opacity: 0.85;
}

.map-node.locked .node-badge {
  background: linear-gradient(180deg, #64748B 0%, #475569 50%, #1E293B 100%);
  border-color: #94A3B8;
  color: #CBD5E1;
  box-shadow: 
    inset 0 3px 0 rgba(255, 255, 255, 0.3),
    0 5px 0 #0F172A,
    0 8px 14px rgba(0,0,0,0.5);
}

/* Crown Badge Icon for Boss Milestones */

.node-badge .crown-icon {
  position: absolute;
  top: -14px;
  right: -8px;
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  animation: crownBob 1.5s infinite alternate ease-in-out;
}

@keyframes crownBob {
  0% { transform: translateY(0) rotate(-8deg); }
  100% { transform: translateY(-4px) rotate(8deg); }
}

.node-badge .lock-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 16px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
}

/* Star Rating Pill Banner below Node */
.map-node-stars {
  margin-top: -6px;
  background: linear-gradient(180deg, #572A0A 0%, #361402 100%);
  border: 2px solid #C4874E;
  border-radius: 12px;
  padding: 2px 10px;
  display: flex;
  gap: 3px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.map-node-stars .star {
  font-size: 13px;
  color: #64748B;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.map-node-stars .star.earned {
  color: #FFD700;
  text-shadow: 0 0 6px #FFD700;
}

/* ==========================================================================
   LEVEL COMPLETE MENU 3D WOOD & PARCHMENT UPGRADED DESIGN SYSTEM
   ========================================================================== */

/* Outer Overlay */
#modal-win {
  background: rgba(4, 24, 16, 0.82);
}

/* Outer Wooden Card Frame */
.win-wood-card {
  position: relative;
  width: 90%;
  max-width: 360px;
  max-height: min(94dvh, 700px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #fde047 rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, #965425 0%, #7A3E14 45%, #592B0A 100%);
  border: 4.5px solid #B6783E;
  border-radius: 28px;
  padding: 44px 18px 22px;
  box-shadow: 
    0 22px 50px rgba(0, 0, 0, 0.9),
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    inset 0 -5px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.win-wood-card::-webkit-scrollbar {
  width: 5px;
}

.win-wood-card::-webkit-scrollbar-thumb {
  background: #fde047;
  border-radius: 10px;
}

/* Ambient Fruits peeking from sides and bottom */
.decor-fruit {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}

.fruit-top-left {
  top: -45px;
  left: -20px;
  width: 58px;
  height: 58px;
  transform: rotate(-15deg);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.6));
}

.fruit-top-right {
  top: -55px;
  right: -24px;
  width: 72px;
  height: 72px;
  transform: rotate(25deg);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.6));
}

.fruit-bottom-left {
  bottom: 22px;
  left: -48px;
  width: 80px;
  height: 80px;
  z-index: 25;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.7));
}

.fruit-bottom-left-sub {
  bottom: -22px;
  left: -12px;
  width: 66px;
  height: 66px;
  z-index: 26;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.65));
}

.fruit-bottom-right {
  bottom: 12px;
  right: -42px;
  width: 72px;
  height: 72px;
  z-index: 25;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.7));
}

/* Top Floating 3D Stars Header */
.win-stars-header {
  position: absolute;
  top: -72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  z-index: 35;
  pointer-events: none;
  width: 280px;
}

.win-stars-header .win-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.65));
  transition: transform 0.3s var(--spring-easing), opacity 0.3s ease;
}

.win-stars-header .win-star .star-svg-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.win-stars-header .star-1 {
  width: 72px;
  height: 72px;
  transform: rotate(-14deg);
}

.win-stars-header .star-2 {
  width: 96px;
  height: 96px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8)) drop-shadow(0 8px 16px rgba(0,0,0,0.7));
}

.win-stars-header .star-3 {
  width: 72px;
  height: 72px;
  transform: rotate(14deg);
}

/* Golden Twinkling Sparkles */
.star-sparkle {
  position: absolute;
  pointer-events: none;
  z-index: 40;
}

.spk-1 {
  top: -12px;
  left: 8px;
  width: 26px;
  height: 26px;
  animation: sparkleFloat 2.2s infinite ease-in-out alternate;
}

.spk-2 {
  top: -26px;
  left: 58px;
  width: 32px;
  height: 32px;
  animation: sparkleFloat 3s infinite 0.4s ease-in-out alternate;
}

.spk-3 {
  top: -28px;
  right: 58px;
  width: 32px;
  height: 32px;
  animation: sparkleFloat 2.6s infinite 0.9s ease-in-out alternate;
}

.spk-4 {
  top: -8px;
  right: 12px;
  width: 26px;
  height: 26px;
  animation: sparkleFloat 2.4s infinite 0.6s ease-in-out alternate;
}

@keyframes sparkleFloat {
  0% { transform: scale(0.8) rotate(0deg); opacity: 0.6; }
  100% { transform: scale(1.2) rotate(45deg); opacity: 1; filter: drop-shadow(0 0 8px #FFD700); }
}

/* Corner Foliage Leaves */
.win-wood-card .leaf-decor {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
}

.win-wood-card .leaf-top-left {
  top: -12px;
  left: -8px;
  width: 52px;
  height: 52px;
  transform: rotate(-15deg);
}

.win-wood-card .leaf-top-right {
  top: -16px;
  right: 28px;
  width: 48px;
  height: 48px;
  transform: rotate(35deg) scaleX(-1);
}

.win-wood-card .leaf-bottom-left {
  bottom: -10px;
  left: -6px;
  width: 46px;
  height: 46px;
  transform: rotate(40deg) scaleX(-1);
}

.win-wood-card .leaf-bottom-right {
  bottom: -10px;
  right: -6px;
  width: 46px;
  height: 46px;
  transform: rotate(-40deg);
}

/* Red 3D Ribbon Banner Header */
.win-header-ribbon {
  position: relative;
  width: calc(100% + 28px);
  margin-top: -30px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #FF4545 0%, #E01E1E 50%, #A80C0C 100%);
  border: 3.5px solid #FFE4E4;
  border-radius: 20px;
  padding: 10px 16px;
  text-align: center;
  box-shadow: 
    0 10px 22px rgba(0,0,0,0.75),
    inset 0 3px 0 rgba(255,255,255,0.6),
    inset 0 -3px 0 rgba(0,0,0,0.4);
  z-index: 20;
}

/* Ribbon Folding 3D Ends */
.ribbon-tail {
  position: absolute;
  bottom: -12px;
  width: 18px;
  height: 22px;
  background: #700606;
  z-index: -1;
}

.ribbon-tail.tail-left {
  left: 6px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.ribbon-tail.tail-right {
  right: 6px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.win-title {
  font-family: var(--font-heading);
  font-size: 26px;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 
    -2px -2px 0 #7F1D1D,
     2px -2px 0 #7F1D1D,
    -2px  2px 0 #7F1D1D,
     2px  2px 0 #7F1D1D,
     0px  4px 0 #450A0A,
     0px  6px 12px rgba(0,0,0,0.7);
  line-height: 1.1;
  margin: 0;
}

/* Inner Parchment Card Container */
.win-parchment-card {
  width: 100%;
  background: linear-gradient(180deg, #FBF2DC 0%, #F5E5C0 100%);
  border: 2.5px solid #D6B485;
  border-radius: 20px;
  padding: 14px 18px;
  box-shadow: 
    inset 0 3px 6px rgba(133, 77, 14, 0.18),
    0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.win-stat-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.win-stat-label {
  font-family: var(--font-heading);
  font-size: 15px;
  color: #5A2E0E;
  letter-spacing: 1.2px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.win-stat-val {
  font-family: var(--font-heading);
  font-size: 34px;
  color: #2D1403;
  text-shadow: 0 2px 2px rgba(255,255,255,0.7);
  line-height: 1.1;
}

.win-divider {
  width: 88%;
  height: 1.5px;
  background: #E6D0A9;
  margin: 2px 0;
}

/* Reward Pill inside Parchment */
.win-reward-pill {
  width: 100%;
  background: linear-gradient(180deg, #DDBF8C 0%, #CFA96F 100%);
  border: 2px solid #B89258;
  border-radius: 18px;
  padding: 8px 20px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: inset 0 2px 5px rgba(80, 40, 10, 0.25);
}

.win-reward-pill .reward-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.win-reward-pill .reward-coin-img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}

.win-reward-pill .reward-star-img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}

.win-reward-pill .reward-val {
  font-family: var(--font-heading);
  font-size: 24px;
  color: #FFFFFF;
  text-shadow: 
    -1.5px -1.5px 0 #4A2508,
     1.5px -1.5px 0 #4A2508,
    -1.5px  1.5px 0 #4A2508,
     1.5px  1.5px 0 #4A2508,
     0px 2px 4px rgba(0,0,0,0.6);
}

/* Action Buttons */
.win-action-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.win-btn {
  width: 100%;
  height: 52px;
  border-radius: 18px;
  border: 3px solid #FFFFFF;
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 
    -1.5px -1.5px 0 rgba(0,0,0,0.4),
     1.5px -1.5px 0 rgba(0,0,0,0.4),
    -1.5px  1.5px 0 rgba(0,0,0,0.4),
     1.5px  1.5px 0 rgba(0,0,0,0.4),
     0px  3px 4px rgba(0, 0, 0, 0.7);
  box-shadow: 
    inset 0 3.5px 0 rgba(255, 255, 255, 0.65),
    0 5px 0 rgba(0, 0, 0, 0.35),
    0 9px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s var(--spring-easing), box-shadow 0.12s ease;
}

.win-btn:active {
  transform: translateY(3px);
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.4);
}

.win-btn-green {
  background: linear-gradient(180deg, #8EE635 0%, #5CB918 50%, #3B8C0A 100%);
  border-color: #DCFCE7;
}

.win-btn-blue {
  background: linear-gradient(180deg, #42B5FF 0%, #1A8BD8 50%, #0C61A4 100%);
  border-color: #BBE4FF;
}

/* Home Circular 3D Button */
.win-btn-home-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #42B5FF 0%, #1A8BD8 50%, #0C61A4 100%);
  border: 3px solid #BBE4FF;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 3px 0 rgba(255, 255, 255, 0.65),
    0 5px 0 rgba(0, 0, 0, 0.35),
    0 9px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s var(--spring-easing);
  margin-top: 2px;
}

.win-btn-home-circle:active {
  transform: translateY(3px);
}

/* ==========================================================================
   LEVEL FAILED MENU 3D WOOD & PARCHMENT UPGRADED DESIGN SYSTEM
   ========================================================================== */

/* Outer Overlay */
#modal-fail {
  background: rgba(4, 24, 16, 0.82);
}

/* Outer Wooden Card Frame */
.fail-wood-card {
  position: relative;
  width: 90%;
  max-width: 360px;
  max-height: min(94dvh, 700px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #fde047 rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, #965425 0%, #7A3E14 45%, #592B0A 100%);
  border: 4.5px solid #B6783E;
  border-radius: 28px;
  padding: 42px 18px 22px;
  box-shadow: 
    0 22px 50px rgba(0, 0, 0, 0.9),
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    inset 0 -5px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.fail-wood-card::-webkit-scrollbar {
  width: 5px;
}

.fail-wood-card::-webkit-scrollbar-thumb {
  background: #fde047;
  border-radius: 10px;
}

/* Shiny Red Close Button Overlapping Top Right */
.fail-close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FF6B6B 0%, #EE2A2A 50%, #B71C1C 100%);
  border: 3.5px solid #FFFFFF;
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 6px 14px rgba(0,0,0,0.6),
    inset 0 3px 0 rgba(255,255,255,0.6);
  z-index: 30;
  transition: transform 0.15s var(--spring-easing);
}

.fail-close-btn span {
  display: inline-block;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
  transform: scale(0.9);
}

.fail-close-btn:active {
  transform: scale(0.9) translateY(2px);
}

/* Corner Foliage Leaves */
.fail-wood-card .leaf-decor {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
}

.fail-wood-card .leaf-top-left {
  top: -12px;
  left: -8px;
  width: 52px;
  height: 52px;
  transform: rotate(-15deg);
}

.fail-wood-card .leaf-top-right {
  top: -16px;
  right: 28px;
  width: 48px;
  height: 48px;
  transform: rotate(35deg) scaleX(-1);
}

.fail-wood-card .leaf-bottom-left {
  bottom: -10px;
  left: -6px;
  width: 46px;
  height: 46px;
  transform: rotate(40deg) scaleX(-1);
}

.fail-wood-card .leaf-bottom-right {
  bottom: -10px;
  right: -6px;
  width: 46px;
  height: 46px;
  transform: rotate(-40deg);
}

/* Red 3D Ribbon Banner Header */
.fail-header-ribbon {
  position: relative;
  width: calc(100% + 28px);
  margin-top: -30px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #FF4545 0%, #E01E1E 50%, #A80C0C 100%);
  border: 3.5px solid #FFE4E4;
  border-radius: 20px;
  padding: 10px 16px;
  text-align: center;
  box-shadow: 
    0 10px 22px rgba(0,0,0,0.75),
    inset 0 3px 0 rgba(255,255,255,0.6),
    inset 0 -3px 0 rgba(0,0,0,0.4);
  z-index: 20;
}

.fail-title {
  font-family: var(--font-heading);
  font-size: 26px;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 
    -2px -2px 0 #7F1D1D,
     2px -2px 0 #7F1D1D,
    -2px  2px 0 #7F1D1D,
     2px  2px 0 #7F1D1D,
     0px  4px 0 #450A0A,
     0px  6px 12px rgba(0,0,0,0.7);
  line-height: 1.1;
  margin: 0;
}

/* Inner Parchment Card Container */
.fail-parchment-card {
  width: 100%;
  background: linear-gradient(180deg, #FBF2DC 0%, #F5E5C0 100%);
  border: 2.5px solid #D6B485;
  border-radius: 20px;
  padding: 14px 18px 18px;
  box-shadow: 
    inset 0 3px 6px rgba(133, 77, 14, 0.18),
    0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Sad Strawberry Mascot */
.fail-mascot-container {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -6px;
  animation: sadBounce 3s infinite ease-in-out;
}

@keyframes sadBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.sad-strawberry-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

/* Dual Stat Boxes (SCORE & TARGET) */
.fail-stats-row {
  display: flex;
  width: 100%;
  gap: 10px;
}

.fail-stat-box {
  flex: 1;
  background: linear-gradient(180deg, #EAD7B5 0%, #DEBE94 100%);
  border: 2px solid #C4A170;
  border-radius: 16px;
  padding: 8px 10px;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(80, 40, 10, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fail-stat-label {
  font-family: var(--font-heading);
  font-size: 14px;
  color: #4A2508;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.fail-stat-val {
  font-family: var(--font-heading);
  font-size: 30px;
  color: #2D1403;
  text-shadow: 0 1.5px 2px rgba(255,255,255,0.6);
  line-height: 1;
}

/* Action Buttons */
.fail-action-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.fail-btn {
  position: relative;
  width: 100%;
  height: 52px;
  border-radius: 18px;
  border: 3px solid #FFFFFF;
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 
    -1.5px -1.5px 0 rgba(0,0,0,0.4),
     1.5px -1.5px 0 rgba(0,0,0,0.4),
    -1.5px  1.5px 0 rgba(0,0,0,0.4),
     1.5px  1.5px 0 rgba(0,0,0,0.4),
     0px  3px 4px rgba(0, 0, 0, 0.7);
  box-shadow: 
    inset 0 3.5px 0 rgba(255, 255, 255, 0.65),
    0 5px 0 rgba(0, 0, 0, 0.35),
    0 9px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s var(--spring-easing), box-shadow 0.12s ease;
}

.fail-btn:active {
  transform: translateY(3px);
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.4);
}

.fail-btn-green {
  background: linear-gradient(180deg, #8EE635 0%, #5CB918 50%, #3B8C0A 100%);
  border-color: #DCFCE7;
}

.fail-btn-blue {
  background: linear-gradient(180deg, #42B5FF 0%, #1A8BD8 50%, #0C61A4 100%);
  border-color: #BBE4FF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Booster Badge in USE BOOSTER button */
.btn-booster-badge {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-booster-badge .booster-thumb {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
}

.btn-booster-badge .booster-num {
  position: absolute;
  bottom: -2px;
  right: -6px;
  font-family: var(--font-heading);
  font-size: 11px;
  color: #FFFFFF;
  text-shadow: 0 1px 2px #000;
}

/* Home Circular 3D Button */
.fail-btn-home-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #42B5FF 0%, #1A8BD8 50%, #0C61A4 100%);
  border: 3px solid #BBE4FF;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 3px 0 rgba(255, 255, 255, 0.65),
    0 5px 0 rgba(0, 0, 0, 0.35),
    0 9px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s var(--spring-easing);
  margin-top: 2px;
}

.fail-btn-home-circle:active {
  transform: translateY(3px);
}

/* ==========================================================================
   DAILY REWARD CALENDAR 3D STYLES
   ========================================================================== */
.daily-rewards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin: 14px 0 10px;
}

.daily-reward-card {
  position: relative;
  background: linear-gradient(180deg, #FBF2DC 0%, #EBD0A2 100%);
  border: 2.5px solid #C4A170;
  border-radius: 16px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3), inset 0 2px 0 rgba(255,255,255,0.7);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.daily-reward-card:nth-child(7) {
  grid-column: span 2;
  background: linear-gradient(180deg, #FFF9C4 0%, #FFD54F 50%, #FFB300 100%);
  border-color: #FFA000;
}

.daily-reward-card .card-day {
  font-family: var(--font-heading);
  font-size: 12px;
  color: #5A2E0E;
  letter-spacing: 0.8px;
}

.daily-reward-card .card-icon {
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.daily-reward-card .card-label {
  font-family: var(--font-heading);
  font-size: 11px;
  color: #2D1403;
  text-align: center;
  line-height: 1;
}

/* Active Today State */
.daily-reward-card.active-today {
  border-color: #22C55E;
  border-width: 3px;
  background: linear-gradient(180deg, #DCFCE7 0%, #86EFAC 100%);
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.8), inset 0 2px 0 rgba(255,255,255,0.9);
  animation: pulseCard 1.5s infinite alternate ease-in-out;
}

.daily-reward-card.active-today .card-day {
  color: #14532D;
  font-weight: bold;
}

@keyframes pulseCard {
  0% { transform: scale(1.03); box-shadow: 0 0 10px rgba(34, 197, 94, 0.6); }
  100% { transform: scale(1.08); box-shadow: 0 0 20px rgba(34, 197, 94, 0.95); }
}

/* Claimed State */
.daily-reward-card.claimed {
  opacity: 0.6;
  filter: grayscale(0.4);
  background: #D1D5DB;
  border-color: #9CA3AF;
}

.daily-reward-card.claimed::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 900;
  color: #15803D;
  text-shadow: 0 0 6px #FFFFFF, 0 2px 4px #000;
}

/* Locked State */
.daily-reward-card.locked {
  opacity: 0.75;
}

#btn-claim-daily:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
  transform: none !important;
  box-shadow: none !important;
}

.text-left-scroll {
  text-align: left;
  font-size: 13px;
  color: #4A2508;
  line-height: 1.5;
  max-height: 180px;
  overflow-y: auto;
  padding: 8px 12px;
}

.text-left-scroll p {
  margin: 4px 0;
}

.btn-medium {
  padding: 10px 24px;
  font-size: 18px;
}

/* ==========================================================================
   3D CARTOON STORE MODAL (PIXEL PERFECT TO REFERENCE)
   ========================================================================== */
.store-wood-card {
  position: relative;
  background: #F6E2BD;
  border: 9px solid #7C3F13;
  border-radius: 28px;
  width: min(94vw, 370px);
  padding: 28px 12px 16px;
  box-shadow: 
    inset 0 0 0 3px #B46F28,
    inset 0 4px 10px rgba(0, 0, 0, 0.25),
    0 16px 36px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Leaves Decor for Store */
.store-wood-card .leaf-decor {
  position: absolute;
  z-index: 25;
  pointer-events: none;
}

.store-wood-card .leaf-top-left {
  top: -26px;
  left: 20px;
  width: 58px;
  height: 58px;
  transform: rotate(-10deg);
}

.store-wood-card .leaf-top-right {
  top: -24px;
  right: 68px;
  width: 52px;
  height: 52px;
  transform: rotate(20deg) scaleX(-1);
}

/* Header Wood Board */
.store-header-board {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 68%;
  height: 46px;
  background: linear-gradient(180deg, #A86024 0%, #7C3F13 50%, #522709 100%);
  border: 3.5px solid #421D05;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    0 5px 0 #2A1002,
    0 9px 16px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

.store-title {
  font-family: var(--font-heading);
  font-size: 26px;
  color: #FFFFFF;
  letter-spacing: 1px;
  text-shadow: 
    -1.5px -1.5px 0 #3E1A04,
     1.5px -1.5px 0 #3E1A04,
    -1.5px  1.5px 0 #3E1A04,
     1.5px  1.5px 0 #3E1A04,
     0px 3px 5px rgba(0, 0, 0, 0.6);
  margin: 0;
  line-height: 1;
}

/* 3D Red Circular Close Button */
.store-close-btn {
  position: absolute;
  top: -16px;
  right: -10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #EF4444 0%, #DC2626 50%, #991B1B 100%);
  border: 3.5px solid #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 3px 0 rgba(255, 255, 255, 0.8),
    0 5px 0 #5C0A0A,
    0 8px 14px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s var(--spring-easing);
  z-index: 30;
}

.store-close-btn:active {
  transform: translateY(3px);
}

.store-close-btn span {
  font-family: var(--font-heading);
  font-size: 20px;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  line-height: 1;
}

/* Coin Pill Header */
.store-coin-pill {
  background: linear-gradient(180deg, #422006 0%, #291202 100%);
  border: 2.5px solid #D97706;
  border-radius: 20px;
  height: 38px;
  min-width: 140px;
  padding: 0 4px 0 2px;
  margin: 10px auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 
    inset 0 2px 5px rgba(0, 0, 0, 0.85),
    0 3px 6px rgba(0, 0, 0, 0.35);
}

.store-coin-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.store-coin-text {
  font-family: var(--font-heading);
  font-size: 18px;
  color: #FFFFFF;
  text-shadow: 0 1px 2px #000;
  letter-spacing: 0.5px;
}

.store-coin-plus-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4ADE80 0%, #22C55E 55%, #15803D 100%);
  border: 2px solid #FFFFFF;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 1.5px 0 rgba(255, 255, 255, 0.8),
    0 2px 0 #052E16,
    0 4px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease;
  line-height: 1;
}

.store-coin-plus-btn:active {
  transform: scale(0.9);
}

/* 6-Card Store 3D Grid */
.store-grid-3d {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.store-card-blue {
  position: relative;
  background: linear-gradient(180deg, #38BDF8 0%, #0284C7 60%, #0369A1 100%);
  border: 2.5px solid #7DD3FC;
  border-radius: 16px;
  padding: 6px 3px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.75),
    0 4px 0 #075985,
    0 7px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-card-blue:hover {
  transform: translateY(-2px);
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    0 6px 0 #075985,
    0 10px 16px rgba(0, 0, 0, 0.45);
}

.store-card-name {
  font-family: var(--font-heading);
  font-size: 11px;
  color: #FFFFFF;
  text-shadow: 0 1px 2px #075985, 0 0 2px #000;
  letter-spacing: 0.5px;
  text-align: center;
  margin-bottom: 2px;
  white-space: nowrap;
}

.store-card-thumb {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1px 0 4px;
}

.store-card-thumb img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s var(--spring-easing);
}

.store-card-blue:hover .store-card-thumb img {
  transform: scale(1.08);
}

/* Buy Button Pill */
.store-buy-btn {
  width: 92%;
  height: 28px;
  background: linear-gradient(180deg, #0284C7 0%, #075985 50%, #0C4A6E 100%);
  border: 1.5px solid #0369A1;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 
    inset 0 2px 3px rgba(0, 0, 0, 0.6),
    0 2px 0 #082F49,
    0 4px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
  padding: 0;
}

.store-buy-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.store-buy-btn .btn-coin-icon {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.store-buy-btn .btn-price-num {
  font-family: var(--font-heading);
  font-size: 13px;
  color: #FFFFFF;
  text-shadow: 0 1px 2px #000;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   3D CARTOON HOW TO PLAY / TUTORIAL MODAL (MATCHING REFERENCE)
   ========================================================================== */
.tut-wood-card {
  position: relative;
  background: #F6E2BD;
  border: 9px solid #7C3F13;
  border-radius: 28px;
  width: min(94vw, 380px);
  padding: 32px 14px 14px;
  box-shadow: 
    inset 0 0 0 3px #B46F28,
    inset 0 4px 10px rgba(0, 0, 0, 0.25),
    0 16px 36px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Leaves Decor */
.tut-wood-card .leaf-decor {
  position: absolute;
  z-index: 25;
  pointer-events: none;
}

.tut-wood-card .leaf-top-left {
  top: -26px;
  left: 16px;
  width: 56px;
  height: 56px;
  transform: rotate(-10deg);
}

.tut-wood-card .leaf-top-right {
  top: -24px;
  right: 68px;
  width: 50px;
  height: 50px;
  transform: rotate(20deg) scaleX(-1);
}

.tut-wood-card .leaf-bottom-right {
  bottom: -16px;
  right: 10px;
  width: 44px;
  height: 44px;
  transform: rotate(45deg);
}

/* Header Wood Board */
.tut-header-board {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 74%;
  height: 46px;
  background: linear-gradient(180deg, #A86024 0%, #7C3F13 50%, #522709 100%);
  border: 3.5px solid #421D05;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    0 5px 0 #2A1002,
    0 9px 16px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

.tut-title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: #FFFFFF;
  letter-spacing: 1px;
  text-shadow: 
    -1.5px -1.5px 0 #3E1A04,
     1.5px -1.5px 0 #3E1A04,
    -1.5px  1.5px 0 #3E1A04,
     1.5px  1.5px 0 #3E1A04,
     0px 3px 5px rgba(0, 0, 0, 0.6);
  margin: 0;
  line-height: 1;
}

/* 3D Red Circular Close Button */
.tut-close-btn {
  position: absolute;
  top: -16px;
  right: -10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #EF4444 0%, #DC2626 50%, #991B1B 100%);
  border: 3.5px solid #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 3px 0 rgba(255, 255, 255, 0.8),
    0 5px 0 #5C0A0A,
    0 8px 14px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s var(--spring-easing);
  z-index: 30;
}

.tut-close-btn:active {
  transform: translateY(3px);
}

.tut-close-btn span {
  font-family: var(--font-heading);
  font-size: 20px;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  line-height: 1;
}

/* 3 Tutorial Step Rows */
.tut-steps-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 8px;
}

.tut-step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.tut-step-thumb {
  width: 128px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.tut-step-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tut-step-text {
  font-family: var(--font-heading);
  font-size: 13px;
  color: #3B1B06;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Footer: Dots & 3D Next Button */
.tut-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-left: 36%;
  margin-top: 4px;
}

.tut-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tut-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #C4A170;
  border: 2px solid #A88150;
  opacity: 0.65;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tut-dot.active {
  background: #FFFFFF;
  border: 2.5px solid #64748B;
  opacity: 1;
  width: 14px;
  height: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

.tut-next-btn-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8EE635 0%, #5CB918 50%, #3B8C0A 100%);
  border: 3.5px solid #DCFCE7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 3px 0 rgba(255, 255, 255, 0.8),
    0 5px 0 #205705,
    0 8px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s var(--spring-easing);
  margin-right: 4px;
}

.tut-next-btn-circle:active {
  transform: translateY(3px);
}

.tut-next-btn-circle span {
  font-size: 24px;
  color: #FFFFFF;
  font-weight: 900;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  line-height: 1;
}

/* ==========================================================================
   CROSS-DEVICE RESPONSIVE ENGINE STYLES (MOBILE, TABLET & DESKTOP)
   ========================================================================== */

/* 1. COMPACT PHONES (<= 480px Width OR <= 720px Height) */
@media (max-width: 480px), (max-height: 720px) {
  .start-content {
    padding-top: clamp(12px, 2.5vh, 32px);
    padding-bottom: clamp(8px, 1.5vh, 16px);
    gap: clamp(2px, 0.6vh, 6px);
    justify-content: center;
  }
  .game-logo-container {
    flex: 0 0 auto;
    margin-bottom: 2px;
  }
  .main-logo-img {
    width: clamp(140px, 44vw, 220px);
    max-height: clamp(60px, 14vh, 110px);
  }
  .start-menu-buttons {
    gap: clamp(3px, 0.6vh, 6px);
    flex: 0 0 auto;
  }
  .btn-pill {
    height: clamp(32px, 4.0vh, 42px);
    font-size: clamp(12px, 3.4vw, 16px);
    max-width: 280px;
  }
  .bottom-quick-bar-left {
    position: static;
    margin-top: 4px;
    gap: 12px;
    justify-content: center;
    width: 100%;
  }
  .icon-btn-orange {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  #screen-game {
    padding: clamp(8px, 1.5vh, 14px) 8px 6px;
    gap: 4px;
  }
  .game-header {
    gap: 4px;
  }
  .game-box {
    padding: 2px 5px;
    border-radius: 12px;
    border-width: 2px;
  }
  .box-label {
    font-size: 9px;
  }
  .box-value {
    font-size: 16px;
  }
  .icon-btn-pause {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .target-badge-bar {
    font-size: 12px;
    padding: 3px 14px;
    margin: 2px auto;
  }
  .grid-container {
    gap: 3px;
  }
  .fruit-cell {
    border-radius: 10px;
  }
  .booster-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }
  .booster-btn img {
    width: 22px;
    height: 22px;
  }
  .booster-badge {
    font-size: 9px;
    width: 16px;
    height: 16px;
  }
  .boosters-bar {
    gap: 6px;
    padding-bottom: 2px;
  }
}

/* 2. TABLET MODE (Portrait & Landscape: 601px - 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
  body:not(.layout-landscape) #app-container {
    border-radius: 32px;
    border: 4px solid var(--wood-gold-stroke);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(132, 204, 22, 0.4);
  }

  body:not(.layout-landscape) #screen-start .start-content {
    gap: clamp(12px, 2.5vh, 24px);
    padding: clamp(20px, 4vh, 48px) clamp(24px, 5vw, 48px) clamp(16px, 3.2vh, 32px);
    justify-content: center;
  }

  body:not(.layout-landscape) .main-logo-img {
    width: clamp(200px, 54vw, 360px);
    max-height: clamp(90px, 20vh, 170px);
  }

  body:not(.layout-landscape) .start-menu-buttons {
    max-width: 440px;
    gap: clamp(10px, 2vh, 18px);
  }

  body:not(.layout-landscape) .btn-pill-hero {
    height: clamp(52px, 8vh, 66px) !important;
    font-size: clamp(20px, 4vw, 28px) !important;
    box-shadow:
      inset 0 5px 0 rgba(255,255,255,0.7),
      inset 0 -5px 0 rgba(0,0,0,0.3),
      0 7px 0 #14532d,
      0 12px 28px rgba(0, 0, 0, 0.7),
      0 0 36px rgba(74, 222, 128, 0.45) !important;
  }

  body:not(.layout-landscape) .start-menu-grid {
    gap: clamp(8px, 1.5vw, 14px);
  }

  body:not(.layout-landscape) .start-menu-grid .btn-pill {
    height: clamp(46px, 7.5vh, 58px) !important;
    font-size: clamp(14px, 2.5vw, 18px) !important;
    border-radius: 18px;
  }

  body:not(.layout-landscape) .bottom-quick-bar-left .icon-btn-orange {
    width: clamp(44px, 6.5vw, 56px);
    height: clamp(44px, 6.5vw, 56px);
    font-size: clamp(18px, 2.5vw, 24px);
  }

  #screen-game {
    padding: 16px 24px 14px;
  }

  .game-header {
    gap: 14px;
  }

  .game-box {
    padding: 6px 16px;
    border-radius: 20px;
    border-width: 3px;
  }

  .box-label {
    font-size: 14px;
  }

  .box-value {
    font-size: 26px;
  }

  .grid-container {
    gap: 7px;
  }

  .fruit-cell {
    border-radius: 18px;
  }

  .booster-btn {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  .booster-btn img {
    width: 38px;
    height: 38px;
  }

  .settings-wood-card {
    max-width: 540px;
  }

  .settings-action-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* 3. DESKTOP SCREENS (>= 1025px) */
@media (min-width: 1025px) {
  .btn-pill:hover,
  .btn-3d:hover,
  .settings-btn:hover,
  .booster-btn:hover,
  .icon-btn-orange:hover,
  .icon-btn-pause:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
  }
}

/* ==========================================================================
   4. ULTRA-PREMIUM FULLSCREEN LANDSCAPE ENGINE — PC & TABLET
   ========================================================================== */

body.layout-landscape {
  background: #010d06;
  margin: 0;
  padding: 0;
}

body.layout-landscape #app-container {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background-size: cover;
  background-position: center;
  overflow: hidden !important;
  position: relative !important;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATED STAR-PARTICLES BACKGROUND LAYER (CSS-only)
═══════════════════════════════════════════════════════════════ */
body.layout-landscape #app-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 8% 12%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 22% 45%, rgba(255,255,200,0.45) 0%, transparent 100%),
    radial-gradient(2px 2px at 35% 8%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 48% 72%, rgba(200,255,200,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 62% 25%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(2px 2px at 78% 55%, rgba(255,220,180,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 15%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 15% 80%, rgba(180,255,180,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 93% 82%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 93%, rgba(255,200,200,0.4) 0%, transparent 100%);
  animation: starsShimmer 6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes starsShimmer {
  0%   { opacity: 0.4; }
  100% { opacity: 1.0; }
}

/* ═══════════════════════════════════════════════════════════════
   START SCREEN OUTER LAYOUT
═══════════════════════════════════════════════════════════════ */
body.layout-landscape #screen-start {
  overflow: hidden !important;
  position: relative !important;
}

body.layout-landscape .start-content {
  flex-direction: row !important;
  justify-content: stretch !important;
  align-items: stretch !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  height: 100% !important;
  width: 100% !important;
  position: relative !important;
  z-index: 1 !important;
}

/* ═══════════════════════════════════════════════════════════════
   LEFT PANEL — CINEMATIC HERO SHOWCASE
═══════════════════════════════════════════════════════════════ */
body.layout-landscape .game-logo-container {
  flex: 0 0 44% !important;
  max-width: 44% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: clamp(40px, 6vh, 90px) clamp(28px, 4vw, 64px) clamp(80px, 10vh, 110px) !important;
  background:
    linear-gradient(170deg,
      rgba(0, 40, 18, 0.92) 0%,
      rgba(0, 60, 25, 0.80) 40%,
      rgba(0, 30, 12, 0.70) 75%,
      rgba(0, 0, 0, 0.40) 100%
    ) !important;
  backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.4) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  position: relative !important;
  box-sizing: border-box !important;
  gap: clamp(18px, 3.2vh, 36px) !important;
  overflow: hidden !important;
}

/* Radial ambient glow behind logo */
body.layout-landscape .game-logo-container::after {
  content: '';
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72%;
  height: 55%;
  background: radial-gradient(ellipse at center,
    rgba(74, 222, 128, 0.22) 0%,
    rgba(250, 204, 21, 0.10) 45%,
    transparent 75%
  );
  border-radius: 50%;
  animation: ambientPulse 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.0); }
  50%       { opacity: 1.0; transform: translate(-50%, -50%) scale(1.18); }
}

/* Ornate top-left corner flourish */
body.layout-landscape .game-logo-container::before {
  content: '✦ FRUIT BLASTER ✦';
  position: absolute;
  top: clamp(20px, 3.8vh, 38px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: clamp(9px, 0.9vw, 12px);
  font-weight: 900;
  letter-spacing: clamp(4px, 0.7vw, 9px);
  color: rgba(250, 204, 21, 0.65);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.5);
  z-index: 2;
}

/* Glowing separator lines top & bottom of left panel */
body.layout-landscape .game-logo-container .main-logo-img {
  width: 90% !important;
  max-width: 430px !important;
  max-height: min(42vh, 270px) !important;
  height: auto !important;
  object-fit: contain !important;
  filter:
    drop-shadow(0 8px 20px rgba(0,0,0,0.95))
    drop-shadow(0 0 30px rgba(74,222,128,0.4))
    drop-shadow(0 0 60px rgba(74,222,128,0.20)) !important;
  animation: logoCinema 5s ease-in-out infinite !important;
  position: relative !important;
  z-index: 2 !important;
}

@keyframes logoCinema {
  0%,100% {
    transform: translateY(0px) scale(1.0);
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.95)) drop-shadow(0 0 30px rgba(74,222,128,0.40));
  }
  50% {
    transform: translateY(-10px) scale(1.015);
    filter: drop-shadow(0 22px 38px rgba(0,0,0,0.95)) drop-shadow(0 0 55px rgba(74,222,128,0.70)) drop-shadow(0 0 90px rgba(74,222,128,0.25));
  }
}

/* Tagline badge at bottom of left panel */
body.layout-landscape .bottom-quick-bar-left {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  z-index: 20 !important;
}

/* Tagline strip above quick buttons */
body.layout-landscape .bottom-quick-bar-left::before {
  content: '🍓  MATCH  ·  BLAST  ·  WIN  🍊';
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(9px, 0.9vw, 12px);
  letter-spacing: clamp(2px, 0.4vw, 6px);
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  padding: clamp(10px, 1.8vh, 18px) 0 clamp(8px, 1.4vh, 14px);
  border-top: 1px solid rgba(255,255,255,0.10);
  width: 100%;
  text-align: center;
}

/* Quick control buttons row */
body.layout-landscape .bottom-quick-bar-left .icon-btn-orange {
  display: none !important; /* moved below as part of a flex row */
}

/* Show all quick btns inline */
body.layout-landscape .bottom-quick-bar-left {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(8px, 1.4vw, 16px) !important;
  padding: clamp(14px, 2.5vh, 24px) clamp(20px, 3vw, 36px) clamp(18px, 3.2vh, 30px) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  background: linear-gradient(0deg, rgba(0,0,0,0.35), transparent) !important;
}

body.layout-landscape .bottom-quick-bar-left::before {
  content: '';
  display: none;
}

body.layout-landscape .bottom-quick-bar-left .icon-btn-orange {
  display: flex !important;
  width: clamp(40px, 4.5vh, 52px) !important;
  height: clamp(40px, 4.5vh, 52px) !important;
  font-size: clamp(16px, 1.7vw, 21px) !important;
  border-width: 2px !important;
}

/* Right-edge glowing divider */
body.layout-landscape .game-logo-container > *:not(.main-logo-img):not(.bottom-quick-bar-left) {
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════
   RIGHT PANEL — ULTRA-PREMIUM GAME LOBBY
═══════════════════════════════════════════════════════════════ */
body.layout-landscape .start-menu-buttons {
  flex: 1 1 56% !important;
  max-width: 56% !important;
  height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: clamp(60px, 8.5vh, 100px) clamp(36px, 5vw, 88px) clamp(28px, 4.5vh, 60px) !important;
  box-sizing: border-box !important;
  gap: clamp(14px, 2.2vh, 26px) !important;
  background:
    linear-gradient(160deg,
      rgba(0, 0, 0, 0.08) 0%,
      rgba(0, 15, 6, 0.25) 100%
    ) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Top ornament header inside right panel */
body.layout-landscape .start-menu-buttons::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(52px, 8vh, 80px);
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0.50) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

body.layout-landscape .start-menu-buttons::after {
  content: '✦  SELECT YOUR GAME MODE  ✦';
  position: absolute;
  top: clamp(18px, 3.2vh, 32px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: clamp(9px, 0.88vw, 12px);
  font-weight: 900;
  letter-spacing: clamp(3px, 0.55vw, 8px);
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  z-index: 1;
}

/* ═══ HERO PLAY BUTTON ═══ */
body.layout-landscape .btn-pill-hero {
  width: min(500px, 88%) !important;
  height: clamp(58px, 9.5vh, 82px) !important;
  font-size: clamp(24px, 2.8vw, 36px) !important;
  letter-spacing: 4px !important;
  border-radius: 60px !important;
  border: 3px solid rgba(255, 255, 255, 0.9) !important;
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg,
    #86efac 0%, #4ade80 18%, #22c55e 48%, #16a34a 80%, #15803d 100%
  ) !important;
  box-shadow:
    inset 0 6px 0 rgba(255,255,255,0.75),
    inset 0 -6px 0 rgba(0,0,0,0.30),
    0 10px 0 #14532d,
    0 18px 40px rgba(0,0,0,0.80),
    0 0 0 4px rgba(74,222,128,0.20),
    0 0 50px rgba(74,222,128,0.55) !important;
  animation: playPulseUltra 3s ease-in-out infinite !important;
  z-index: 2 !important;
}

/* Shine sweep on PLAY button */
body.layout-landscape .btn-pill-hero::after {
  content: '';
  position: absolute;
  top: 0; left: -110%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  animation: playShine 3.5s ease-in-out infinite;
  border-radius: inherit;
}

@keyframes playShine {
  0%   { left: -110%; }
  40%  { left: 120%; }
  100% { left: 120%; }
}

@keyframes playPulseUltra {
  0%,100% {
    box-shadow: inset 0 6px 0 rgba(255,255,255,0.75), inset 0 -6px 0 rgba(0,0,0,0.30), 0 10px 0 #14532d, 0 18px 40px rgba(0,0,0,0.80), 0 0 0 4px rgba(74,222,128,0.20), 0 0 36px rgba(74,222,128,0.45);
    transform: translateY(0);
  }
  50% {
    box-shadow: inset 0 6px 0 rgba(255,255,255,0.75), inset 0 -6px 0 rgba(0,0,0,0.30), 0 10px 0 #14532d, 0 24px 50px rgba(0,0,0,0.85), 0 0 0 6px rgba(74,222,128,0.30), 0 0 70px rgba(74,222,128,0.80);
    transform: translateY(-2px);
  }
}

/* ═══ 3-COLUMN FEATURE GRID ═══ */
body.layout-landscape .start-menu-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  grid-template-rows: auto auto !important;
  gap: clamp(10px, 1.5vw, 18px) !important;
  width: min(560px, 92%) !important;
  z-index: 2 !important;
}

body.layout-landscape .start-menu-grid .btn-pill {
  height: clamp(52px, 7.8vh, 70px) !important;
  font-size: clamp(12px, 1.2vw, 16px) !important;
  letter-spacing: 0.5px !important;
  border-radius: 20px !important;
  border-width: 2.5px !important;
  border-style: solid !important;
  flex-direction: column !important;
  gap: 1px !important;
  padding: 8px 6px !important;
  position: relative !important;
  overflow: hidden !important;
  transition:
    transform 0.16s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.16s ease,
    filter 0.16s ease !important;
}

/* Premium inner highlight on each feature button */
body.layout-landscape .start-menu-grid .btn-pill::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, transparent 100%);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}

/* Shine on hover */
body.layout-landscape .start-menu-grid .btn-pill::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 55%; height: 100%;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%);
  transition: left 0.4s ease;
  border-radius: inherit;
  pointer-events: none;
}

body.layout-landscape .start-menu-grid .btn-pill:hover {
  transform: translateY(-5px) scale(1.05) !important;
  filter: brightness(1.18) saturate(1.15) !important;
}

body.layout-landscape .start-menu-grid .btn-pill:hover::after {
  left: 120%;
}

body.layout-landscape .start-menu-grid .btn-pill:active {
  transform: translateY(3px) scale(0.96) !important;
  filter: brightness(0.95) !important;
}

/* ─── LANDSCAPE GAMEPLAY ARENA ─── */
body.layout-landscape #screen-game {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: clamp(10px, 1.8vh, 22px) clamp(12px, 2.5vw, 44px) !important;
  gap: clamp(12px, 2vw, 32px) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* LEFT HUD Glass Panel */
body.layout-landscape .game-hud-panel {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: clamp(8px, 1.5vh, 16px) !important;
  width: min(22vw, 220px) !important;
  flex-shrink: 0 !important;
  z-index: 10 !important;
  background: linear-gradient(180deg, rgba(0,30,15,0.82), rgba(0,20,10,0.75)) !important;
  border-radius: clamp(18px, 2vw, 28px) !important;
  border: 1.5px solid rgba(255,255,255,0.12) !important;
  padding: clamp(14px, 2.2vh, 24px) clamp(12px, 1.6vw, 20px) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(var(--glass-blur, 14px)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) !important;
}

body.layout-landscape .game-hud-panel .game-header {
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(6px, 1.2vh, 12px) !important;
  width: 100% !important;
}

body.layout-landscape .game-hud-panel .game-box {
  width: 100% !important;
  padding: clamp(6px, 1.1vh, 12px) clamp(10px, 1.4vw, 16px) !important;
  border-radius: 14px !important;
  border-width: 2.5px !important;
  box-sizing: border-box !important;
}

body.layout-landscape .game-hud-panel .box-label {
  font-size: clamp(10px, 1.1vw, 13px) !important;
}

body.layout-landscape .game-hud-panel .box-value {
  font-size: clamp(20px, 2.2vw, 30px) !important;
}

body.layout-landscape .game-hud-panel .icon-btn-pause {
  width: clamp(44px, 5.2vh, 58px) !important;
  height: clamp(44px, 5.2vh, 58px) !important;
  font-size: clamp(18px, 1.9vw, 24px) !important;
  margin: 4px auto 0 !important;
  display: block !important;
}

body.layout-landscape .game-hud-panel .target-badge-bar {
  width: 100% !important;
  padding: clamp(5px, 1vh, 9px) clamp(8px, 1.2vw, 14px) !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: clamp(11px, 1.2vw, 14px) !important;
  margin: 0 !important;
  flex-wrap: wrap !important;
}

body.layout-landscape .game-hud-panel .challenge-hud-banner,
body.layout-landscape .game-hud-panel .zen-hud-badge,
body.layout-landscape .game-hud-panel .fever-hud-badge {
  font-size: clamp(9px, 1vw, 12px) !important;
  padding: 4px 8px !important;
}

/* CENTER Board */
body.layout-landscape .board-wrapper {
  width: var(--board-size) !important;
  height: var(--board-size) !important;
  margin: 0 !important;
  border-width: clamp(5px, 0.8vw, 8px) !important;
  border-radius: clamp(20px, 2.2vw, 34px) !important;
  flex-shrink: 0 !important;
}

/* RIGHT Boosters Glass Panel */
body.layout-landscape .game-boosters-panel {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: min(17vw, 152px) !important;
  flex-shrink: 0 !important;
  z-index: 10 !important;
  background: linear-gradient(180deg, rgba(0,30,15,0.82), rgba(0,20,10,0.75)) !important;
  border-radius: clamp(18px, 2vw, 28px) !important;
  border: 1.5px solid rgba(255,255,255,0.12) !important;
  padding: clamp(14px, 2.2vh, 24px) clamp(12px, 1.6vw, 20px) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(var(--glass-blur, 14px)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) !important;
}

body.layout-landscape .game-boosters-panel .boosters-bar {
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(10px, 1.8vh, 18px) !important;
  padding: 0 !important;
  width: auto !important;
  align-items: center !important;
}

body.layout-landscape .game-boosters-panel .booster-btn {
  width: clamp(54px, 7vh, 76px) !important;
  height: clamp(54px, 7vh, 76px) !important;
  border-radius: clamp(16px, 1.8vw, 22px) !important;
  transition: transform 0.14s var(--spring-easing), filter 0.14s ease !important;
}

body.layout-landscape .game-boosters-panel .booster-btn:hover {
  transform: scale(1.12) !important;
  filter: brightness(1.18) !important;
}

body.layout-landscape .game-boosters-panel .booster-btn img {
  width: clamp(34px, 4.5vh, 50px) !important;
  height: clamp(34px, 4.5vh, 50px) !important;
}

body.layout-landscape .game-boosters-panel .booster-badge {
  font-size: clamp(11px, 1.2vw, 14px) !important;
  width: clamp(22px, 2.5vh, 28px) !important;
  height: clamp(22px, 2.5vh, 28px) !important;
}

/* Landscape Mode: Center Level Select Screen & Header */
body.layout-landscape #screen-levels {
  align-items: center !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

body.layout-landscape #screen-levels .levels-header {
  max-width: 620px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  right: auto !important;
  width: 92% !important;
}

body.layout-landscape #screen-levels .map-scroll-area {
  max-width: 600px !important;
  margin: clamp(90px, 12vh, 120px) auto 0 !important;
}

body.layout-landscape #global-bar {
  max-width: 620px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  right: auto !important;
  width: 92% !important;
}

body.layout-landscape .modal-card {
  max-height: min(92vh, 640px) !important;
}

/* ==========================================================================
   5. CALIBRATED HARDWARE PERFORMANCE TIERS (LOW, MEDIUM, HIGH)
   ========================================================================== */

/* ─── TIER 1: ULTRA-LOW PERFORMANCE (1GB RAM & WEAK GPUs) ─── */
body.perf-tier-low {
  --spring-easing: ease-out;
}

body.perf-tier-low #app-container::before {
  opacity: 0.25;
}

/* ─── TIER 3: HIGH & CINEMATIC (FLAGSHIP MOBILE & PC GAMING) ─── */
body.perf-tier-high .btn-pill:hover,
body.perf-tier-high .booster-btn:hover {
  transform: translateY(-4px) scale(1.06) !important;
  filter: brightness(1.22) drop-shadow(0 0 16px rgba(74,222,128,0.5)) !important;
}

body.perf-tier-high .board-wrapper {
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 45px rgba(74, 222, 128, 0.35) !important;
}

/* ==========================================================================
   SPECIAL COMBO FRUITS, LASERS & ICE OBSTACLES
   ========================================================================== */

.special-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-line_h, .badge-line_v {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border: 1.5px solid #fef08a;
}

.badge-rainbow {
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6, #10b981, #f59e0b);
  border: 1.5px solid #ffffff;
  animation: rainbowSpin 3s linear infinite;
}

.badge-bomb {
  background: radial-gradient(circle, #ef4444, #7f1d1d);
  border: 1.5px solid #fca5a5;
  animation: bombPulse 1.2s infinite ease-in-out;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes rainbowSpin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes bombPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* LASER BEAM EFFECT */
.laser-beam {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  border-radius: 10px;
  background: linear-gradient(90deg, transparent, #fff, #fef08a, #f59e0b, #fff, transparent);
  box-shadow: 0 0 20px #fef08a, 0 0 40px #f59e0b;
  animation: laserFlash 0.35s ease-out forwards;
}

@keyframes laserFlash {
  0% { opacity: 0; transform: scale(0.2); }
  40% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1); }
}

/* ICE OBSTACLE TILES */
.ice-layer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  transition: all 0.3s ease;
}

.ice-level-1 {
  background: rgba(186, 230, 253, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 10px rgba(125, 211, 252, 0.7);
}

.ice-level-2 {
  background: rgba(125, 211, 252, 0.75);
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 14px rgba(56, 189, 248, 0.9);
}

.ice-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #bae6fd;
  border: 1px solid #fff;
  box-shadow: 0 0 6px #7dd3fc;
  border-radius: 2px;
  pointer-events: none;
  z-index: 25;
  animation: particleFly 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* SMART IDLE HINT PULSE */
.hint-pulse {
  animation: fruitHintPulse 1s infinite alternate ease-in-out !important;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.85) !important;
  border-color: #fde047 !important;
  z-index: 10;
}

@keyframes fruitHintPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.14); }
}

/* MISSION GOAL CHIPS IN HUD */
.mission-goals-chips {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mission-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  font-family: var(--font-heading);
  font-size: 14px;
  color: #ffffff;
  font-weight: 800;
  transition: all 0.3s ease;
}

.mission-chip.completed {
  background: rgba(34, 197, 94, 0.4);
  border-color: #4ade80;
  color: #86efac;
}

.chip-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.chip-icon-text {
  font-size: 16px;
}

/* SOCIAL SHARE BUTTON & REWARDED AD BUTTONS */
.win-btn-share {
  background: linear-gradient(180deg, #25d366 0%, #128c7e 100%) !important;
  box-shadow: 0 5px 0 #0b5e54, 0 8px 12px rgba(37, 211, 102, 0.35) !important;
  color: #ffffff !important;
}

.fail-btn-gold {
  background: linear-gradient(180deg, #facc15 0%, #eab308 50%, #ca8a04 100%) !important;
  color: #451a03 !important;
  box-shadow: 0 5px 0 #854d0e, 0 8px 12px rgba(234, 179, 8, 0.4) !important;
  font-size: 15px !important;
}

.btn-pill-gold {
  background: linear-gradient(180deg, #fde047 0%, #eab308 50%, #ca8a04 100%) !important;
  color: #451a03 !important;
  box-shadow: 0 6px 0 #854d0e, 0 10px 16px rgba(234, 179, 8, 0.4) !important;
}

/* REWARDED AD MODAL */
.ad-reward-card {
  max-width: 320px;
  text-align: center;
  padding: 22px 18px;
}

.ad-video-mockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 20px 16px;
  margin-top: 14px;
}

.ad-tv-icon {
  font-size: 48px;
  animation: tvPulse 1.2s infinite alternate ease-in-out;
  margin-bottom: 8px;
}

@keyframes tvPulse {
  0% { transform: scale(1); filter: drop-shadow(0 2px 6px rgba(250, 204, 21, 0.4)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 4px 14px rgba(250, 204, 21, 0.8)); }
}

.ad-status-text {
  font-family: var(--font-heading);
  font-size: 14px;
  color: #fde047;
  letter-spacing: 0.5px;
}

.ad-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ad-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #eab308);
  transition: width 0.3s ease;
}

/* LEADERBOARD LIST */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 6px;
  scrollbar-width: thin;
  scrollbar-color: #fde047 rgba(0, 0, 0, 0.4);
}

.leaderboard-list::-webkit-scrollbar {
  width: 5px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: #fde047;
  border-radius: 10px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.22);
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-heading);
  font-size: 15px;
  color: #ffffff;
}

.leaderboard-row.you-row {
  background: rgba(234, 179, 8, 0.25);
  border: 1.5px solid #facc15;
  color: #fef08a;
}

.lb-rank {
  font-weight: 900;
  width: 60px;
}

.lb-name {
  flex: 1;
  text-align: left;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-stars {
  font-size: 13px;
  color: #fde047;
  margin-right: 12px;
}

.lb-score {
  font-size: 16px;
  color: #4ade80;
}

/* FLOATING TOAST NOTIFICATION */
.floating-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fef08a;
  border: 2px solid #eab308;
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  pointer-events: none;
}

/* ACTIVE BOOSTER PULSING EFFECT */
.booster-btn.active-booster {
  transform: scale(1.15) translateY(-4px);
  border: 3px solid #facc15 !important;
  box-shadow: 0 0 20px #facc15, 0 8px 16px rgba(0, 0, 0, 0.4) !important;
  animation: boosterPulse 1s ease-in-out infinite alternate;
}

@keyframes boosterPulse {
  0% { transform: scale(1.1) translateY(-2px); box-shadow: 0 0 12px #facc15; }
  100% { transform: scale(1.18) translateY(-5px); box-shadow: 0 0 24px #fef08a, 0 0 36px #eab308; }
}

/* TUTORIAL SLIDE TRANSITIONS */
.tut-slide {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tut-slide.active {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
}

.tut-dot {
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.tut-dot:hover {
  transform: scale(1.3);
}

.tut-next-btn-circle {
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tut-next-btn-circle:active {
  transform: scale(0.9);
}

/* ==========================================================================
   LUCKY SPIN WHEEL STYLING & ANIMATIONS
   ========================================================================== */

.btn-pill-pink {
  background: linear-gradient(180deg, #ec4899 0%, #db2777 50%, #be185d 100%);
  border-color: #fbcfe8;
  box-shadow: 0 6px 0 #9d174d, 0 10px 18px rgba(0, 0, 0, 0.45);
  position: relative;
}

.btn-pill-pink:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #9d174d, 0 4px 8px rgba(0, 0, 0, 0.45);
}

.btn-badge-free {
  position: absolute;
  right: -8px;
  top: -8px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 12px;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  animation: badgeBounce 1.2s ease-in-out infinite alternate;
}

@keyframes badgeBounce {
  0% { transform: scale(1) rotate(-6deg); }
  100% { transform: scale(1.15) rotate(6deg); }
}

.lucky-spin-card {
  max-width: 380px;
  padding-bottom: 24px;
}

.lucky-wheel-wrapper {
  position: relative;
  width: 290px;
  height: 290px;
  margin: 10px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-ticker-pin {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  font-size: 26px;
  color: #facc15;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.8), 0 0 10px #f59e0b;
  transform-origin: 50% 10%;
  pointer-events: none;
}

.wheel-ticker-pin.ticking {
  animation: tickerWobble 0.15s ease-in-out;
}

@keyframes tickerWobble {
  0% { transform: translateX(-50%) rotate(0deg); }
  50% { transform: translateX(-50%) rotate(-18deg); }
  100% { transform: translateX(-50%) rotate(0deg); }
}

.wheel-bezel {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, #78350f 0%, #451a03 100%);
  padding: 8px;
  border: 6px solid #facc15;
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.8), 0 12px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

#lucky-wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  will-change: transform;
}

.wheel-center-hub {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fef08a, #eab308 50%, #ca8a04 100%);
  border: 4px solid #ffffff;
  box-shadow: 0 0 15px rgba(254, 240, 138, 0.8), 0 6px 14px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  user-select: none;
}

.wheel-center-hub:hover {
  transform: scale(1.08);
  box-shadow: 0 0 22px #fef08a, 0 8px 18px rgba(0, 0, 0, 0.7);
}

.wheel-center-hub:active {
  transform: scale(0.94);
}

.wheel-center-hub.spinning-hub {
  pointer-events: none;
  opacity: 0.85;
}

.hub-text {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  color: #78350f;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
}

.spin-footer-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.spin-status-banner {
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 18px;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #fef08a;
}

/* REWARD CELEBRATION MODAL */
.reward-celebration-card {
  max-width: 340px;
  text-align: center;
  padding: 24px 20px;
}

.spin-reward-visual {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reward-icon-burst {
  font-size: 64px;
  margin-bottom: 8px;
  animation: rewardPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

@keyframes rewardPop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  70% { transform: scale(1.3) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.reward-item-title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: #facc15;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0;
}

.reward-item-desc {
  font-size: 14px;
  color: #ffffff;
  margin: 4px 0 0;
  opacity: 0.9;
}

/* UNLIMITED LIVES GOLDEN HEART GLOW */
.hearts-pill.unlimited-lives {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.5), rgba(202, 138, 4, 0.6)) !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 16px #facc15 !important;
  animation: goldenHeartPulse 1.5s ease-in-out infinite alternate;
}

@keyframes goldenHeartPulse {
  0% { box-shadow: 0 0 10px #facc15; }
  100% { box-shadow: 0 0 22px #fef08a, 0 0 30px #eab308; }
}

/* ==========================================================================
   JUICE FEVER MODE (2X MULTIPLIER & RAINBOW EFFECTS)
   ========================================================================== */

.fever-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ef4444, #f59e0b, #ec4899);
  padding: 6px 18px;
  border-radius: 20px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.8), 0 4px 10px rgba(0, 0, 0, 0.5);
  margin: 4px auto 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  animation: feverPulse 0.8s ease-in-out infinite alternate;
}

@keyframes feverPulse {
  0% { transform: scale(0.96); box-shadow: 0 0 12px rgba(239, 68, 68, 0.8); }
  100% { transform: scale(1.05); box-shadow: 0 0 24px rgba(245, 158, 11, 1), 0 0 36px rgba(236, 72, 153, 0.8); }
}

.fever-flame-anim {
  display: inline-block;
  animation: flameWiggle 0.5s ease-in-out infinite alternate;
}

@keyframes flameWiggle {
  0% { transform: rotate(-8deg) scale(1); }
  100% { transform: rotate(8deg) scale(1.2); }
}

.board-wrapper.fever-active {
  border-color: #f43f5e !important;
  box-shadow: 0 0 30px #f43f5e, 0 0 60px #eab308, inset 0 0 25px rgba(244, 63, 94, 0.6) !important;
  animation: rainbowBorder 2s linear infinite;
}

@keyframes rainbowBorder {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.fruit-cell.fever-fruit {
  box-shadow: 0 0 12px #facc15, inset 0 0 8px #f43f5e !important;
}

/* ==========================================================================
   DAILY QUESTS & TROPHIES MODAL STYLING
   ========================================================================== */

.btn-pill-cyan {
  background: linear-gradient(180deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
  border-color: #a5f3fc;
  box-shadow: 0 6px 0 #155e75, 0 10px 18px rgba(0, 0, 0, 0.45);
  position: relative;
}

.btn-pill-cyan:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #155e75, 0 4px 8px rgba(0, 0, 0, 0.45);
}

.quests-card {
  max-width: 420px;
  padding-bottom: 20px;
}

.quest-tabs-header {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 10px 0 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.quest-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quest-tab-btn.active {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.quests-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #fde047 rgba(0, 0, 0, 0.4);
}

.quests-items-list::-webkit-scrollbar {
  width: 5px;
}

.quests-items-list::-webkit-scrollbar-thumb {
  background: #fde047;
  border-radius: 10px;
}

.quest-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px 14px;
  transition: border-color 0.2s ease;
}

.quest-item-row.completed {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.quest-item-icon {
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.quest-item-info {
  flex: 1;
  text-align: left;
}

.quest-item-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 3px;
}

.quest-item-desc {
  font-size: 12px;
  color: #fde047;
  margin-bottom: 6px;
}

.quest-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #10b981);
  transition: width 0.3s ease;
}

.quest-progress-text {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 2px;
  display: block;
}

.quest-claim-btn {
  padding: 6px 14px;
  border-radius: 12px;
  border: 1.5px solid #ffffff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease;
  white-space: nowrap;
}

.quest-claim-btn.ready {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
  animation: claimPulse 1.2s infinite alternate;
}

.quest-claim-btn.ready:active {
  transform: scale(0.94);
}

.quest-claim-btn.claimed {
  background: rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.2);
  cursor: default;
}

.quest-claim-btn.in-progress {
  background: rgba(0, 0, 0, 0.3);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.2);
  cursor: default;
}

@keyframes claimPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); box-shadow: 0 0 18px #4ade80; }
}

/* ==========================================================================
   PHASE 2 OBSTACLES & LEVEL VARIETIES STYLING
   ========================================================================== */

/* 1. VINES / LOCKED FRUITS */
.vines-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  border-radius: 14px;
  border: 3.5px dashed #22c55e;
  box-shadow: inset 0 0 12px rgba(21, 128, 61, 0.9), 0 0 8px rgba(34, 197, 94, 0.7);
  background: radial-gradient(circle, transparent 40%, rgba(20, 83, 45, 0.3) 100%);
}

.vines-layer::before {
  content: '🌿';
  position: absolute;
  top: -6px;
  left: -6px;
  font-size: 16px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.vines-layer::after {
  content: '🌿';
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-size: 16px;
  transform: rotate(180deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.fruit-cell.has-vines .fruit-img {
  filter: brightness(0.85) saturate(0.8);
}

.vines-shake {
  animation: vinesLockedWiggle 0.35s ease-in-out;
}

@keyframes vinesLockedWiggle {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-4deg); }
  40% { transform: translateX(6px) rotate(4deg); }
  60% { transform: translateX(-4px) rotate(-2deg); }
  80% { transform: translateX(4px) rotate(2deg); }
}

/* 2. SOLID OBSTACLE BLOCKS (CRATE & STONE) */
.obstacle-block {
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-size: 26px;
  user-select: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.25);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.obstacle-crate {
  background: linear-gradient(135deg, #d97706, #92400e 45%, #78350f 100%);
  border: 2px solid #fde68a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.obstacle-stone {
  background: linear-gradient(135deg, #94a3b8, #475569 50%, #1e293b 100%);
  border: 2.5px solid #cbd5e1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8), inset 0 0 12px rgba(0, 0, 0, 0.6);
}

.obstacle-stone.damaged {
  border-color: #f87171;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.8), inset 0 0 14px rgba(239, 68, 68, 0.5);
  animation: damagedStoneJitter 0.2s ease infinite alternate;
}

@keyframes damagedStoneJitter {
  0% { transform: rotate(-1deg); }
  100% { transform: rotate(1deg); }
}

.crack-overlay {
  position: absolute;
  font-size: 16px;
  color: #f87171;
  text-shadow: 0 0 6px #ef4444;
  top: 2px;
  right: 2px;
}

/* 3. SPREADING HONEY / JAM */
.honey-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.45) 0%, rgba(217, 119, 6, 0.8) 100%);
  border: 2px solid #fbbf24;
  box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.9), 0 0 10px rgba(251, 191, 36, 0.6);
  animation: honeyGlow 2.5s infinite alternate ease-in-out;
}

.honey-layer::after {
  content: '🍯';
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 13px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

@keyframes honeyGlow {
  0% { box-shadow: inset 0 0 8px rgba(245, 158, 11, 0.6), 0 0 6px rgba(251, 191, 36, 0.4); }
  100% { box-shadow: inset 0 0 16px rgba(245, 158, 11, 1), 0 0 14px rgba(251, 191, 36, 0.85); }
}

/* 4. PORTAL PIPES */
.portal-marker {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2px;
  border: 2px solid var(--portal-color, #38bdf8);
  box-shadow: 0 0 14px var(--portal-color, #38bdf8), inset 0 0 10px var(--portal-color, #38bdf8);
  animation: portalSpinGlow 3s infinite linear;
}

.portal-vortex {
  font-size: 15px;
  animation: spinSlow 3s infinite linear;
}

.portal-tag {
  font-family: var(--font-heading);
  font-size: 9px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 6px;
  background: var(--portal-color, #38bdf8);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes portalSpinGlow {
  0%, 100% { filter: hue-rotate(0deg) brightness(1); }
  50% { filter: hue-rotate(45deg) brightness(1.25); }
}

.portal-warp-pulse {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #38bdf8;
  pointer-events: none;
  z-index: 30;
  animation: portalWarpExpand 0.4s ease-out forwards;
}

@keyframes portalWarpExpand {
  0% { transform: scale(0.2); opacity: 1; box-shadow: 0 0 20px #38bdf8; }
  100% { transform: scale(1.8); opacity: 0; box-shadow: 0 0 40px #a855f7; }
}

/* OBSTACLE BURST PARTICLES */
.leaf-particle {
  position: absolute;
  font-size: 16px;
  pointer-events: none;
  z-index: 25;
  animation: leafBurstAnim 0.48s ease-out forwards;
}

@keyframes leafBurstAnim {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--tx, 20px), var(--ty, 30px)) scale(0.2) rotate(var(--rot, 180deg)); opacity: 0; }
}

.wood-particle {
  position: absolute;
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, #d97706, #78350f);
  border-radius: 2px;
  pointer-events: none;
  z-index: 25;
  box-shadow: 0 0 6px #b45309;
  animation: debrisBurstAnim 0.45s ease-out forwards;
}

.stone-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #94a3b8, #334155);
  border-radius: 3px;
  pointer-events: none;
  z-index: 25;
  box-shadow: 0 0 6px #64748b;
  animation: debrisBurstAnim 0.45s ease-out forwards;
}

.honey-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #facc15, #d97706);
  border-radius: 50%;
  pointer-events: none;
  z-index: 25;
  box-shadow: 0 0 8px #f59e0b;
  animation: debrisBurstAnim 0.48s ease-out forwards;
}

@keyframes debrisBurstAnim {
  0% { transform: translate(0, 0) scale(1.2); opacity: 1; }
  100% { transform: translate(var(--tx, 25px), var(--ty, 35px)) scale(0.1); opacity: 0; }
}

/* ==========================================================================
   PHASE 3 & PHASE 4: SOCIAL, VIRAL & JUICY POLISH STYLES
   ========================================================================== */

/* 1. JUICY SCREEN SHAKE */
.screen-shake-light {
  animation: screenShakeLight 0.26s ease-in-out !important;
}

.screen-shake-heavy {
  animation: screenShakeHeavy 0.38s cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;
}

@keyframes screenShakeLight {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, -1px); }
}

@keyframes screenShakeHeavy {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(-6px, 5px) rotate(-1.5deg); }
  30% { transform: translate(7px, -6px) rotate(1.5deg); }
  45% { transform: translate(-5px, 4px) rotate(-1deg); }
  60% { transform: translate(5px, -3px) rotate(1deg); }
  75% { transform: translate(-3px, 2px) rotate(-0.5deg); }
}

/* 2. BACKDROP JUICE SPLATTERS */
.backdrop-splatter-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.juice-splatter {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.85;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  animation: splatterPopFade 5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes splatterPopFade {
  0% { transform: translate(-50%, -50%) scale(0.2) rotate(0deg); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.15) rotate(12deg); opacity: 0.9; }
  25% { transform: translate(-50%, -50%) scale(1) rotate(8deg); opacity: 0.85; }
  80% { opacity: 0.75; }
  100% { transform: translate(-50%, -50%) scale(0.9) rotate(8deg); opacity: 0; }
}

/* 3. CHALLENGE A FRIEND HUD BANNER */
.challenge-hud-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(135deg, #7c2d12, #c2410c, #ea580c);
  border: 2px solid #fdba74;
  border-radius: 18px;
  padding: 6px 14px;
  margin: 4px auto 6px;
  max-width: 94%;
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.7), 0 0 10px rgba(253, 186, 116, 0.5);
  font-family: var(--font-heading);
  color: #ffffff;
  animation: challengePulse 2s infinite alternate ease-in-out;
}

@keyframes challengePulse {
  0% { transform: scale(0.98); box-shadow: 0 2px 8px rgba(194, 65, 12, 0.6); }
  100% { transform: scale(1.02); box-shadow: 0 0 18px rgba(251, 146, 60, 0.9); }
}

.challenge-hud-text {
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.challenge-hud-delta {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: bold;
}

.challenge-hud-delta.ahead {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 0 8px #22c55e;
}

.challenge-hud-delta.behind {
  background: #dc2626;
  color: #ffffff;
}

/* 4. LEADERBOARD PROFILE & COUNTRY FLAG SELECTOR */
.leaderboard-profile-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.profile-flag-select {
  background: #1e293b;
  color: #ffffff;
  border: 1.5px solid #64748b;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 16px;
  cursor: pointer;
  outline: none;
}

.profile-name-input {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 6px 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  flex: 1;
  outline: none;
}

.profile-name-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 8px #f59e0b;
}

.weekly-tournament-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #fde68a;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.leaderboard-item.rank-1 {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.35), rgba(0, 0, 0, 0.4)) !important;
  border-color: #facc15 !important;
}

.leaderboard-item.rank-2 {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.35), rgba(0, 0, 0, 0.4)) !important;
  border-color: #cbd5e1 !important;
}

.leaderboard-item.rank-3 {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.35), rgba(0, 0, 0, 0.4)) !important;
  border-color: #d97706 !important;
}

.prize-pill {
  font-size: 11px;
  font-weight: 900;
  color: #fef08a;
  margin-left: 6px;
}

/* 5. ENDLESS ZEN MODE HUD & BUTTONS */
.btn-pill-teal {
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
  border: 2px solid #99f6e4;
  box-shadow: 0 5px 0 #115e59, 0 8px 16px rgba(15, 118, 110, 0.5);
  color: #ffffff;
}

.btn-pill-teal:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #115e59;
}

.zen-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0d9488, #059669);
  padding: 5px 16px;
  border-radius: 20px;
  border: 1.5px solid #a7f3d0;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  margin: 4px auto 6px;
  animation: zenBreathe 3s infinite alternate ease-in-out;
}

@keyframes zenBreathe {
  0% { transform: scale(0.97); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
  100% { transform: scale(1.03); box-shadow: 0 0 20px rgba(52, 211, 153, 0.85); }
}

.btn-whatsapp-revenge {
  background: linear-gradient(135deg, #22c55e, #15803d);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.7);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
}

/* ==========================================================================
   SUPER JUICE VISUAL EFFECTS & BOOSTER FUSION ENGINE (2026)
   ========================================================================== */

/* 1. Elastic Squash & Stretch Selection on Fruit Cells */
.fruit-cell {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s ease;
  will-change: transform;
}

.fruit-cell.selected {
  filter: drop-shadow(0 0 10px rgba(254, 240, 138, 0.95)) brightness(1.15);
  z-index: 10;
  animation: fruitSelectedPulse 0.6s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.fruit-cell.selected .fruit-img {
  animation: fruitSquashStretch 0.5s ease infinite alternate;
}

@keyframes fruitSelectedPulse {
  0% { transform: scale(1.14) translateY(-3px); }
  100% { transform: scale(1.22) translateY(-6px); }
}

@keyframes fruitSquashStretch {
  0% { transform: scale(1.08, 0.94); }
  100% { transform: scale(0.94, 1.1); }
}

.fruit-cell.fruit-squish {
  animation: fruitSquishBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fruitSquishBounce {
  0% { transform: scale(1, 1); }
  35% { transform: scale(1.3, 0.75); }
  65% { transform: scale(0.85, 1.2); }
  85% { transform: scale(1.08, 0.96); }
  100% { transform: scale(1, 1); }
}

/* Fusion Highlight on Special Booster Cells */
.fruit-cell.fusion-active {
  animation: fusionBeacon 0.4s infinite alternate ease-in-out;
  z-index: 25;
}

@keyframes fusionBeacon {
  0% {
    transform: scale(1.25) rotate(-6deg);
    filter: drop-shadow(0 0 16px #ec4899) brightness(1.3);
  }
  100% {
    transform: scale(1.38) rotate(6deg);
    filter: drop-shadow(0 0 28px #38bdf8) brightness(1.6);
  }
}

/* 2. Expanding Dynamic Shockwave Rings */
.shockwave-ring {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.1);
  border: 5px solid var(--ring-color, #facc15);
  box-shadow: 
    0 0 25px var(--ring-color, #facc15),
    inset 0 0 25px var(--ring-color, #facc15);
  animation: shockwaveExpand var(--duration, 0.65s) cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  z-index: 90;
}

@keyframes shockwaveExpand {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.1);
    border-width: 8px;
  }
  70% {
    opacity: 0.85;
    border-width: 4px;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
    border-width: 1px;
  }
}

/* 3. Screen Supernova Flash */
.supernova-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(244, 114, 182, 0.6) 40%, rgba(56, 189, 248, 0.3) 70%, transparent 100%);
  z-index: 85;
  animation: flashFade 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes flashFade {
  0% { opacity: 0; transform: scale(0.6); }
  20% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.3); }
}

/* 4. 3D Pop Fusion Banner */
.fusion-banner {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%) scale(0.2);
  pointer-events: none;
  z-index: 99;
  text-align: center;
  animation: fusionBannerPop 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.fusion-banner-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  padding: 10px 24px;
  border-radius: 24px;
  border: 3px solid #facc15;
  box-shadow: 
    0 0 35px rgba(234, 179, 8, 0.85),
    0 10px 25px rgba(0, 0, 0, 0.75),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.fusion-banner-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 40%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
  white-space: nowrap;
}

.fusion-banner-sub {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
  letter-spacing: 1px;
  margin-top: 2px;
}

@keyframes fusionBannerPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(-10deg);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15) rotate(3deg);
  }
  35% {
    transform: translate(-50%, -50%) scale(1.0) rotate(0deg);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02) translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3) translateY(-35px);
  }
}

/* 5. Crossfire Multi-Laser Beams */
.laser-beam-cross {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, #ffffff 30%, #38bdf8 50%, #ffffff 70%, transparent 100%);
  box-shadow: 0 0 20px #0284c7, 0 0 35px #38bdf8;
  z-index: 60;
  animation: laserCrossPulse 0.45s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}

@keyframes laserCrossPulse {
  0% { opacity: 0; transform: scaleY(0.1); }
  30% { opacity: 1; transform: scaleY(1.8); }
  70% { opacity: 0.9; transform: scaleY(1.0); }
  100% { opacity: 0; transform: scaleY(0.05); }
}

/* 6. Board Shake on Mega Fusion */
.screen-shake-mega {
  animation: megaScreenShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes megaScreenShake {
  10%, 90% { transform: translate3d(-4px, 2px, 0) rotate(-0.8deg); }
  20%, 80% { transform: translate3d(5px, -3px, 0) rotate(1deg); }
  30%, 50%, 70% { transform: translate3d(-6px, 4px, 0) rotate(-1.2deg); }
  40%, 60% { transform: translate3d(6px, -4px, 0) rotate(1.2deg); }
}

/* ==========================================================================
   7. VIP PWA INSTALL & DAILY INCENTIVE MODAL (2026)
   ========================================================================== */
.pwa-vip-card {
  background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #0f172a 75%, #020617 100%) !important;
  border-radius: 28px !important;
}

.pwa-icon-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(250, 204, 21, 0.45) 0%, rgba(236, 72, 153, 0.25) 50%, transparent 75%);
  border-radius: 50%;
  filter: blur(14px);
  animation: pwaGlowPulse 2.5s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes pwaGlowPulse {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

.btn-pulse-gold {
  animation: btnPulseGoldAnim 1.6s infinite ease-in-out;
}

@keyframes btnPulseGoldAnim {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 0 #052e16, 0 10px 20px rgba(34, 197, 94, 0.5);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 6px 0 #052e16, 0 0 25px rgba(250, 204, 21, 0.8), 0 14px 28px rgba(34, 197, 94, 0.7);
  }
}

.pwa-perk-item {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pwa-perk-item:hover {
  transform: translateX(4px);
  border-color: #facc15 !important;
}

/* ==========================================================================
   8. GAMEPLAY GPU PRE-WARMING & HARDWARE LOADING SCREEN (2026)
   ========================================================================== */
.gameplay-loader-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(4, 30, 15, 0.94) 0%, rgba(2, 18, 9, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.gameplay-loader-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.gameplay-loader-overlay.fade-out {
  opacity: 0 !important;
  transform: scale(1.05) !important;
  pointer-events: none !important;
}

.gameplay-loader-card {
  width: min(92%, 420px);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.75) 0%, rgba(5, 46, 22, 0.92) 100%);
  border: 2px solid rgba(132, 204, 22, 0.45);
  border-radius: 28px;
  padding: clamp(20px, 3vh, 32px) clamp(16px, 4vw, 26px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(132, 204, 22, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(10px, 1.8vh, 16px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.gameplay-gpu-hero {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpu-neon-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.gpu-neon-ring.ring-outer {
  width: 110px;
  height: 110px;
  border: 2px dashed rgba(250, 204, 21, 0.65);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.35);
  animation: gpuOrbitalSpin 6s linear infinite;
}

.gpu-neon-ring.ring-inner {
  width: 84px;
  height: 84px;
  border: 2.5px solid rgba(74, 222, 128, 0.8);
  border-top-color: transparent;
  border-bottom-color: transparent;
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.45);
  animation: gpuOrbitalSpinReverse 3s linear infinite;
}

.gpu-fruit-mascot {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpu-spin-mascot {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 0 14px rgba(250, 204, 21, 0.85)) drop-shadow(0 4px 10px rgba(0,0,0,0.7));
  animation: gpuFruitPulse 2.2s ease-in-out infinite;
}

.gpu-energy-pulse {
  position: absolute;
  width: 76px;
  height: 76px;
  background: radial-gradient(circle, rgba(132, 204, 22, 0.45) 0%, rgba(250, 204, 21, 0.15) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(10px);
  animation: gpuEnergyPulseAnim 2s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes gpuOrbitalSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes gpuOrbitalSpinReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes gpuFruitPulse {
  0%, 100% { transform: scale(1) translateY(0) rotate(0deg); }
  50% { transform: scale(1.1) translateY(-3px) rotate(6deg); }
}

@keyframes gpuEnergyPulseAnim {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 0.95; }
}

.gpu-chip-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fde047;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.25);
}

.gpu-chip-badge .chip-icon {
  font-size: 13px;
  animation: chipIconFlash 1.5s infinite alternate;
}

@keyframes chipIconFlash {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px #facc15); }
  100% { transform: scale(1.2); filter: drop-shadow(0 0 8px #facc15); }
}

.gpu-chip-badge .fps-pill {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gameplay-loader-title {
  font-family: var(--font-heading);
  font-size: clamp(17px, 2.6vw, 22px);
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 16px rgba(132, 204, 22, 0.6);
  letter-spacing: 1.5px;
  margin: 0;
}

.gameplay-loader-progress-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.gpu-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #a7f3d0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.gameplay-gpu-status {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  max-width: 82%;
}

.gameplay-gpu-percent {
  color: #fde047;
  font-family: var(--font-heading);
  font-size: 13.5px;
  letter-spacing: 0.5px;
}

.gpu-progress-track {
  position: relative;
  width: 100%;
  height: 14px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 12px;
  border: 1.5px solid rgba(74, 222, 128, 0.45);
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.85);
}

.gpu-neon-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #10b981 0%, #84cc16 50%, #facc15 100%);
  position: relative;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.75);
  transition: width 0.08s ease-out;
}

.gpu-laser-glow {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 18px;
  background: #ffffff;
  filter: blur(3px);
  border-radius: 10px;
  opacity: 0.9;
}

.gpu-micro-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.micro-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge-dot.dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

/* ==========================================================================
   9. CLOUD AUTH & PLAYER PROFILE STYLES (2026)
   ========================================================================== */
.stat-pill.profile-pill {
  cursor: pointer;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid #38bdf8;
  box-shadow: 0 3px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-pill.profile-pill:hover,
.stat-pill.profile-pill:focus-visible {
  transform: translateY(-2px);
  border-color: #facc15;
  box-shadow: 0 5px 12px rgba(250, 204, 21, 0.4);
}

.profile-avatar-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-pill-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.profile-name-text {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 900;
  color: #f8fafc;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-sync-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.sync-dot.dot-synced {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.sync-dot.dot-guest {
  background: #94a3b8;
}

.sync-dot.dot-syncing {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation: ambientPulse 1s infinite;
}

/* Auth Modal Specifics */
.auth-tabs-row {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 12px 0 14px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 900;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
  border-color: #86efac;
  box-shadow: 0 3px 0 #052e16, 0 0 12px rgba(34, 197, 94, 0.4);
}

.auth-avatar-section {
  width: 100%;
  margin-bottom: 12px;
}

.auth-field-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fef08a;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  margin-bottom: 6px;
  text-align: left;
}

.auth-avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

.avatar-opt-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  font-size: 24px;
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.avatar-opt-btn:hover {
  transform: scale(1.08);
  border-color: #fde047;
}

.avatar-opt-btn.active {
  border-color: #facc15;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.3) 0%, rgba(15, 23, 42, 0.9) 100%);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.6);
  transform: scale(1.1);
}

.auth-form-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}

.auth-input-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  color: #e2e8f0;
}

.auth-text-input {
  width: 100%;
  background: #0f172a;
  border: 2px solid #a16207;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-text-input:focus {
  border-color: #facc15;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), 0 0 10px rgba(250, 204, 21, 0.4);
}

.auth-status-msg {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 10px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.auth-status-msg.msg-success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #86efac;
}

.auth-status-msg.msg-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.auth-footer-tip {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 10px;
  line-height: 1.35;
}

/* Profile Modal Specifics */
.profile-hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 10px 0 14px;
}

.profile-avatar-halo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.3) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 3px solid #facc15;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-large-avatar {
  font-size: 38px;
}

.profile-modal-username {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  margin: 0;
}

.profile-cloud-status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  color: #86efac;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 16px;
}

.profile-stat-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.p-stat-icon {
  font-size: 18px;
}

.p-stat-val {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  color: #fef08a;
}

.p-stat-lbl {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
}








