/* ==========================================================
   wemixswap.co 리뉴얼 — LUX Airdrop
   다크 테마 + 골드 액센트 (Four Gods 게임 무드)
   ========================================================== */

:root {
    --bg:        #0c0f16;
    --bg-soft:   #11151f;
    --surface:   #171c2a;
    --surface-2: #1e2436;
    --border:    #2a3148;
    --text:      #eef1f8;
    --muted:     #98a2ba;
    --accent:    #f2b73f;
    --accent-dk: #d99a17;
    --success:   #4ade80;
    --error:     #f87171;
    --radius:    16px;
    --maxw:      960px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

@font-face {
    font-family: 'NEXON Lv1';
    src: url('../font/NEXONLv1Gothic-OTF.woff') format('woff');
    font-display: swap;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(12, 15, 22, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.brand { display: flex; align-items: center; font-family: 'NEXON Lv1', 'Pretendard', sans-serif; font-weight: 700; font-size: 17px; }
.brand img { height: 34px; width: auto; margin-right: 10px; }
.gnb { display: flex; font-size: 14px; color: var(--muted); }
.gnb a { margin-left: 22px; }
.gnb a:hover { color: var(--text); }
@media (max-width: 640px) { .gnb { display: none; } }

/* ---------- 히어로 ---------- */
.hero {
    position: relative;
    padding: 72px 0 56px;
    text-align: center;
    background:
        radial-gradient(600px 300px at 50% -60px, rgba(242, 183, 63, .16), transparent 70%),
        var(--bg);
    overflow: hidden;
}
.hero-tag {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent);
    font-size: 13px; font-weight: 600;
    margin-bottom: 20px;
}
.hero h1 {
    font-family: 'NEXON Lv1', 'Pretendard', sans-serif;
    font-size: clamp(30px, 5.4vw, 48px);
    line-height: 1.25;
    letter-spacing: -0.5px;
}
.hero h1 .gold { color: var(--accent); }
.hero p.lead {
    margin: 18px auto 0;
    max-width: 560px;
    color: var(--muted);
    font-size: 16px;
}

/* 통계 칩 */
.stats {
    display: flex; justify-content: center; gap: 12px;
    flex-wrap: wrap; margin-top: 32px;
}
.stat {
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
}
.stat b { display: block; font-size: 22px; color: var(--accent); font-family: 'NEXON Lv1', 'Pretendard', sans-serif; }
.stat span { font-size: 13px; color: var(--muted); }

/* 카운트다운 */
.countdown-box { margin-top: 28px; font-size: 14px; color: var(--muted); }
.countdown {
    display: inline-flex; gap: 6px; margin-left: 8px;
    font-family: 'NEXON Lv1', 'Pretendard', sans-serif;
    font-size: 18px; color: var(--text); font-weight: 700;
}
.countdown span { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px 10px; }

/* ---------- 섹션 공통 ---------- */
section.block { padding: 48px 0; }
.sec-title {
    font-family: 'NEXON Lv1', 'Pretendard', sans-serif;
    font-size: 22px; margin-bottom: 24px; text-align: center;
}
.sec-title small { display: block; color: var(--accent); font-size: 13px; margin-bottom: 8px; letter-spacing: 2px; }

/* ---------- 신청 카드 ---------- */
.apply-card {
    max-width: 560px; margin: -20px auto 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.apply-card .wallet-logo { display: flex; align-items: center; margin-bottom: 18px; }
.apply-card .wallet-logo img { height: 26px; border-radius: 6px; margin-right: 10px; flex-shrink: 0; }
.apply-card .wallet-logo b { font-size: 15px; }
.apply-card label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.apply-card input[type=text] {
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    padding: 14px 16px;
    outline: none;
    transition: border-color .15s;
}
.apply-card input[type=text]:focus { border-color: var(--accent); }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%;
    border: 0; border-radius: 12px;
    padding: 15px;
    font-size: 15px; font-weight: 700;
    transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.985); }
.btn-gold { background: linear-gradient(180deg, var(--accent), var(--accent-dk)); color: #1a1204; margin-top: 14px; }
.btn-outline {
    background: transparent; color: var(--accent);
    border: 1px solid var(--accent); margin-top: 10px;
}
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.result-msg {
    margin-top: 16px; padding: 12px 16px;
    border-radius: 12px; font-size: 14px;
}
.result-msg.ok { background: rgba(74, 222, 128, .1); color: var(--success); border: 1px solid rgba(74, 222, 128, .3); }
.result-msg.err { background: rgba(248, 113, 113, .1); color: var(--error); border: 1px solid rgba(248, 113, 113, .3); }

/* ---------- 광고 컴포넌트 ---------- */
.ad-badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0, 0, 0, .65);
    color: #fff; font-size: 10px; font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px; border-radius: 6px;
    z-index: 2;
}

/* 가로형 광고 카드 */
.ad-card {
    position: relative;
    display: flex; align-items: center;
    max-width: 560px; margin: 28px auto 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color .15s, transform .15s;
}
.ad-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.ad-thumb {
    flex: 0 0 92px; height: 92px;
    border-radius: 10px; overflow: hidden;
}
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ad-body { display: flex; flex-direction: column; min-width: 0; margin-left: 18px; }
.ad-body strong { font-size: 15px; }
.ad-body span { font-size: 13px; color: var(--muted); }
.ad-body em { font-style: normal; font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 4px; }

/* 데스크톱 사이드 레일 */
.ad-side {
    position: fixed; right: 24px; top: 50%;
    transform: translateY(-50%);
    width: 150px; z-index: 40;
    border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border);
    display: block;
}
.ad-side img { width: 100%; }
.ad-side .ad-side-cta {
    display: block; text-align: center;
    background: var(--surface); color: var(--accent);
    font-size: 12px; font-weight: 700; padding: 8px 0;
}
@media (max-width: 1320px) { .ad-side { display: none; } }

/* 하단 고정 스티키 바 */
.ad-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(23, 28, 42, .97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    display: none;
}
.ad-sticky.show { display: block; }
.ad-sticky .inner {
    max-width: var(--maxw); margin: 0 auto;
    display: flex; align-items: center;
}
.ad-sticky .inner > * + * { margin-left: 12px; }
.ad-sticky .thumb { flex: 0 0 44px; height: 44px; border-radius: 8px; overflow: hidden; }
.ad-sticky .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ad-sticky .txt { flex: 1; min-width: 0; font-size: 13px; }
.ad-sticky .txt b { display: block; font-size: 14px; }
.ad-sticky .txt span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ad-sticky .go {
    flex: 0 0 auto;
    background: linear-gradient(180deg, var(--accent), var(--accent-dk));
    color: #1a1204; font-size: 13px; font-weight: 700;
    padding: 9px 16px; border-radius: 10px;
}
.ad-sticky .x {
    flex: 0 0 auto; background: none; border: 0;
    color: var(--muted); font-size: 18px; line-height: 1; padding: 6px;
}

/* 진입 팝업 & 전면 광고 (공용 오버레이) */
.overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(5, 7, 12, .82);
    display: none;
    align-items: center; justify-content: center;
    padding: 24px;
}
.overlay.show { display: flex; }

.popup-ad {
    position: relative;
    width: min(320px, 86vw);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}
.popup-ad img { width: 100%; aspect-ratio: 720/1100; object-fit: cover; object-position: top; }
.popup-ad .popup-actions {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; font-size: 13px; color: var(--muted);
}
.popup-ad .popup-actions label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.popup-ad .popup-actions button { background: none; border: 0; color: var(--text); font-size: 14px; font-weight: 700; }

/* 전면(인터스티셜) */
.interstitial { position: relative; width: min(400px, 92vw); }
.interstitial img { width: 100%; border-radius: 18px; }
.interstitial .count {
    position: absolute; top: 14px; right: 14px;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(0, 0, 0, .7); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
}
.interstitial .close-x {
    position: absolute; top: 14px; right: 14px;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(0, 0, 0, .7); color: #fff;
    border: 1px solid rgba(255, 255, 255, .4);
    font-size: 18px; line-height: 1;
    display: none;
}

/* ---------- 참여 방법 스텝 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 760px; margin: 0 auto; }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
}
.step .num {
    width: 40px; height: 40px; margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--accent);
    color: var(--accent); font-weight: 700; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'NEXON Lv1', 'Pretendard', sans-serif;
}
.step b { display: block; margin-bottom: 6px; font-size: 15px; }
.step span { font-size: 13px; color: var(--muted); }

/* ---------- 이벤트 상세 그리드 ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .info-grid { grid-template-columns: 1fr; } }
.info-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.info-item b { display: block; font-size: 13px; color: var(--accent); margin-bottom: 6px; }
.info-item span { font-size: 15px; }

/* 유의사항 */
.notice { max-width: 720px; margin: 0 auto; }
.notice li {
    list-style: none; position: relative;
    padding: 8px 0 8px 20px;
    color: var(--muted); font-size: 14px;
}
.notice li::before {
    content: ''; position: absolute; left: 0; top: 16px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
}

/* ---------- 완료 페이지 ---------- */
.done-hero { text-align: center; padding: 80px 0 40px; }
.done-hero .check {
    width: 84px; height: 84px; margin: 0 auto 24px;
    border-radius: 50%;
    background: rgba(74, 222, 128, .12);
    border: 2px solid var(--success);
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; color: var(--success);
    animation: pop .5s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done-hero h1 { font-family: 'NEXON Lv1', 'Pretendard', sans-serif; font-size: clamp(24px, 4.5vw, 34px); }
.done-hero p { margin-top: 14px; color: var(--muted); max-width: 480px; margin-inline: auto; font-size: 15px; }
.done-hero p i { font-style: normal; color: var(--accent); font-weight: 700; }
.done-actions { max-width: 360px; margin: 28px auto 0; }

/* ---------- 푸터 ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 110px; /* 스티키 광고 높이만큼 여유 */
    text-align: center;
    color: var(--muted); font-size: 12.5px;
}
.site-footer .disclosure {
    max-width: 640px; margin: 0 auto 16px;
    padding: 10px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.site-footer a { color: var(--muted); text-decoration: underline; }
