*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --c-asia:     #0ea5e9;
  --c-europe:   #8b5cf6;
  --c-americas: #22c55e;
  --c-oceania:  #f59e0b;
}
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  min-width: 1200px;
}

/* ── 헤더 ── */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(13,27,46,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center;
  z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  width: 100%; display: flex; align-items: center;
}
@keyframes logo-text-shine {
  0%   { background-position: 200% center, 0% center; }
  50%  { background-position: -200% center, 0% center; }
  100% { background-position: -200% center, 0% center; }
}
.logo {
  display: inline-flex; align-items: center;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.75) 50%, transparent 100%),
    linear-gradient(90deg,
      #38bdf8 0%, #38bdf8 11%,
      rgba(255,255,255,0.8) 11%, rgba(255,255,255,0.8) 38%,
      #4ade80 38%, #4ade80 49%,
      rgba(255,255,255,0.8) 49%
    );
  background-size: 200% auto, 100% auto;
  background-position: 200% center, 0% center;
  background-repeat: no-repeat, no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 18px; font-weight: 800;
  text-decoration: none; letter-spacing: -0.3px;
  animation: logo-text-shine 2.4s ease-in-out infinite;
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.65);
  text-decoration: none; padding: 7px 14px; border-radius: 7px;
  transition: color 0.15s;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-cta {
  margin-left: 8px;
  padding: 7px 16px !important;
  background: rgba(56,189,248,0.15) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(56,189,248,0.3) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: background 0.15s, border-color 0.15s !important;
}
.nav-cta:hover { background: rgba(56,189,248,0.25) !important; border-color: rgba(56,189,248,0.5) !important; }

/* ── 히어로 ── */
.hero {
  margin-top: 60px;
  padding: 88px 0 80px;
  background: #0d1b2e;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(56,189,248,0.1) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -150px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(42,74,114,0.75) 0%, transparent 68%);
  pointer-events: none;
}
.hero-inner {
  max-width: 760px; margin: 0 auto; padding: 0 40px;
  text-align: center;
  position: relative; z-index: 1;
}
.hero-pills {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 28px;
}
.hero-pill {
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.25);
  color: rgba(255,255,255,0.7);
  padding: 5px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.1px;
}
.hero-title {
  font-size: 52px; font-weight: 800; color: #fff;
  line-height: 1.14; letter-spacing: -1.6px; margin-bottom: 20px;
}
.hero-title strong { color: #38bdf8; }
.hero-desc {
  font-size: 16px; color: rgba(255,255,255,0.6); line-height: 1.8; margin-bottom: 36px;
  max-width: 520px; margin-left: auto; margin-right: auto;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; }
.hero-btns a { flex: 1; max-width: 320px; text-align: center; }
.btn-main {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 28px;
  background: #fff; color: #0d1b2e;
  border-radius: 10px; font-size: 14px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(255,255,255,0.12);
  transition: box-shadow 0.2s, transform 0.2s;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255,255,255,0.18); }
.btn-sub {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 28px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.82);
  border: 1.5px solid rgba(255,255,255,0.22); border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.btn-sub:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.45); }

/* ── 공통 섹션 ── */
.section { padding: 56px 0; }
.section--white { background: #fff; }
.section--dark  { background: #0d1b2e; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.section-header { margin-bottom: 28px; }
.section-header h2 {
  font-size: 20px; font-weight: 800; color: #1e293b; letter-spacing: -0.4px;
  display: flex; align-items: center; gap: 10px;
}
.section-header h2::before {
  content: '';
  display: inline-block; flex-shrink: 0;
  width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, #38bdf8 0%, #4ade80 100%);
}
.section-header p { font-size: 13px; color: #94a3b8; margin-top: 6px; padding-left: 14px; }
/* 섹션 헤더 공통 가운데 정렬 + 줄간격 */
.section--white .section-header,
.section--dark .section-header { text-align: center; }
.section--white .section-header h2,
.section--dark .section-header h2 { justify-content: center; }
.section--white .section-header p,
.section--dark .section-header p { padding-left: 0; margin-top: 10px; line-height: 1.7; }
/* 다크 섹션 헤더 */
.section--dark .section-header h2 { color: #fff; }
.section--dark .section-header p  { color: rgba(255,255,255,0.45); }

/* ── 게임 카드 (라이트) ── */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.games-grid.grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 740px; margin: 0 auto; }
.games-grid.grid-1 { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
.country-empty-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.country-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.country-empty-btn--primary {
  background: #1e44a0;
  border: 1px solid #1e44a0;
  color: #fff;
}
.country-empty-btn--primary:hover {
  background: #18398a;
  border-color: #18398a;
}
.country-empty-btn--ghost {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}
.country-empty-btn--ghost:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.game-card {
  display: block; text-decoration: none;
  background: #fff;
  border-top: 3px solid #e2eaf4;
  border-right: 1px solid #e2eaf4;
  border-bottom: 1px solid #e2eaf4;
  border-left: 1px solid #e2eaf4;
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.game-card[data-continent="asia"]     { border-top-color: var(--c-asia); }
.game-card[data-continent="europe"]   { border-top-color: var(--c-europe); }
.game-card[data-continent="americas"] { border-top-color: var(--c-americas); }
.game-card[data-continent="oceania"]  { border-top-color: var(--c-oceania); }
.game-card:hover {
  border-right-color: #b8cfe8;
  border-bottom-color: #b8cfe8;
  border-left-color: #b8cfe8;
  box-shadow: 0 8px 28px rgba(30,68,160,0.1);
  transform: translateY(-2px);
}
.game-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.game-flag { font-size: 20px; line-height: 1; }
.game-country { font-size: 12px; font-weight: 600; color: #94a3b8; letter-spacing: 0.1px; }
.game-name { font-size: 15px; font-weight: 800; color: #1e293b; letter-spacing: -0.3px; margin-bottom: 6px; }
.game-rule { font-size: 13px; color: #64748b; line-height: 1.65; }
.game-schedule {
  display: inline-block; margin-top: 10px;
  background: #f1f5f9; border-radius: 6px;
  padding: 4px 9px; font-size: 12px; font-weight: 600; color: #475569;
}

/* ── 게임 카드 (다크 섹션) ── */
.section--dark .game-card {
  background: rgba(255,255,255,0.05);
  border-top-color: rgba(255,255,255,0.12);
  border-right-color: rgba(255,255,255,0.08);
  border-bottom-color: rgba(255,255,255,0.08);
  border-left-color: rgba(255,255,255,0.08);
}
.section--dark .game-card[data-continent="asia"]     { border-top-color: var(--c-asia); }
.section--dark .game-card[data-continent="europe"]   { border-top-color: var(--c-europe); }
.section--dark .game-card[data-continent="americas"] { border-top-color: var(--c-americas); }
.section--dark .game-card[data-continent="oceania"]  { border-top-color: var(--c-oceania); }
.section--dark .game-card:hover {
  background: rgba(255,255,255,0.09);
  border-right-color: rgba(255,255,255,0.2);
  border-bottom-color: rgba(255,255,255,0.2);
  border-left-color: rgba(255,255,255,0.2);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}
.section--dark .game-country { color: rgba(255,255,255,0.45); }
.section--dark .game-name    { color: #fff; }
.section--dark .game-rule    { color: rgba(255,255,255,0.55); }
.section--dark .game-schedule {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.65);
}

/* ── 기능 배지 ── */
.game-badges { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.badge--sim   { background: #eff6ff; color: #1d4ed8; }
.badge--stats { background: #f0fdf4; color: #15803d; }
.section--dark .badge--sim   { background: rgba(56,189,248,0.15); color: #7dd3fc; }
.section--dark .badge--stats { background: rgba(74,222,128,0.15); color: #86efac; }

/* ── 스크롤 섹션 ── */
.scroll-wrap { position: relative; }
.scroll-wrap::before,
.scroll-wrap::after {
  content: '';
  position: absolute; top: 0; bottom: 10px; width: 64px; z-index: 2; pointer-events: none;
}
.scroll-wrap::before { left: 0; background: linear-gradient(to right, #fff, transparent); }
.scroll-wrap::after  { right: 0; background: linear-gradient(to left, #fff, transparent); }
.section--dark .scroll-wrap::before { background: linear-gradient(to right, #0d1b2e, transparent); }
.section--dark .scroll-wrap::after  { background: linear-gradient(to left, #0d1b2e, transparent); }
.scroll-track {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: visible;
  scroll-behavior: smooth;
  padding: 4px 4px 12px;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}
.scroll-track::-webkit-scrollbar { display: none; }
.scroll-track.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.scroll-btn {
  position: absolute; top: 50%; transform: translateY(-60%);
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid #dde5f0;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  font-size: 18px; color: #475569; line-height: 1;
  transition: box-shadow 0.15s, background 0.15s;
}
.scroll-btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); background: #f8fafc; color: #1e293b; }
.section--dark .scroll-btn { background: #1a2f52; border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.section--dark .scroll-btn:hover { background: #243a5e; color: #fff; }
.scroll-btn-left  { left: -19px; }
.scroll-btn-right { right: -19px; }
.game-card--scroll { flex: 0 0 200px; }

/* ── 로딩 ── */
.geo-loading { padding: 40px; text-align: center; font-size: 14px; color: #94a3b8; }

/* ── 푸터 ── */
.footer {
  background: #0d1b2e;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 0;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.f-logo { font-size: 15px; font-weight: 800; color: #fff; }
.f-links { display: flex; gap: 26px; }
.f-links a { font-size: 13px; color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.15s; }
.f-links a:hover { color: #fff; }
.f-copy { font-size: 13px; color: rgba(255,255,255,0.35); }

.top-btn { position: fixed; right: 32px; bottom: 32px; width: 44px; height: 44px; border-radius: 50%; background: #1e44a0; color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 400; box-shadow: 0 2px 8px rgba(0,0,0,0.22); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.top-btn:hover { transform: translateY(-2px); }
.top-btn--visible { opacity: 1; pointer-events: auto; }
