:root {
  --bg: #101216;
  --panel: #181b21;
  --line: #2a2e36;
  --text: #eceef2;
  --muted: #9aa1ad;
  --blue: #4a72ff;
  --blue-hover: #6487ff;
  --display: "Cinzel", Georgia, serif;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { height: 100%; }
/* One screen: footer hugs the bottom, hero takes the rest */
body {
  margin: 0; min-height: 100%; display: flex; flex-direction: column;
  font: 1.0625rem/1.6 var(--font); color: var(--text); background: var(--bg);
}
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.15; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--muted); }
:lang(ko) { word-break: keep-all; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }

/* Hero */
.hero { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; padding-top: 32px; padding-bottom: 32px; }
.hero h1 { font-family: var(--display); font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; line-height: 1.1; overflow-wrap: break-word; }
/* Gold like the game's logo */
.gold {
  background: linear-gradient(180deg, #f6dc8f 0%, #e0ad4c 55%, #b07a24 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 32em; margin-top: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.75rem; }

/* Game page: the game switcher (links to the other pages), then this device's download first */
.downloads { padding: 28px; display: grid; gap: 10px; }
.games { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.games a { text-align: center; padding: 8px 6px; border-radius: 8px; font-weight: 600; font-size: .95rem; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .15s, background-color .15s; }
.games a:hover { color: var(--text); }
.games a[aria-current] { color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.downloads h2 { font-family: var(--display); font-size: 1.75rem; }
.game-desc { color: var(--muted); }
.version { font-size: .9rem; min-height: 1.6em; }
.downloads .version { margin-bottom: 8px; }
.more { display: grid; gap: 10px; }

/* Menu: the three games as rows, like the old download panel */
.menu { padding: 8px 28px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li + li { border-top: 1px solid var(--line); }
.menu-game { display: grid; gap: 2px; padding: 22px 12px; margin: 0 -12px; border-radius: 10px; color: var(--muted); text-decoration: none; transition: background-color .15s; }
.menu-game:hover { background: var(--bg); }
.menu-name { font-family: var(--display); font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin-bottom: 4px; }

/* Buttons */
.btn {
  display: block; text-align: center;
  padding: 13px 20px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
  color: var(--text); background: var(--panel); border: 1px solid var(--line);
  transition: background-color .15s, border-color .15s;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }

.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; color: var(--muted); font-size: .9rem; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--line); }
#lang { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }

/* Short desktop windows: less air, so the page still fits without a scrollbar */
@media (min-width: 821px) and (max-height: 640px) {
  .hero { padding-top: 8px; padding-bottom: 8px; }
  .downloads { padding: 20px 28px; }
  .footer { padding-top: 10px; padding-bottom: 12px; }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 32px; align-content: center; text-align: center; }
  .hero h1 { font-size: clamp(2.6rem, 9vw, 3.75rem); }
  .lead { font-size: 1.1rem; margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .footer { flex-direction: column; text-align: center; }
}
@media (max-width: 560px) {
  .downloads { padding: 20px; }
  .actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
