/* 아케이드 공용 스타일 — 메인(index.html)과 배포 히스토리(changelog.html)가 함께 쓴다 */
:root {
  --bg: #090d16;
  --card-bg: rgba(17, 24, 39, 0.85);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.35);
  --text: #f8fafc;
  --subtext: #94a3b8;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 45%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 16px;
}

/* 상단 배너 */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-badge {
  font-size: 11px;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.version-link-btn {
  font-size: 11px;
  font-weight: 800;
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 4px 12px;
  border-radius: 99px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.version-link-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #c084fc;
  color: #fff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  box-shadow: 0 0 6px #34d399;
}

.hero h1 {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 14px;
  color: var(--subtext);
  max-width: 540px;
  line-height: 1.5;
}

/* 상단 통계·버튼 */
.hero-stats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 4px; }
.hero-stats span { font-size: 12px; color: var(--subtext); background: rgba(31, 41, 55, 0.6); border: 1px solid var(--border); border-radius: 99px; padding: 4px 10px; }
.hero-stats b { color: var(--text); }
.hero-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.btn { font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: #1f2937; border: 1px solid #374151; border-radius: 12px; padding: 9px 16px; cursor: pointer; text-decoration: none; transition: all 0.15s ease; }
.btn:hover { border-color: var(--accent); background: #283548; }
.btn.primary { background: linear-gradient(135deg, #0284c7, #6d28d9); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.12); }

/* 검색·필터 툴바 (스크롤해도 위에 붙어 있음) */
.toolbar { position: sticky; top: 8px; z-index: 20; background: rgba(13, 18, 30, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
.search-row { display: flex; gap: 8px; align-items: center; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: #111827; border: 1px solid #374151; border-radius: 12px; padding: 0 12px; transition: border-color 0.15s; min-width: 0; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: inherit; font-size: 14px; padding: 10px 0; }
.search input::placeholder { color: #64748b; }
.search kbd { font: 700 11px ui-monospace, Menlo, monospace; color: #64748b; border: 1px solid #374151; border-radius: 5px; padding: 1px 6px; }
.select { background: #111827; border: 1px solid #374151; color: #fff; padding: 9px 10px; border-radius: 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; outline: none; }
.select:focus { border-color: var(--accent); }
.view-toggle { display: inline-flex; border: 1px solid #374151; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.view-toggle button { background: #111827; border: 0; color: var(--subtext); font-size: 15px; padding: 8px 11px; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: rgba(56, 189, 248, 0.18); color: var(--accent); }
.chip-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 1px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; background: rgba(31, 41, 55, 0.6); border: 1px solid var(--border); color: var(--subtext); font: inherit; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 99px; cursor: pointer; white-space: nowrap; transition: all 0.15s ease; }
.chip:hover { color: #fff; border-color: #475569; }
.chip[aria-pressed="true"] { background: rgba(56, 189, 248, 0.16); border-color: var(--accent); color: var(--accent); }
.chip .n { font-size: 10.5px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.chip .md { width: 9px; height: 9px; border-radius: 50%; }
.chip-sep { flex-shrink: 0; width: 1px; background: var(--border); margin: 3px 2px; }
.result-line { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--subtext); min-height: 18px; }
.result-line b { color: var(--text); }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.link-btn[hidden] { display: none; }

/* 선반: 최근 플레이 / 새로 나온 게임 */
.shelf h2 { font-size: 15px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.shelf h2 small { font-size: 12px; font-weight: 600; color: var(--subtext); }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
.mini { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: all 0.15s ease; overflow: hidden; }
.mini::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--maker, transparent); }
.mini:hover { border-color: color-mix(in srgb, var(--maker, #38bdf8) 60%, transparent); transform: translateY(-2px); }
.mini .mi { font-size: 24px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #1e293b; flex-shrink: 0; }
.mini b { font-size: 13px; display: block; line-height: 1.3; }
.mini small { font-size: 11px; color: var(--subtext); }

.empty { text-align: center; color: var(--subtext); padding: 40px 16px; font-size: 14px; line-height: 1.7; }
.empty[hidden] { display: none; }
.grid-title { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.grid-title small { font-size: 12px; font-weight: 600; color: var(--subtext); }

@media (max-width: 640px) {
  body { padding: 20px 12px; }
  .hero h1 { font-size: 26px; }
  .toolbar { top: 4px; padding: 10px; border-radius: 14px; }
  .search kbd { display: none; }
  .search-row { flex-wrap: wrap; }
  .search { flex-basis: 100%; }
  .search-row .select { flex: 1; max-width: none; }
}

footer {
  margin-top: 24px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease;
}

.footer-link:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-sep {
  color: #475569;
}
