/* This file holds the big page paint. */
:root {
    --bg: #17181a;
    --panel: rgba(30, 30, 32, 0.84);
    --panel-2: rgba(38, 38, 41, 0.92);
    --text: #edf2ff;
    --muted: #a8a9ad;
    --accent: #7cddff;
    --accent-2: #7b6cff;
    --border: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] {
    --bg: #f5f8ff;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-2: rgba(255, 255, 255, 0.98);
    --text: #10172a;
    --muted: #5c6477;
    --accent: #1363df;
    --accent-2: #4f46e5;
    --border: rgba(16, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Lato', system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(124, 221, 255, 0.10), transparent 30%),
        radial-gradient(circle at top right, rgba(123, 108, 255, 0.10), transparent 26%),
        linear-gradient(180deg, #0c0d0e, var(--bg));
    min-height: 100vh;
}
[data-theme="light"] body {
    background:
        radial-gradient(circle at top left, rgba(19, 99, 223, 0.10), transparent 30%),
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.10), transparent 26%),
        linear-gradient(180deg, #ffffff, var(--bg));
}
.site-shell { width: min(1400px, calc(100% - 24px)); margin: 0 auto; padding: 24px 0 40px; }
.topbar, .hero-card, .topics-section, .site-footer {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 22px;
    margin-bottom: 22px;
}
.brand-block { display: flex; gap: 18px; align-items: center; }
.brand-logo { width: 120px; height: 120px; object-fit: contain; }
.brand-logo-light { display: none; }
[data-theme="light"] .brand-logo-dark { display: none; }
[data-theme="light"] .brand-logo-light { display: block; }
.topbar, .topbar-actions, .topic-meta, .hero-stats { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar h1, .section-head h3, .hero-card h2 { margin: 0; }
.topbar p, .section-head p, .hero-card p, .topic-card p { color: var(--muted); margin: 0; }
.theme-toggle, .admin-link, .vote-btn {
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    border-radius: 999px;
    padding: 12px 16px;
    text-decoration: none;
}
h1, h2, h3, h4, h5, h6, .eyebrow, .stat-box strong, .topic-number {
    font-weight: 900;
}
p {
    padding-bottom: 15px;
}
.hero-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.eyebrow { display: inline-block; padding: 8px 12px; border-radius: 999px; background: rgba(124, 221, 255, 0.12); color: var(--accent); margin-bottom: 12px; }
.hero-stats { flex-wrap: wrap; justify-content: flex-end; }
.stat-box {
    min-width: 140px;
    padding: 18px;
    border-radius: 5px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    text-align: center;
}
.stat-box strong { display: block; font-size: 2rem; }
.topic-grid { display: grid; gap: 16px; }
.fixed-grid, .vote-grid, .all-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.topic-card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 18px;
}
.topic-card.fixed { border-color: rgba(255, 193, 7, 0.35); }
.topic-card.empty-slot { opacity: 0.45; border-style: dashed; }
.topic-number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(124, 221, 255, 0.15); margin-bottom: 12px; }
.topic-meta { margin-top: 14px; }
.vote-btn { width: 48px; height: 48px; display: grid; place-items: center; }
.vote-btn-loading, .vote-btn-voted {
    background: #ff8a00;
    border-color: #ff8a00;
    color: #ffffff;
    animation: votePulse 1.1s ease-in-out infinite;
}
.vote-btn-loading i, .vote-btn-voted i {
    color: #ffffff;
}
@keyframes votePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 138, 0, 0.35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 138, 0, 0);
        transform: scale(1.04);
    }
}
.suggest-form { padding: 18px; border-radius: 5px; background: var(--panel-2); }
.site-footer { text-align: center; }
.social-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 12px; }
.social-links a {
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
    background: rgba(124, 221, 255, 0.12); color: var(--text); text-decoration: none;
}
@media (max-width: 992px) {
    .hero-card, .topbar { grid-template-columns: 1fr; flex-direction: column; align-items: flex-start; }
    .fixed-grid, .vote-grid, .all-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
    .site-shell { width: min(100% - 14px, 100%); }
    .fixed-grid, .vote-grid, .all-grid { grid-template-columns: 1fr; }
}
