
/* ===== CSS Variables ===== */
:root {
    --bg: #1a1a2e;
    --bg-alt: #16213e;
    --surface: #0f3460;
    --surface-2: #1a1a2e;
    --text: #e0e0e0;
    --text-muted: #9e9e9e;
    --accent: #ffde00;
    --accent-2: #e94560;
    --border: rgba(255,255,255,0.1);
    --shadow: rgba(0,0,0,0.4);
    --radius: 12px;
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

[data-theme="light"] {
    --bg: #f5f7fa;
    --bg-alt: #eef1f5;
    --surface: #ffffff;
    --surface-2: #f0f4f8;
    --text: #2d3748;
    --text-muted: #718096;
    --accent: #e53e3e;
    --accent-2: #3182ce;
    --border: rgba(0,0,0,0.1);
    --shadow: rgba(0,0,0,0.08);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

code {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    flex: 1;
}

.site-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
    color: var(--text);
    background: var(--border);
    text-decoration: none;
}

.theme-btn {
    margin-left: auto;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-body);
    white-space: nowrap;
    transition: background 0.2s;
}
.theme-btn:hover { background: var(--surface-2); }

/* ===== Ad Units ===== */
.ad-leaderboard {
    width: 100%;
    background: var(--bg-alt);
    padding: 0.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    min-height: 90px;
}

.ad-unit {
    width: 100%;
    margin: 1.5rem 0;
    min-height: 100px;
}

.ad-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Page Layout ===== */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .page-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ===== Main Content ===== */
.main-content {
    min-width: 0;
}

/* ===== Hero Section ===== */
.hero-section {
    text-align: center;
    padding: 2rem 0 1rem;
    margin-bottom: 1rem;
}

.hero-title {
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-shadow: 0 0 20px rgba(255,222,0,0.3);
}

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

lotto-generator {
    display: block;
    width: 100%;
}

/* ===== Content Sections ===== */
.content-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.content-section h2 {
    color: var(--accent);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ===== Steps List ===== */
.steps-list {
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.steps-list li {
    padding-left: 0.5rem;
}

.steps-list strong {
    display: block;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.steps-list p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ===== Prize Table ===== */
.prize-table-wrap {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.prize-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.prize-table th,
.prize-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.prize-table th {
    background: var(--surface-2);
    color: var(--accent);
    font-weight: 700;
}

.prize-table tr:hover td {
    background: var(--surface-2);
}

.prize-table td:first-child {
    font-weight: 700;
    color: var(--accent);
}

/* ===== Tips Grid ===== */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.tip-card {
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 1.2rem;
    border: 1px solid var(--border);
}

.tip-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.tip-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

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

/* ===== FAQ ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.faq-item {
    background: var(--surface-2);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--accent);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 1.2rem 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ===== Contact Form ===== */
.contact-form .form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

input, textarea {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--accent);
    color: #1a1a1a;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.2s, transform 0.2s;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* ===== Sidebar ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 80px;
}

.sidebar-ad {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 0.8rem;
    border: 1px solid var(--border);
    min-height: 260px;
    text-align: center;
}

.sidebar-widget {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.2rem;
    border: 1px solid var(--border);
}

.sidebar-widget h3 {
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
}

.quick-info {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.quick-info li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.quick-info li:last-child { border-bottom: none; }

.sidebar-widget p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    color: var(--text-muted);
    font-size: 0.78rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== Privacy Policy Page ===== */
.policy-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.policy-content h1 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.policy-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.policy-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    font-size: 1.15rem;
}

.policy-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.policy-content li { color: var(--text-muted); }

/* ===== Lotto Generator (Shadow DOM uses host CSS variables) ===== */

/* ===== Mobile ===== */
@media (max-width: 600px) {
    .header-inner {
        padding: 0.7rem 1rem;
        gap: 0.8rem;
    }

    .site-nav {
        order: 3;
        width: 100%;
    }

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

    .content-section {
        padding: 1.2rem;
    }
}
