@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #eef2f7;
  --bg-soft: #e4eaf3;
  --card: #ffffff;
  --line: #d5dee9;
  --text: #121826;
  --muted: #627084;
  --accent: #1b5cff;
  --accent-hover: #1346d4;
  --accent-soft: #e0e9ff;
  --accent-2: #0f9f6e;
  --odds: #e85d04;
  --ink: #0a1222;
  --danger: #e11d48;
  --warn: #ca8a04;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(10, 18, 34, 0.03), 0 12px 32px rgba(10, 18, 34, 0.06);
  --shadow-hover: 0 14px 36px rgba(10, 18, 34, 0.1);
  --font: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --display: "Space Grotesk", "Pretendard", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1000px 480px at 100% -10%, rgba(27, 92, 255, 0.16), transparent 55%),
    radial-gradient(800px 420px at -5% 0%, rgba(232, 93, 4, 0.08), transparent 50%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 40%, #e8eef6 100%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background:
    radial-gradient(circle at 20% 30%, rgba(27, 92, 255, 0.05) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 70%, rgba(27, 92, 255, 0.05) 0 1px, transparent 1.5px);
  background-size: 28px 28px;
}
body > * { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.container { width: min(1140px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 12px; }

/* ---- Nav ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  margin-bottom: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 249, 252, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.is-solid {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.05em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, #1b5cff, #5b8cff);
  box-shadow: 0 0 0 4px rgba(27, 92, 255, 0.14);
}
.brand:hover { text-decoration: none; color: var(--ink); }
.nav-links { display: flex; gap: 2px 4px; flex-wrap: wrap; align-items: center; }
.nav-links a {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
.nav-links a.active,
.nav-links a:hover {
  color: var(--ink);
  background: var(--accent-soft);
  text-decoration: none;
}
.nav-links .muted { padding: 0 8px; font-weight: 650; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition: transform .14s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 20px rgba(27, 92, 255, 0.28);
}
.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--bg-soft); color: var(--text); }
.btn.danger { background: var(--danger); box-shadow: 0 8px 18px rgba(225, 29, 72, 0.22); }
.btn.danger:hover { filter: brightness(0.95); color: #fff; }
.btn.ok { background: var(--accent-2); box-shadow: 0 8px 18px rgba(15, 159, 110, 0.22); }
.btn.ok:hover { color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin: 12px 0 40px;
  align-items: stretch;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

.hero-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(28px, 4vw, 42px);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #f4f7ff;
  background:
    linear-gradient(125deg, #0a1222 0%, #132a63 48%, #1b5cff 100%);
  box-shadow: var(--shadow);
  animation: rise .55s cubic-bezier(.22, 1, .36, 1) both;
}
.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 260px at 85% 15%, rgba(255,255,255,0.22), transparent 60%),
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.25) 100%);
  pointer-events: none;
}
.hero-stage::after {
  content: "";
  position: absolute;
  width: 140%;
  height: 140%;
  left: -20%;
  top: -20%;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent 0 18px,
      rgba(255,255,255,0.035) 18px 19px
    );
  animation: drift 18s linear infinite;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-40px); }
}
.hero-stage > * { position: relative; z-index: 1; }
.hero-stage .brand-hero {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: -0.055em;
  margin: 0 0 12px;
  line-height: 1.02;
}
.hero-stage .lede {
  max-width: 32rem;
  margin: 0 0 24px;
  color: rgba(236, 242, 255, 0.88);
  font-size: 1.05rem;
}
.hero-stage .kicker {
  color: rgba(190, 210, 255, 0.95);
  margin-bottom: 14px;
}
.hero-stage .cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-stage .btn {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.hero-stage .btn:hover { background: #eef3ff; color: var(--ink); }
.hero-stage .btn.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.38);
  color: #fff;
  box-shadow: none;
}
.hero-stage .btn.secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }

.hero-feature {
  border-radius: 24px;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise .65s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: .06s;
}
.hero-feature::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), var(--odds));
}
.hero-feature h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ---- Surfaces ---- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--display);
}
h1, h2, h3 { margin: 0 0 10px; letter-spacing: -0.035em; color: var(--text); }
h1 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 700;
}
h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}
.section-head h2 { margin-bottom: 4px; }
.section-head p { margin: 0; }
.muted { color: var(--muted); line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: linear-gradient(180deg, #f8faff, var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.stat b {
  display: block;
  font-size: 1.2rem;
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.02em;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #c5d2e6;
}
.card h3 {
  font-family: var(--display);
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}
.tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 700;
}
.odds {
  font-family: var(--display);
  font-weight: 700;
  color: var(--odds);
  font-variant-numeric: tabular-nums;
}
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---- Tables ---- */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
  font-size: 14px;
}
.table th {
  color: var(--muted);
  font-weight: 700;
  background: #f5f8fc;
  position: sticky;
  top: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover td { background: rgba(27, 92, 255, 0.04); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ---- Forms ---- */
input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
  margin: 6px 0 12px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 92, 255, 0.15);
}
label { font-size: 13px; color: var(--muted); font-weight: 650; }
.form-card { max-width: 440px; margin: 48px auto; animation: rise .45s ease both; }
.auth-shell {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
  padding: 24px 0 40px;
}
.auth-shell .brand { margin-bottom: 18px; justify-content: center; width: 100%; }
.flash { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-weight: 600; }
.flash.err { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.flash.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.slip-panel { position: sticky; top: 78px; align-self: start; }
.wallet-balance .stat b { font-size: 1.45rem; color: var(--accent); }

.age-mask {
  position: fixed; inset: 0;
  background: rgba(10, 18, 34, 0.62);
  backdrop-filter: blur(7px);
  display: none; align-items: center; justify-content: center; z-index: 50;
}
.age-mask.show { display: flex; }
.age-mask .panel { max-width: 420px; animation: rise .35s ease both; }
.footer {
  margin: 48px 0 28px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.pill-ok { color: var(--accent-2); font-weight: 700; }
.pill-bad { color: var(--danger); font-weight: 700; }

/* ---- Loading ---- */
.page-loading {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(238, 242, 247, 0.62);
  backdrop-filter: blur(7px);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.page-loading.show { opacity: 1; pointer-events: auto; }
.page-loading-card {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 36px;
  box-shadow: 0 18px 44px rgba(10, 18, 34, 0.12);
  min-width: 160px;
}
.page-loading-card span { color: var(--muted); font-size: 14px; font-weight: 600; }
.spinner {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-inline {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 36px 16px; color: var(--muted); font-weight: 600; font-size: 14px;
}
.skeleton {
  background: linear-gradient(90deg, #e2e8f2 0%, #f4f7fb 45%, #e2e8f2 90%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-line.lg { height: 22px; width: 70%; }
.skeleton-line.md { width: 55%; }
.skeleton-line.sm { width: 35%; height: 10px; }
.skeleton-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.btn.is-loading {
  position: relative; color: transparent !important; pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn.secondary.is-loading::after {
  border-color: rgba(18, 35, 28, .15);
  border-top-color: var(--text);
}
