/* ═══════════════════════════════════════════════════════════════════════════
   SOL VOL - GAME BOARD LAYOUT
   Modern Dark Arena with Green Accents
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   BOARD VARIABLES
   ───────────────────────────────────────────────────────────────────────── */
:root {
  --board-max-width: 1400px;
  --card-width: 90px;
  --card-height: 130px;
  --card-width-small: 70px;
  --card-height-small: 100px;
}

/* ─────────────────────────────────────────────────────────────────────────
   MAIN GAME CONTAINER
   ───────────────────────────────────────────────────────────────────────── */

.game-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--dark-950);
  overflow: hidden;
}

/* Background effects for game */
.game-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(20, 241, 149, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(20, 241, 149, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

/* Grid overlay */
.game-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 241, 149, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 241, 149, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  opacity: 0.5;
}

/* Game Board Layout */
.game-board {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: var(--board-max-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-md);
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────────────────────
   HERO ZONES (Top & Bottom)
   ───────────────────────────────────────────────────────────────────────── */

.hero-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  gap: var(--space-lg);
}

.hero-zone--player {
  border-color: rgba(20, 241, 149, 0.2);
  box-shadow: 0 0 20px rgba(20, 241, 149, 0.1);
}

.hero-zone--opponent {
  border-color: rgba(255, 59, 92, 0.15);
}

.hero-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─────────────────────────────────────────────────────────────────────────
   CENTRAL ARENA
   ───────────────────────────────────────────────────────────────────────── */

.central-arena {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  margin: var(--space-md) 0;
  min-height: 300px;
}

.arena__table {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

/* Arena background pattern */
.arena__table::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(20, 241, 149, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Play Zones */
.arena__zone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  min-height: 120px;
  transition: background var(--duration-normal);
}

.arena__zone--opponent {
  background: linear-gradient(180deg, rgba(255, 59, 92, 0.03) 0%, transparent 100%);
}

.arena__zone--player {
  background: linear-gradient(0deg, rgba(20, 241, 149, 0.03) 0%, transparent 100%);
}

/* Highlight when can drop */
.arena__zone.slot-highlight {
  background: rgba(20, 241, 149, 0.1);
  box-shadow: inset 0 0 30px rgba(20, 241, 149, 0.2);
}

/* Divider between zones */
.arena__divider {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(20, 241, 149, 0.3) 20%,
    var(--sol-green) 50%,
    rgba(20, 241, 149, 0.3) 80%,
    transparent 100%
  );
  box-shadow: 0 0 15px var(--sol-green-glow);
  position: relative;
}

.arena__divider::before,
.arena__divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background: var(--sol-green);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px var(--sol-green-glow);
}

.arena__divider::before { left: 20%; }
.arena__divider::after { right: 20%; }

/* ─────────────────────────────────────────────────────────────────────────
   TRAP ZONES
   ───────────────────────────────────────────────────────────────────────── */

.trap-zones {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.trap-zones--left {
  left: -60px;
}

.trap-zones--right {
  right: -60px;
}

.trap-zone {
  width: 50px;
  height: 70px;
  background: rgba(255, 59, 92, 0.1);
  border: 1px dashed rgba(255, 59, 92, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal);
}

.trap-zone:hover {
  background: rgba(255, 59, 92, 0.15);
  border-color: rgba(255, 59, 92, 0.5);
}

.trap-zone__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ─────────────────────────────────────────────────────────────────────────
   TURN INDICATOR
   ───────────────────────────────────────────────────────────────────────── */

.turn-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.turn-banner {
  padding: var(--space-sm) var(--space-xl);
  background: rgba(10, 10, 10, 0.95);
  border: 2px solid var(--sol-green);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--sol-green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 0 30px var(--sol-green-glow);
  white-space: nowrap;
}

.turn-banner.your-turn {
  animation: turn-pulse 1s ease-in-out infinite;
}

@keyframes turn-pulse {
  0%, 100% { box-shadow: 0 0 30px var(--sol-green-glow); }
  50% { box-shadow: 0 0 50px var(--sol-green-glow), 0 0 80px rgba(20, 241, 149, 0.3); }
}

/* ─────────────────────────────────────────────────────────────────────────
   HAND CONTAINER
   ───────────────────────────────────────────────────────────────────────── */

.hand-container {
  position: relative;
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--space-md);
}

.hand-cards {
  display: flex;
  justify-content: center;
  gap: -20px; /* Overlap cards */
  transition: all var(--duration-normal);
}

/* Fan layout for hand */
.hand-cards .handCard {
  transition: all var(--duration-normal) var(--ease-out);
}

.hand-cards .handCard:hover {
  transform: translateY(-20px) scale(1.1);
  z-index: 100;
}

/* Opponent hand (face down) */
.opponent-hand-container {
  height: 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.opponent-hand-cards {
  display: flex;
  justify-content: center;
  gap: -30px;
}

/* ─────────────────────────────────────────────────────────────────────────
   END TURN BUTTON
   ───────────────────────────────────────────────────────────────────────── */

.end-turn-btn {
  position: absolute;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dark-900);
  background: var(--sol-green);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 0 20px var(--sol-green-glow);
  transition: all var(--duration-normal);
}

.end-turn-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 0 40px var(--sol-green-glow);
}

.end-turn-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

.end-turn-btn.pulse {
  animation: btn-pulse 1.5s ease-in-out infinite;
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--sol-green-glow); }
  50% { box-shadow: 0 0 40px var(--sol-green-glow), 0 0 60px rgba(20, 241, 149, 0.4); }
}

/* ─────────────────────────────────────────────────────────────────────────
   ACTION LOG
   ───────────────────────────────────────────────────────────────────────── */

.action-log {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  max-height: 300px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-normal);
}

.action-log.log-collapsed {
  max-height: 40px;
}

.action-log__title {
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-log__content {
  padding: var(--space-sm);
  overflow-y: auto;
  max-height: 260px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.action-log__entry {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.action-log__entry:last-child {
  border-bottom: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   BATTLE HUD
   ───────────────────────────────────────────────────────────────────────── */

.battle-hud {
  position: absolute;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  z-index: 20;
}

.battle-hud span {
  color: var(--sol-green);
}

/* Battle center for compatibility */
.battle-center {
  position: relative;
}

.battle-center.slot-highlight {
  background: rgba(20, 241, 149, 0.1);
}

/* VOL label for compatibility */
.battle-vol-label {
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────
   DROPZONE HIGHLIGHTS
   ───────────────────────────────────────────────────────────────────────── */

[id^="player-"][id$="-dropzone"] {
  min-height: 100px;
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal);
}

[id^="player-"][id$="-dropzone"].slot-highlight {
  background: rgba(20, 241, 149, 0.1);
  border: 2px dashed rgba(20, 241, 149, 0.4);
  box-shadow: inset 0 0 30px rgba(20, 241, 149, 0.15);
}

/* ─────────────────────────────────────────────────────────────────────────
   CARD FOCUS OVERLAY
   ───────────────────────────────────────────────────────────────────────── */

#card-focus {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

#card-focus-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 48px;
  height: 48px;
  background: var(--dark-700);
  border: 2px solid var(--sol-green);
  border-radius: 50%;
  color: var(--sol-green);
  font-size: var(--text-xl);
  cursor: pointer;
  transition: all var(--duration-fast);
}

#card-focus-close:hover {
  background: var(--sol-green);
  color: var(--dark-900);
}

/* ─────────────────────────────────────────────────────────────────────────
   COMPATIBILITY CLASSES
   ───────────────────────────────────────────────────────────────────────── */

/* Player meta elements */
#player-0-meta,
#player-1-meta {
  display: none; /* Hidden but available for JS */
}

#player-0-meta.active,
#player-1-meta.active {
  display: block;
}

/* Player column elements */
#player-0-column,
#player-1-column {
  display: contents; /* Passthrough for layout */
}

#player-0-column.is-active,
#player-1-column.is-active {
  /* Active state styling if needed */
}
