/* Referral v2 Stylesheet - 모바일 우선, 다크 테마 */
:root {
  --bg: #0c0c0c;
  --bg2: #161616;
  --bg3: #1f1f1f;
  --bg4: #2a2a2a;
  --accent: #f59e0b;
  --accent2: #fbbf24;
  --text: #f0f0f0;
  --text2: #94a3b8;
  --text3: #64748b;
  --green: #22c55e;
  --red: #ef4444;
  --border: #2a2a2a;
}

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

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent2); text-decoration: none; }

/* ───── Blocked Region ───── */
.blocked-overlay { display: none; padding: 80px 20px; text-align: center; }
.blocked-overlay h2 { font-size: 28px; margin-bottom: 12px; }
.blocked-overlay p { color: var(--text2); margin-bottom: 20px; }
.blocked-overlay a { color: var(--accent); }
body.region-blocked #ref-main { display: none; }
body.region-blocked .blocked-overlay { display: block; }

/* ───── HERO ───── */
.hero {
  padding: 56px 20px 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(245,158,11,.08), transparent);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(245,158,11,.15);
  color: var(--accent);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(14px, 2.5vw, 17px);
  color: var(--text2);
  max-width: 700px;
  margin: 0 auto 24px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-stat .val {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 800;
  color: var(--accent2);
}
.hero-stat .lbl {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}

/* ───── 섹션 타이틀 공통 ───── */
.section-title {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  margin-bottom: 8px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-bottom: 16px;
}
.section-meta {
  text-align: center;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 16px;
}

/* ───── 이벤트 카루셀 ───── */
.events-section {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
}
.carousel-arrows {
  display: flex;
  gap: 8px;
}
.arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.arrow-btn:hover { background: var(--bg3); border-color: var(--accent); }

.events-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 20px 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.events-scroll::-webkit-scrollbar { display: none; }

.event-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  position: relative;
}
.event-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.event-card .banner { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg3); }
.event-card .meta { padding: 14px 16px 16px; }
.event-card .date {
  display: inline-block;
  padding: 3px 9px;
  background: var(--bg3);
  border-radius: 10px;
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 8px;
}
.event-card h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card .footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text2);
}
.event-card .footer img { width: 18px; height: 18px; border-radius: 4px; }

.event-skeleton {
  flex: 0 0 320px;
  height: 260px;
  background: linear-gradient(90deg, var(--bg2), var(--bg3), var(--bg2));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ───── 비교 섹션 ───── */
.compare-section {
  padding: 48px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.compare-section .section-title { text-align: center; }
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text2);
}
.sort-bar select {
  padding: 6px 12px;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* ───── PC: Table ───── */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th {
  text-align: left;
  padding: 14px 16px;
  background: var(--bg3);
  font-weight: 700;
  color: var(--text2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
.compare-table th.num { text-align: right; }
.compare-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table tbody tr:hover { background: var(--bg3); }
.compare-table tbody tr.featured {
  background: linear-gradient(90deg, rgba(245,158,11,.08), transparent);
}
.compare-table tbody tr.featured:hover { background: linear-gradient(90deg, rgba(245,158,11,.12), rgba(255,255,255,.02)); }

.compare-table .exch-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.compare-table .exch-cell img {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg);
  object-fit: contain;
}
.compare-table .exch-name { font-weight: 700; font-size: 15px; }
.compare-table .featured-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--accent);
  color: #000;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.compare-table .score-cell { font-weight: 800; font-size: 16px; color: var(--accent2); text-align: right; }
.compare-table .discount-cell { font-weight: 700; color: var(--green); text-align: right; }
.compare-table .fee-cell { font-family: ui-monospace, monospace; text-align: right; }
.compare-table .bonus-cell { font-weight: 600; color: var(--accent2); }
.compare-table .cta-btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-radius: 8px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .1s;
}
.compare-table .cta-btn:hover { transform: scale(1.05); }

/* ───── Mobile: Card Stack ───── */
.cards-stack { display: none; padding: 0; }
.cards-stack .card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
  position: relative;
}
.cards-stack .card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(245,158,11,.06), var(--bg2));
}
.cards-stack .card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.cards-stack .card-head img {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg);
  object-fit: contain;
}
.cards-stack .card-head h3 { font-size: 17px; font-weight: 800; }
.cards-stack .card-head .badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--accent);
  color: #000;
  border-radius: 4px;
  margin-left: 6px;
}
.cards-stack .card-head .score { margin-left: auto; font-size: 16px; font-weight: 800; color: var(--accent2); }
.cards-stack .card-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cards-stack .info-item { display: flex; flex-direction: column; }
.cards-stack .info-item .lbl { font-size: 11px; color: var(--text3); text-transform: uppercase; }
.cards-stack .info-item .val { font-size: 15px; font-weight: 700; margin-top: 2px; }
.cards-stack .info-item .val.discount { color: var(--green); }
.cards-stack .info-item .val.bonus { color: var(--accent2); }
.cards-stack .info-item .val.fee { font-family: ui-monospace, monospace; font-size: 13px; }
.cards-stack .card-cta {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #000;
  text-align: center;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

@media (max-width: 768px) {
  .table-wrap { display: none; }
  .cards-stack { display: block; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sort-bar { justify-content: flex-start; }
}

/* ───── How It Works ───── */
.howto-section {
  padding: 48px 20px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.howto-section .section-title { text-align: center; margin-bottom: 28px; }
.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.howto-step {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
}
.howto-step .step-num {
  display: inline-block;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 16px;
  line-height: 32px;
  text-align: center;
  margin-bottom: 12px;
}
.howto-step h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.howto-step p { font-size: 14px; color: var(--text2); line-height: 1.55; }

/* ───── Disclaimer ───── */
.disclaimer {
  padding: 28px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  max-width: 800px;
  margin: 0 auto;
}
.disclaimer p { line-height: 1.6; }
