@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* ===== CSS 변수 ===== */
:root {
    --background-color: #f0f2f5;
    --container-bg: #ffffff;
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --text-color: #333;
    --text-muted: #666;
    --white: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --toggle-bg: #e0e0e0;
    --toggle-color: #333;
    --border-color: #ddd;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #2d3748;
    --footer-text: #e2e8f0;
    --card-bg: #f8fafc;
    --step-bg: #eef4ff;
}

[data-theme="dark"] {
    --background-color: #1a1a2e;
    --container-bg: #16213e;
    --primary-color: #6eb5ff;
    --secondary-color: #50e3c2;
    --text-color: #e0e0e0;
    --text-muted: #aaa;
    --white: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --toggle-bg: #0f3460;
    --toggle-color: #e0e0e0;
    --border-color: #3a3a5c;
    --nav-bg: rgba(22, 33, 62, 0.97);
    --footer-bg: #0f0f1a;
    --footer-text: #aaa;
    --card-bg: #1e2a45;
    --step-bg: #1e2a45;
}

/* ===== 기본 ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-image: url('https://www.transparenttextures.com/patterns/subtle-zebra-3d.png');
}

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

a:hover {
    text-decoration: underline;
}

/* ===== 내비게이션 ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: background 0.3s ease;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    flex: 1;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

#theme-toggle {
    background: var(--toggle-bg);
    color: var(--toggle-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--shadow-color);
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

/* ===== 섹션 공통 ===== */
.section {
    padding: 3rem 1rem;
}

.container {
    background-color: var(--container-bg);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

/* ===== 히어로 ===== */
.hero-section .container {
    max-width: 700px;
}

.hero-section h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ===== 로또 번호 생성기 ===== */
.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.number:empty {
    background: var(--border-color);
}

/* ===== 버튼 ===== */
button {
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== 광고 래퍼 ===== */
.ad-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== 정보 카드 그리드 ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    text-align: left;
    margin-top: 1.5rem;
}

.info-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.4rem;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.info-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.7rem;
    font-size: 1rem;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.prize-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.prize-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.prize-list li:last-child {
    border-bottom: none;
}

/* ===== 이용 방법 ===== */
.steps {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.step {
    background: var(--step-bg);
    border-radius: 12px;
    padding: 1.5rem;
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.7rem;
}

.step h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ===== 제휴 문의 폼 ===== */
.contact-container {
    text-align: left;
}

.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

#submit-btn {
    width: 100%;
    margin-top: 0.5rem;
}

#form-status {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    min-height: 1.2em;
    text-align: center;
}

#form-status.success { color: #27ae60; }
#form-status.error   { color: #e74c3c; }

/* ===== Disqus ===== */
.disqus-container {
    text-align: left;
}

#disqus_thread { color-scheme: light; }
[data-theme="dark"] #disqus_thread { color-scheme: dark; }

/* ===== 개인정보처리방침 ===== */
.privacy-section {
    min-height: calc(100vh - 120px);
}

.privacy-container {
    text-align: left;
    max-width: 750px;
}

.privacy-container h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.privacy-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.privacy-container h2 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}

.privacy-container p,
.privacy-container li {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.privacy-container ul {
    padding-left: 1.3rem;
}

/* ===== 푸터 ===== */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 1rem;
    text-align: center;
    transition: background 0.3s ease;
}

.footer-inner {
    max-width: 700px;
    margin: 0 auto;
}

.footer-logo {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--footer-text);
    font-size: 0.85rem;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-copy {
    font-size: 0.78rem;
    opacity: 0.6;
    margin: 0;
}

/* ===== 반응형 ===== */
@media (max-width: 600px) {
    .nav-links {
        display: none;
    }

    .container {
        padding: 1.5rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .lotto-numbers {
        gap: 0.6rem;
    }

    .number {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step {
        max-width: 100%;
    }
}
