﻿:root {
  --bg: #0b1020;
  --panel: #141b34;
  --panel-alt: #1d274a;
  --text: #e9eefc;
  --muted: #9aa6d1;
  --accent: #4dd0e1;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  height: 100dvh;
  font-family: "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, #23305e 0%, transparent 35%),
    radial-gradient(circle at 80% 10%, #153f50 0%, transparent 30%),
    linear-gradient(160deg, #070b17 0%, #0e1330 55%, #0a1025 100%);
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
}

.app {
  width: min(960px, 100%);
  max-height: 100%;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  align-items: start;
}

.game-panel,
.card,
button {
  border: 1px solid #2b3666;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-alt) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.game-panel {
  padding: 14px;
}

h1 {
  margin: 0 0 14px;
  letter-spacing: 0.12em;
}

#board,
#next {
  background: #0a0f1f;
  border: 1px solid #324280;
  border-radius: 10px;
}

#board {
  width: auto;
  max-width: 100%;
  height: min(72dvh, 600px);
  max-height: calc(100dvh - 120px);
  display: block;
  margin: 0 auto;
}

.side-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  max-height: calc(100dvh - 24px);
  overflow: auto;
}

.card {
  padding: 14px;
}

h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--accent);
}

.stats p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #314071;
}

.stats p:last-child {
  border-bottom: 0;
}

.controls ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.controls li {
  margin: 4px 0;
}

button {
  color: var(--text);
  font: inherit;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.2s ease;
}

button:hover {
  border-color: var(--accent);
}

button:active {
  transform: translateY(1px);
}

.status {
  min-height: 24px;
  margin: 0;
  color: var(--accent);
  font-weight: 600;
}

.status.game-over {
  color: var(--danger);
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  #board {
    height: min(58dvh, 600px);
    max-width: 100%;
  }

  .side-panel {
    max-height: none;
    overflow: visible;
  }
}


