/* ===== Game Page Layout ===== */
.game-page {
  padding-top: var(--header-height);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--pine-deep) 0%, #0f1f15 100%);
}

.game-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.game-header {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--beige);
}

.game-header h1 {
  color: var(--fire-glow);
  margin-bottom: 0.5rem;
}

.game-header p {
  color: var(--text-on-dark-muted);
  margin-bottom: 1rem;
}

.game-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.game-stat {
  background: rgba(201, 146, 42, 0.15);
  border: 1px solid var(--acorn-gold);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem;
  color: var(--fire-glow);
  font-weight: 700;
}

.game-board {
  background: rgba(0, 0, 0, 0.3);
  border: 3px solid var(--bark-mid);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.game-controls label {
  color: var(--beige);
  font-weight: 600;
}

.game-controls input[type="number"],
.game-controls select {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--bark-light);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-family: var(--font-body);
  width: 100px;
}

.game-log {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--bark-mid);
  border-radius: var(--radius-sm);
  padding: 1rem;
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.875rem;
}

.game-log h3 {
  color: var(--fire-glow);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.game-log__entry {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark-muted);
}

.game-log__entry--win {
  color: var(--fire-glow);
  font-weight: 700;
}

.game-log__entry--lose {
  color: #e74c3c;
}

/* ===== Timber Reels ===== */
.slot-machine {
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  --slot-cell-size: 100px;
}

.slot-frame {
  background: linear-gradient(145deg, var(--bark-mid), var(--bark-dark));
  border: 4px solid var(--bark-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 8px 30px rgba(0, 0, 0, 0.4);
  position: relative;
}

.slot-grid {
  display: flex;
  gap: 6px;
  justify-content: center;
  background: #0a150a;
  border-radius: var(--radius-sm);
  padding: 8px;
  overflow: hidden;
  position: relative;
}

.slot-reel {
  flex: 1;
  max-width: var(--slot-cell-size);
  height: calc(var(--slot-cell-size) * 3);
  overflow: hidden;
  position: relative;
  background: #1a2e1a;
  border: 2px solid var(--bark-light);
  border-radius: 6px;
}

.slot-reel__strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

.slot-reel__strip.motion-blur {
  filter: blur(1.5px);
  opacity: 0.92;
}

.slot-reel__symbol {
  width: 100%;
  height: var(--slot-cell-size);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.slot-reel__symbol svg {
  width: 60px;
  height: 60px;
}

.slot-cell-highlights {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, var(--slot-cell-size));
  gap: 6px;
  pointer-events: none;
  z-index: 5;
}

.slot-highlight {
  border: 3px solid var(--fire-glow);
  border-radius: 6px;
  box-shadow:
    0 0 12px var(--fire-orange),
    inset 0 0 12px rgba(245, 200, 66, 0.4);
  animation: slot-win-pulse 0.8s ease-in-out infinite alternate;
  background: rgba(245, 200, 66, 0.12);
}

@keyframes slot-win-pulse {
  from {
    box-shadow: 0 0 8px var(--fire-orange), inset 0 0 8px rgba(245, 200, 66, 0.3);
  }
  to {
    box-shadow: 0 0 20px var(--fire-glow), inset 0 0 16px rgba(245, 200, 66, 0.5);
  }
}

.slot-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.slot-result {
  text-align: center;
  margin-top: 1rem;
  min-height: 2rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fire-glow);
}

/* ===== Bushwhacker ===== */
.bushwhacker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-width: 400px;
  margin: 0 auto;
}

.bushwhacker-cell {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #3a5a32, #2a4530);
  border: 2px solid #4a6a42;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.15s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.bushwhacker-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(107, 143, 94, 0.4), transparent);
}

.bushwhacker-cell:hover:not(:disabled) {
  transform: scale(1.05);
  border-color: var(--fire-orange);
}

.bushwhacker-cell:focus-visible {
  outline: 3px solid var(--fire-glow);
  outline-offset: 2px;
}

.bushwhacker-cell:disabled {
  cursor: default;
}

.bushwhacker-cell--empty {
  background: linear-gradient(145deg, #5a8a52, #4a7a55);
  border: 2px solid #6b9a62;
  box-shadow:
    inset 0 0 10px rgba(107, 143, 94, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.25);
  opacity: 0.7;
  animation: bushwhacker-reveal-empty 0.4s ease forwards;
}

.bushwhacker-cell--empty::before {
  background: radial-gradient(circle at 50% 50%, rgba(107, 143, 94, 0.35), transparent 70%);
}

.bushwhacker-cell--revealed.bushwhacker-cell--gem,
.bushwhacker-cell--revealed.bushwhacker-cell--pit {
  animation: bushwhacker-reveal 0.4s ease forwards;
}

@keyframes bushwhacker-reveal {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bushwhacker-reveal-empty {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 0.7;
    transform: scale(1);
  }
}

.bushwhacker-cell--gem {
  background: linear-gradient(145deg, #2a5080, #1a3860);
  border-color: #4a80c0;
}

.bushwhacker-cell--pit {
  background: linear-gradient(145deg, #4a2020, #2a1010);
  border-color: #804040;
}

.bushwhacker-cell svg {
  width: 60%;
  height: 60%;
  position: relative;
  z-index: 1;
}

.bushwhacker-info {
  text-align: center;
  color: var(--beige);
  margin-bottom: 1rem;
}

.bushwhacker-multiplier {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fire-glow);
}

/* ===== Campfire Wheel ===== */
.wheel-container {
  position: relative;
  width: min(360px, 90vw);
  height: min(360px, 90vw);
  margin: 0 auto 2rem;
}

.wheel-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition: filter 0.3s ease;
}

.wheel-canvas.spinning {
  filter: blur(1px);
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid var(--fire-glow);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  z-index: 5;
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--fire-warm), var(--fire-orange));
  border-radius: 50%;
  border: 3px solid var(--bark-dark);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(232, 130, 42, 0.6);
}

.wheel-center svg {
  width: 32px;
  height: 32px;
}

.wheel-result {
  text-align: center;
  color: var(--fire-glow);
  font-size: 1.25rem;
  font-weight: 700;
  min-height: 2rem;
  margin-top: 1rem;
}

@media (max-width: 480px) {
  .slot-machine {
    --slot-cell-size: 80px;
  }

  .slot-reel__symbol svg {
    width: 48px;
    height: 48px;
  }
}
