*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f5f2ec;
  --surface:    #ffffff;
  --nav-bg:     #1a1a18;
  --nav-text:   #c8c4b8;
  --nav-hover:  #f5f2ec;
  --nav-active: #e8b86d;
  --header-bg:  #1a1a18;
  --header-text:#f5f2ec;
  --accent:     #e8b86d;
  --border:     #e0dbd0;
  --text:       #2a2820;
  --muted:      #9a9488;
  --nav-w:      220px;
  --header-h:   60px;
  --radius:     8px;
}

html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); }

/* ── HEADER ── */
header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--header-bg);
  display: flex; align-items: center;
  padding: 0 28px;
  z-index: 100;
  border-bottom: 1px solid #333;
}
.site-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--header-text);
  letter-spacing: 0.04em;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: var(--header-h); left: 0; bottom: 0;
  width: var(--nav-w);
  background: var(--nav-bg);
  overflow-y: auto;
  padding: 20px 0 40px;
  display: flex; flex-direction: column;
  border-right: 1px solid #2e2e2c;
}
.nav-section { margin-bottom: 24px; }
.nav-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #555;
  padding: 0 18px 8px;
}
nav a {
  display: flex; align-items: center;
  padding: 9px 18px;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  cursor: pointer;
}
nav a:hover { color: var(--nav-hover); background: rgba(255,255,255,0.04); }
nav a.active { color: var(--nav-active); border-left-color: var(--accent); background: rgba(232,184,109,0.07); }

.nav-footer {
  margin-top: auto;
  padding: 16px 18px 0;
  border-top: 1px solid #2e2e2c;
}
.nav-footer p { font-size: 0.7rem; color: #444; line-height: 1.5; }

/* ── MAIN ── */
.main-wrap {
  margin-left: var(--nav-w);
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  padding: 36px 40px;
}

/* ── PAGES (SPA) ── */
.page { display: none; animation: fadeUp 0.3s ease both; }
.page.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADER ── */
.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
}

/* ── CONTENT CARD ── */
.content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.content p { line-height: 1.7; font-size: 0.95rem; color: var(--text); }

/* ── GAME GRID ── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.game-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  padding: 0;
  text-align: center;
}
.game-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: var(--accent);
}
.game-btn img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}
.game-btn span {
  display: block;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  width: 100%;
}

/* scrollbar */
nav::-webkit-scrollbar { width: 4px; }
nav::-webkit-scrollbar-track { background: transparent; }
nav::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
