:root {
    --bg: #0f1216;
    --surface: #171c22;
    --surface-strong: #1f2731;
    --card: #1a2028;
    --text: #f4f6f8;
    --muted: #b7c0cc;
    --accent: #f59f0b;
    --accent-strong: #f97316;
    --accent-soft: rgba(245, 159, 11, 0.15);
    --border: #2b3440;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    --success: #22c55e;
    --danger: #f97316;
    --font: "SUIT", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

body.light-mode {
    --bg: #f6f2eb;
    --surface: #ffffff;
    --surface-strong: #f6efe6;
    --card: #ffffff;
    --text: #1c1e21;
    --muted: #5f6b76;
    --accent: #c2410c;
    --accent-strong: #ea580c;
    --accent-soft: rgba(194, 65, 12, 0.15);
    --border: #e5ded4;
    --shadow: 0 18px 35px rgba(16, 24, 40, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: radial-gradient(circle at top, rgba(245, 159, 11, 0.1), transparent 55%),
        linear-gradient(160deg, #0d1014, #10161d 40%, #121a22 70%, #0f1216);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

body.light-mode {
    background: radial-gradient(circle at top, rgba(194, 65, 12, 0.12), transparent 55%),
        linear-gradient(160deg, #f7f0e6, #f5efe6 40%, #f8f4ee 70%, #f6f2eb);
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 28px 6vw 10px;
    position: sticky;
    top: 0;
    backdrop-filter: blur(16px);
    background: linear-gradient(180deg, rgba(15, 18, 22, 0.85), rgba(15, 18, 22, 0.5));
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .site-header {
    background: linear-gradient(180deg, rgba(246, 242, 235, 0.95), rgba(246, 242, 235, 0.75));
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-header.compact {
    padding-bottom: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(245, 159, 11, 0.4);
}

.brand-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.brand-subtitle {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 18px;
    font-size: 0.95rem;
    color: var(--muted);
}

.site-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

body.light-mode .site-nav a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: var(--shadow);
}

.theme-toggle-btn:hover {
    transform: translateY(-1px);
}

.page {
    padding: 24px 6vw 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
    align-items: center;
    margin-top: 20px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: var(--muted);
    margin: 0 0 12px;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.15;
    margin: 0 0 18px;
}

.hero-accent {
    display: block;
    color: var(--accent);
    margin-top: 8px;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--muted);
    margin: 0 0 24px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #111;
    box-shadow: 0 12px 24px rgba(245, 159, 11, 0.25);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
}

.ghost-btn {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.hero-card {
    background: var(--card);
    padding: 26px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero-card h2 {
    margin: 0 0 12px;
}

.checklist {
    margin: 0 0 16px;
    padding-left: 18px;
    color: var(--muted);
}

.hero-note {
    font-size: 0.9rem;
    color: var(--muted);
    border-top: 1px dashed var(--border);
    padding-top: 12px;
    margin: 0;
}

.section {
    margin-top: 60px;
}

.section-head h2,
.section-head h1 {
    margin: 0 0 8px;
    font-size: 1.9rem;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
    background: var(--card);
    padding: 24px;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.panel-head h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

.panel-head p {
    margin: 0 0 18px;
    color: var(--muted);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-row label {
    font-size: 0.85rem;
    color: var(--muted);
}

.form-row input,
.form-row textarea,
.affiliate-form input,
.affiliate-form textarea {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 16px;
}

.helper-text {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 16px;
}

.lotto-sets {
    display: grid;
    gap: 12px;
}

.lotto-set {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lotto-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #0b0b0b;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.disclaimer {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 10px 0 0;
}

.favorites-list {
    display: grid;
    gap: 14px;
}

.favorite-item {
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.favorite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.favorite-actions {
    display: flex;
    gap: 8px;
}

.result-box {
    background: var(--surface-strong);
    border-radius: 14px;
    padding: 14px;
    min-height: 48px;
    color: var(--text);
}

.info-card h3 {
    margin-top: 0;
}

.info-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.source-note {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.85rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.affiliate-form {
    display: grid;
    gap: 12px;
}

.submit-btn {
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.form-note {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 10px 0 0;
}

.site-footer {
    padding: 40px 6vw 50px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    color: var(--muted);
}

.footer-title {
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--text);
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.policy h2 {
    margin-top: 20px;
}

.policy h2:first-child {
    margin-top: 0;
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .grid.two,
    .grid.three,
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .site-header {
        grid-template-columns: 1fr;
        position: static;
    }

    .site-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }

    .lotto-number {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }

    .theme-toggle-btn {
        width: 100%;
    }
}
