/* necromatch.css — Necromancer's Match game styles */

/* ── Game shell ─────────────────────────────────────────────────── */
.game-shell {
  max-width: 1200px;
  position: relative;
}

.side-sigil {
  position: absolute;
  width: 180px;
  height: 180px;
  top: 470px;
  opacity: 0.92;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(0, 220, 220, 0.35));
}
.side-left {
  left: 90px;
}
.side-right {
  right: 90px;
}

.back-link {
  display: block;
  width: fit-content;
  margin: 0 auto 16px;
}

.game-info {
  background: rgba(0,0,0,0.6);
  border: 1px solid #00cccc44;
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 18px;
  text-align: left;
  display: block;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.game-info h3 {
  color: #00cccc;
  margin: 0 0 8px;
  font-size: 1em;
  text-shadow: 0 0 6px #00cccc;
}
.game-info ul {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85em;
  color: #c0c0c0;
  line-height: 1.8;
}

/* ── UI bar ─────────────────────────────────────────────────────── */
#ui-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
#ui-bar input {
  background: rgba(0,0,0,0.8);
  border: 1px solid #00cccc;
  border-radius: 6px;
  color: #e0e0e0;
  font-family: 'Cinzel', serif;
  font-size: 1em;
  padding: 8px 14px;
  outline: none;
  width: 160px;
}
#ui-bar input::placeholder { color: #555; }
#ui-bar input:focus { border-color: #00ffff; box-shadow: 0 0 8px #00ffff55; }

#ui-bar button, #go-restart {
  background: rgba(0, 204, 204, 0.12);
  border: 2px solid #00cccc;
  border-radius: 6px;
  color: #00cccc;
  font-family: 'Cinzel', serif;
  font-size: 1em;
  padding: 8px 22px;
  letter-spacing: 0.05em;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
#ui-bar button:hover, #go-restart:hover {
  background: rgba(0,204,204,0.25);
  box-shadow: 0 0 14px #00cccc88;
  color: #00ffff;
}

/* ── Game area ──────────────────────────────────────────────────── */
#game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
}
#game-area.pregame #hud,
#game-area.pregame #combo-banner {
  display: none;
}

/* ── HUD ────────────────────────────────────────────────────────── */
#hud {
  display: flex;
  gap: 30px;
  background: rgba(0,0,0,0.75);
  border: 1px solid #00cccc55;
  border-radius: 8px;
  padding: 10px 28px;
}
.hud-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}
.hud-label {
  font-size: 0.65em;
  letter-spacing: 0.15em;
  color: #00cccc99;
}
.hud-value {
  font-size: 1.5em;
  color: #00cccc;
  text-shadow: 0 0 8px #00cccc;
  font-weight: bold;
  line-height: 1.2;
}

/* ── Board ──────────────────────────────────────────────────────── */
#board-wrap {
  position: relative;
  border: 2px solid #00cccc;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0,255,255,0.25), inset 0 0 20px rgba(0,0,0,0.8);
  overflow: hidden;
  background: #050a0a;
}
#board-canvas {
  display: block;
}

#pregame-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.62));
  z-index: 5;
  pointer-events: none;
}
#pregame-overlay.hidden { display: none; }
.pregame-title {
  color: #00ffff;
  font-size: 1.35em;
  text-shadow: 0 0 10px #00cccc;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pregame-sub {
  margin-top: 6px;
  color: #cfeeee;
  font-size: 0.8em;
  text-shadow: 0 0 8px rgba(0, 204, 204, 0.35);
  letter-spacing: 0.05em;
}

/* ── Combo banner ───────────────────────────────────────────────── */
#combo-banner {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 120px;
  z-index: 10;
  font-family: 'Cinzel', serif;
  font-size: 2em;
  font-weight: bold;
  color: #ffcc00;
  text-shadow: 0 0 20px #ffcc00, 0 0 40px #ff6600;
  pointer-events: none;
  white-space: nowrap;
  animation: comboPop 0.6s ease-out forwards;
}
#combo-banner.hidden { display: none; }
@keyframes comboPop {
  0%   { transform: translateX(-50%) scale(0.5); opacity: 1; }
  70%  { transform: translateX(-50%) scale(1.1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 0; }
}

/* ── Game over overlay ──────────────────────────────────────────── */
#game-over-screen {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  z-index: 20;
}
#game-over-screen.hidden { display: none; }
.go-inner {
  text-align: center;
  padding: 40px;
}
.go-inner h2 {
  font-size: 2.2em;
  color: #00cccc;
  text-shadow: 0 0 20px #00cccc;
  margin-bottom: 10px;
}
.go-inner p {
  font-size: 1.3em;
  color: #e0e0e0;
  margin-bottom: 28px;
}

/* ── Leaderboard ────────────────────────────────────────────────── */
.section-title {
  color: #00cccc;
  text-shadow: 0 0 10px #00cccc;
  margin-top: 36px;
  font-size: 1.4em;
}
#lbTable {
  width: 100%;
  max-width: 360px;
  margin: 18px auto 40px;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid #00cccc;
}
#lbTable th,
#lbTable td {
  padding: 8px 10px;
  border: 1px solid #013535;
  text-align: center;
}
#lbTable th {
  background: #00cccc;
  color: #000;
  font-weight: 700;
}
#lbTable tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}
#lbTable tr:first-child td { color: #ffcc00; }

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .game-info {
    max-width: 100%;
    padding: 10px 12px;
  }
  .side-sigil {
    display: none;
  }
  #board-canvas { width: 320px; height: 320px; }
  #hud { gap: 16px; padding: 8px 14px; }
  .hud-value { font-size: 1.2em; }
}

@media (max-width: 1100px) {
  .side-sigil {
    display: none;
  }
}
