:root {
    --bg-color: #f8fafc;
    --container-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --ball-bg: #10b981;
    --ball-text: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --border: #e2e8f0;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --container-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --ball-bg: #34d399;
    --ball-text: #0f172a;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --nav-bg: rgba(30, 41, 59, 0.8);
    --border: #334155;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Nav */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
}

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

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

.nav-links a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: var(--border);
}

/* Sections */
main {
    padding-top: 5rem;
}

section {
    padding: 5rem 0;
}

.text-left {
    text-align: left;
}

h1, h2, h3 {
    margin-top: 0;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 2rem; text-align: center; }
.text-left h2 { text-align: left; }

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    text-align: center;
}

/* Generator */
.hero-section {
    text-align: center;
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--border) 100%);
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 3rem 0;
}

.lotto-number {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: var(--ball-bg);
    color: var(--ball-text);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: popIn 0.5s ease-out forwards;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.lotto-number:hover {
    transform: scale(1.15) rotate(5deg);
}

#generator-btn {
    background-color: var(--accent);
    color: white;
    padding: 1.25rem 3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.2s;
}

#generator-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

#generator-btn:active { transform: translateY(0); }

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

.info-card {
    background: var(--container-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
}

.info-card h3 { color: var(--accent); margin-bottom: 1rem; }
.info-card p { color: var(--text-muted); margin: 0; }

/* Content Section */
.content-section {
    background: var(--container-bg);
}

.rich-content {
    max-width: 800px;
    margin: 0 auto;
}

.rich-content h3 { margin-top: 2rem; }
.rich-content ul { padding-left: 1.2rem; }
.rich-content li { margin-bottom: 0.5rem; }

/* Form Section */
.inquiry-form {
    max-width: 600px;
    margin: 2rem auto 0;
    display: grid;
    gap: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

#submit-btn {
    background: var(--accent);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* Footer */
.main-footer {
    background: var(--container-bg);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { text-decoration: none; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.3s;
}

.modal-content {
    background: var(--container-bg);
    padding: 3rem;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none;
    font-size: 2rem; color: var(--text-muted);
    cursor: pointer;
}

.hidden { display: none; opacity: 0; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    h1 { font-size: 2rem; }
}
