/* ================================
   CSS Variables & Theme
   ================================ */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f8fafc;
    --container-bg: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --number-bg: #f1f5f9;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #1e293b;
    --footer-text: #cbd5e1;
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-hover: #a5b4fc;
    --bg-color: #0f172a;
    --container-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --number-bg: #334155;
    --nav-bg: rgba(30, 41, 59, 0.95);
    --footer-bg: #020617;
    --footer-text: #94a3b8;
}

/* ================================
   Base Styles
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ================================
   Theme Toggle
   ================================ */
.theme-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background-color: var(--container-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: inline;
}

/* ================================
   Navigation
   ================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px var(--shadow-color);
    z-index: 999;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu a {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: var(--primary-color);
    color: white;
}

/* ================================
   Hero Section
   ================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
    text-align: center;
    padding: 120px 20px 60px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.hero-small {
    padding: 100px 20px 40px;
}

/* ================================
   Main Content
   ================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ================================
   Container / Card
   ================================ */
.container {
    background-color: var(--container-bg);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: all 0.3s ease;
}

.container h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-color);
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ================================
   Lotto Generator
   ================================ */
.generator-section {
    text-align: center;
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0;
}

.number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--number-bg);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.number.yellow { background-color: #fbbf24; color: #1e293b; }
.number.blue { background-color: #3b82f6; color: white; }
.number.red { background-color: #ef4444; color: white; }
.number.gray { background-color: #6b7280; color: white; }
.number.green { background-color: #22c55e; color: white; }

#generate-btn {
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#generate-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.generator-tip {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ================================
   Info Grid / Cards
   ================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ================================
   Color Guide
   ================================ */
.color-guide {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.color-ball.yellow { background-color: #fbbf24; color: #1e293b; }
.color-ball.blue { background-color: #3b82f6; }
.color-ball.red { background-color: #ef4444; }
.color-ball.gray { background-color: #6b7280; }
.color-ball.green { background-color: #22c55e; }

/* ================================
   Tips List
   ================================ */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tip-item {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.tip-item h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.tip-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ================================
   Tables
   ================================ */
.table-container {
    overflow-x: auto;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.info-table th,
.info-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.info-table th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
}

.info-table td {
    color: var(--text-secondary);
}

.info-table tr:hover td {
    background-color: var(--bg-color);
}

/* ================================
   Statistics
   ================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.stat-card.highlight {
    border: 2px solid var(--primary-color);
}

.stat-card h3 {
    margin-bottom: 16px;
    color: var(--text-color);
}

.stat-numbers {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.stat-ball.yellow { background-color: #fbbf24; color: #1e293b; }
.stat-ball.blue { background-color: #3b82f6; }
.stat-ball.red { background-color: #ef4444; }
.stat-ball.gray { background-color: #6b7280; }
.stat-ball.green { background-color: #22c55e; }

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.color-dot.yellow { background-color: #fbbf24; }
.color-dot.blue { background-color: #3b82f6; }
.color-dot.red { background-color: #ef4444; }
.color-dot.gray { background-color: #6b7280; }
.color-dot.green { background-color: #22c55e; }

/* ================================
   Article Content
   ================================ */
.content-article {
    max-width: 800px;
    margin: 0 auto 24px;
}

.content-article h2 {
    font-size: 1.5rem;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.content-article h3 {
    font-size: 1.2rem;
    margin: 24px 0 12px;
    color: var(--text-color);
}

.content-article p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-article ul,
.content-article ol {
    color: var(--text-secondary);
    margin: 16px 0;
    padding-left: 24px;
}

.content-article li {
    margin-bottom: 8px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

/* FAQ */
.faq-list {
    margin-top: 20px;
}

.faq-item {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.faq-item p {
    margin-bottom: 0;
}

/* Legal Content */
.legal-content h2:first-of-type {
    margin-top: 0;
}

/* ================================
   CTA Section
   ================================ */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
}

.cta-section h2 {
    color: white;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--primary-hover);
}

/* ================================
   Contact Form
   ================================ */
.contact-container {
    max-width: 700px;
    margin: 0 auto 24px;
}

.contact-info {
    margin-bottom: 32px;
}

.contact-methods {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-color);
    padding: 16px 20px;
    border-radius: 10px;
    flex: 1;
    min-width: 200px;
}

.contact-icon {
    font-size: 2rem;
}

.contact-method h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-method p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.contact-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background-color: var(--container-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

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

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

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--primary-hover);
}

/* ================================
   Comments
   ================================ */
.comments-container h2 {
    margin-bottom: 8px;
}

#disqus_thread {
    margin-top: 20px;
}

/* ================================
   Footer
   ================================ */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 20px 30px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--footer-text);
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid #334155;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .container {
        padding: 24px 20px;
    }

    .number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-methods {
        flex-direction: column;
    }

    .theme-toggle {
        top: 70px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .lotto-numbers {
        gap: 8px;
    }

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

    #generate-btn {
        width: 100%;
        padding: 14px 24px;
    }

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