/* === PANTHEON: ECHOES OF THE VOID — STYLES === */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-deep: #0a0a12;
  --bg-panel: #12121f;
  --bg-card: #1a1a30;
  --border-subtle: #252540;
  --border-gold: #8b7332;
  --gold: #d4a843;
  --gold-bright: #f0c860;
  --gold-dim: #6b5a2e;
  --text-primary: #e8e0d0;
  --text-secondary: #9a9080;
  --text-dim: #5a5548;
  --hp-bar: #c0392b;
  --hp-bg: #2a1515;
  --mana-bar: #2471a3;
  --mana-bg: #0d1a2a;
  --blue-team: #2c5f8a;
  --red-team: #8a2c2c;
  --shop-slot: #1a1a2e;
  --shop-slot-hover: #252540;
  --btn-bg: #1e1e35;
  --btn-hover: #2a2a48;
  --btn-gold: #8b7332;
  --btn-gold-hover: #a0893e;
  --synergy-active: #2a4a2a;
  --synergy-inactive: #1a1a28;
  --log-bg: #0d0d18;
  --tier1: #9d9d9d;
  --tier2: #4caf50;
  --tier3: #2196f3;
  --tier4: #9c27b0;
  --tier5: #ff9800;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  height: 100vh;
  user-select: none;
}

#game-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* === HUD === */
#hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: linear-gradient(180deg, #1a1a30 0%, #12121f 100%);
  border-bottom: 1px solid var(--border-subtle);
  height: 52px;
  flex-shrink: 0;
}

.hud-left, .hud-right {
  display: flex;
  gap: 20px;
}

.hud-stat {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-icon { font-size: 18px; }

.hud-center { text-align: center; }

.hud-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(212,168,67,0.3);
}

.hud-round {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.hud-stat.streak {
  color: var(--gold-bright);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* === Play Area === */
#play-area {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}

#board-canvas {
  flex: 1;
  background: radial-gradient(ellipse at center, #141428 0%, #0a0a16 70%);
}

/* === Synergies Panel === */
#synergies-panel {
  width: 200px;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-subtle);
  padding: 12px;
  overflow-y: auto;
  flex-shrink: 0;
}

.panel-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-align: center;
}

.synergy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: default;
}

.synergy-row.active {
  background: var(--synergy-active);
  border: 1px solid #3a6a3a;
  color: #a0e0a0;
}

.synergy-row.inactive {
  background: var(--synergy-inactive);
  color: var(--text-dim);
}

.synergy-count {
  font-weight: 700;
  font-size: 13px;
}

/* === Combat Log === */
#combat-log {
  width: 220px;
  background: var(--log-bg);
  border-left: 1px solid var(--border-subtle);
  padding: 12px;
  overflow-y: auto;
  flex-shrink: 0;
  font-size: 11px;
}

#log-entries {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry {
  padding: 4px 6px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.4;
}

.log-damage { color: #e74c3c; border-left: 2px solid #e74c3c; }
.log-heal { color: #2ecc71; border-left: 2px solid #2ecc71; }
.log-kill { color: #f39c12; border-left: 2px solid #f39c12; font-weight: 600; }
.log-info { color: var(--text-secondary); border-left: 2px solid #555; }

/* === Bottom Area === */
#bottom-area {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  color: var(--gold-dim);
  letter-spacing: 2px;
  padding: 6px 12px 2px;
}

/* === Bench === */
#bench-container {
  padding: 4px 12px;
}

#bench-slots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 64px;
}

.bench-slot {
  width: 60px;
  height: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}

.bench-slot:hover {
  border-color: var(--gold-dim);
  background: var(--shop-slot-hover);
}

.bench-slot.occupied {
  border-color: var(--border-gold);
}

.bench-slot .unit-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.bench-slot .unit-name {
  font-size: 8px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-top: -2px;
}

.bench-slot .unit-stars {
  font-size: 8px;
  color: var(--gold-bright);
}

.bench-slot .unit-tier {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
}

.bench-slot .tier-1 { color: var(--tier1); }
.bench-slot .tier-2 { color: var(--tier2); }
.bench-slot .tier-3 { color: var(--tier3); }

.bench-slot.selected {
  border-color: var(--gold-bright) !important;
  box-shadow: 0 0 10px rgba(240,200,96,0.4);
}

/* === Shop === */
#shop-container {
  padding: 4px 12px 8px;
}

#shop-slots {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.shop-slot {
  width: 120px;
  height: 140px;
  background: var(--shop-slot);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  position: relative;
}

.shop-slot:hover {
  border-color: var(--gold);
  background: var(--shop-slot-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.shop-slot .unit-icon {
  font-size: 42px;
  margin-bottom: 4px;
}

.shop-slot .unit-name-shop {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 2px;
}

.shop-slot .unit-classes {
  font-size: 9px;
  color: var(--text-secondary);
  text-align: center;
}

.shop-slot .unit-cost {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 14px;
  font-weight: 900;
  color: var(--gold);
}

.shop-slot .unit-traits {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}

.shop-slot .trait-badge {
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-deep);
  color: var(--text-secondary);
}

/* === Shop Actions === */
#shop-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-shop {
  padding: 8px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--btn-bg);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}

.btn-shop:hover {
  background: var(--btn-hover);
  border-color: var(--gold-dim);
}

.btn-shop .cost {
  color: var(--gold);
  font-size: 10px;
}

.btn-shop.btn-start {
  background: linear-gradient(135deg, #6b1a1a, #8b2c2c);
  border-color: #a04040;
  color: #ffcccc;
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
  padding: 10px 24px;
  animation: btn-glow 2s infinite;
}

.btn-shop.btn-start:hover {
  background: linear-gradient(135deg, #8b2020, #a04040);
  box-shadow: 0 0 20px rgba(200,60,60,0.3);
}

@keyframes btn-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(200,60,60,0.2); }
  50% { box-shadow: 0 0 20px rgba(200,60,60,0.5); }
}

.btn-shop.locked {
  border-color: var(--gold-bright) !important;
  box-shadow: 0 0 8px rgba(240,200,96,0.3);
}

/* === Tooltip === */
.tooltip {
  position: fixed;
  background: #1a1a2e;
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 12px;
  font-size: 11px;
  max-width: 250px;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.tooltip.hidden { display: none; }

.tooltip .tt-name {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.tooltip .tt-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
  margin: 6px 0;
  font-size: 10px;
  color: var(--text-secondary);
}

.tooltip .tt-stats span {
  color: var(--text-primary);
  font-weight: 500;
}

.tooltip .tt-skill {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.tooltip .tt-skill-name {
  color: var(--gold-bright);
  font-weight: 600;
  font-size: 11px;
}

.tooltip .tt-skill-desc {
  color: var(--text-secondary);
  font-size: 10px;
  margin-top: 2px;
}

/* === Responsive === */
@media (max-width: 1100px) {
  #synergies-panel { width: 150px; }
  #combat-log { width: 160px; }
  .shop-slot { width: 100px; height: 120px; }
  .shop-slot .unit-icon { font-size: 32px; }
}
