/* ==========================================================================
   High-Contrast Modern Vocational Tech Stylesheet
   Snakes & Ladders - Simple Present vs Present Continuous Tense
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg-deep: #070d1e;
  --bg-card: #0f172a;
  --color-primary: #0ea5e9;
  --color-emerald: #10b981;
  --color-amber: #f59e0b;
  --color-rose: #ef4444;
  --color-purple: #a855f7;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.08) 0%, transparent 40%),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}

.font-outfit {
  font-family: 'Outfit', sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   100-TILES SNAKES AND LADDERS BOARD CONTAINER
   ========================================================================== */
.board-wrapper {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 1.5rem;
  padding: 8px;
  background: linear-gradient(145deg, #0f172a 0%, #090e1c 100%);
  border: 2px solid #1e293b;
  box-shadow: 
    0 20px 40px -15px rgba(0, 0, 0, 0.7),
    0 0 35px -5px rgba(14, 165, 233, 0.15);
}

.board-grid-100 {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 10;
}

@media (min-width: 640px) {
  .board-grid-100 {
    gap: 4px;
  }
}

.board-svg-canvas {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  z-index: 20;
  pointer-events: none;
}

.board-tile {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(2px);
}

.board-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
  z-index: 15;
}

.board-tile.active-step {
  animation: pulse-border 1.2s infinite alternate;
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.8), 0 0 15px rgba(245, 158, 11, 0.4);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 1), 0 0 25px rgba(245, 158, 11, 0.8);
  }
}

/* ==========================================================================
   3D DICE CUBE SCENE
   ========================================================================== */
.dice-scene {
  width: 58px;
  height: 58px;
  perspective: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dice-cube {
  width: 44px;
  height: 44px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.2, 0.85, 0.35, 1.2);
}

.dice-cube.rolling {
  animation: dice-spin 0.8s infinite linear;
}

@keyframes dice-spin {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(720deg) rotateY(1080deg) rotateZ(360deg); }
}

.dice-face {
  position: absolute;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 2px solid #38bdf8;
  border-radius: 9px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(14, 165, 233, 0.3);
}

.dice-dot {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  align-self: center;
  justify-self: center;
  box-shadow: 0 0 4px #ffffff;
}

.dice-face.front  { transform: rotateY(0deg) translateZ(22px); }
.dice-face.back   { transform: rotateY(180deg) translateZ(22px); }
.dice-face.right  { transform: rotateY(90deg) translateZ(22px); }
.dice-face.left   { transform: rotateY(-90deg) translateZ(22px); }
.dice-face.top    { transform: rotateX(90deg) translateZ(22px); }
.dice-face.bottom { transform: rotateX(-90deg) translateZ(22px); }

/* ==========================================================================
   CRITICAL REQUIREMENT: FLOATING RED ❌ POP-UP OVERLAY ANIMATION
   ========================================================================== */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 18, 0.88);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.animate-wrong-pop {
  animation: wrong-explode 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes wrong-explode {
  0% {
    transform: scale(0.2) rotate(-18deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.18) rotate(4deg);
    opacity: 1;
  }
  70% {
    transform: scale(0.92) rotate(-2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.huge-wrong-x {
  font-size: 6.5rem;
  line-height: 1;
  color: #ef4444;
  text-shadow: 
    0 0 35px rgba(239, 68, 68, 0.9),
    0 0 70px rgba(220, 38, 38, 0.6),
    0 10px 25px rgba(0, 0, 0, 0.8);
  animation: wrong-shake 0.4s 0.25s ease-in-out;
}

@keyframes wrong-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-12px); }
  40%, 80% { transform: translateX(12px); }
}

/* Correct Celebration Overlay */
.animate-correct-pop {
  animation: correct-bloom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes correct-bloom {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.huge-correct-check {
  font-size: 6.5rem;
  line-height: 1;
  color: #10b981;
  text-shadow: 
    0 0 35px rgba(16, 185, 129, 0.9),
    0 0 70px rgba(5, 150, 105, 0.6),
    0 10px 25px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   PAWN TOKENS & SCROLLBAR
   ========================================================================== */
.group-pawn-token {
  border: 1.5px solid #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #090e1d;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
  border: 2px solid #090e1d;
}

::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}
