/*
 * Tết 2026 palette: loads after the default theme CSS.
 * Override CSS variables first, then the literal gradients used by home.css.
 */

:root {
    --primary: #e11d48;
    --primary-strong: #be123c;
    --secondary: #f59e0b;
    --accent: #fde68a;
    --background: #1a0b0f;
    --surface: #2a1118;
    --surface-strong: #3a1620;
    --text: #fff7ed;
    --muted: #fecdd3;
    --line: rgba(253, 230, 138, 0.22);
    --shadow: 0 18px 50px rgba(69, 10, 20, 0.45);
}

.hero {
    background: linear-gradient(135deg, #2a0b12 0%, #4a0f1c 40%, #1a0b0f 100%);
}

.servers-section {
    background: linear-gradient(180deg, rgba(42, 17, 24, 0.75), rgba(26, 11, 15, 0.96));
}

.server-card {
    background: rgba(42, 17, 24, 0.94);
    border-color: rgba(253, 230, 138, 0.2);
}

.server-card-header {
    background: linear-gradient(135deg, rgba(58, 22, 32, 1), rgba(74, 15, 28, 1));
}

.server-specs,
.server-actions {
    background: rgba(42, 17, 24, 0.85);
}

.discord-section {
    background: radial-gradient(circle at top left, rgba(225, 29, 72, 0.22), transparent 28%), #1a0b0f;
}

.donate-section {
    background: linear-gradient(180deg, rgba(253, 230, 138, 0.05), rgba(225, 29, 72, 0.04));
}

.donate-content {
    background: rgba(42, 17, 24, 0.95);
    border-color: rgba(253, 230, 138, 0.24);
}

/* Vietnamese gold stars falling behind the content. */
body {
    isolation: isolate;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-repeat: repeat;
    will-change: background-position, opacity;
}

body::before {
    opacity: 0.38;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath fill='%23fde68a' transform='translate(22 18) scale(0.62)' d='M12 2l2.9 6.1 6.7.9-4.9 4.6 1.2 6.6L12 17.1 6.1 20.2l1.2-6.6L2.4 9l6.7-.9L12 2z'/%3E%3Cpath fill='%23f59e0b' transform='translate(96 86) scale(0.44)' d='M12 2l2.9 6.1 6.7.9-4.9 4.6 1.2 6.6L12 17.1 6.1 20.2l1.2-6.6L2.4 9l6.7-.9L12 2z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='190' viewBox='0 0 190 190'%3E%3Cpath fill='%23fde68a' transform='translate(70 52) scale(0.4)' d='M12 2l2.9 6.1 6.7.9-4.9 4.6 1.2 6.6L12 17.1 6.1 20.2l1.2-6.6L2.4 9l6.7-.9L12 2z'/%3E%3C/svg%3E");
    background-size: 140px 140px, 190px 190px;
    animation: tet-stars-fall 24s linear infinite;
}

body::after {
    opacity: 0.2;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cpath fill='%23fde68a' transform='translate(120 96) scale(0.34)' d='M12 2l2.9 6.1 6.7.9-4.9 4.6 1.2 6.6L12 17.1 6.1 20.2l1.2-6.6L2.4 9l6.7-.9L12 2z'/%3E%3C/svg%3E");
    background-size: 260px 260px;
    animation: tet-stars-fall-slow 38s linear infinite reverse, tet-stars-twinkle 8s ease-in-out infinite;
}

@keyframes tet-stars-fall {
    from { background-position: 0 0, 0 0; }
    to { background-position: 46px 700px, -34px 1040px; }
}

@keyframes tet-stars-fall-slow {
    from { background-position: 0 0; }
    to { background-position: -70px 900px; }
}

@keyframes tet-stars-twinkle {
    0%, 100% { opacity: 0.16; }
    50% { opacity: 0.38; }
}

@media (max-width: 760px) {
    body::before {
        opacity: 0.34;
    }

    body::after {
        opacity: 0.18;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none !important;
    }

    body::after {
        opacity: 0.14;
    }
}

/* Tết red-dominant palette; the forum keeps its layout and rounding. */
.forum-page {
    --bg: #1a0b0f;
    --bg-soft: #240d13;
    --surface: rgba(42, 17, 24, 0.94);
    --surface-strong: #3a1620;
    --surface-alt: #2a1118;
    --primary: #e11d48;
    --primary-strong: #be123c;
    --secondary: #f59e0b;
    --secondary-strong: #d97706;
    --accent: #fde68a;
    --text: #fff7ed;
    --muted: #fecdd3;
    --line: rgba(253, 230, 138, 0.22);
    --shadow: 0 18px 50px rgba(69, 10, 20, 0.45);
    background:
        radial-gradient(circle at 8% 0, rgba(253, 230, 138, 0.08), transparent 25rem),
        radial-gradient(circle at 90% 8%, rgba(225, 29, 72, 0.22), transparent 28rem),
        var(--bg);
}

/* A little Tết colour on the forum; category rounding stays unchanged. */
.forum-header {
    background: rgba(26, 11, 15, 0.94);
    box-shadow: inset 0 2px 0 rgba(242, 193, 78, 0.7), inset 0 -1px 0 rgba(225, 29, 72, 0.22);
}

.forum-brand small {
    color: var(--secondary);
}

.forum-panel h2::after,
.forum-section-heading h2::after {
    content: "";
    display: block;
    width: 46px;
    height: 2px;
    margin-top: 6px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.forum-nav > a:hover,
.forum-nav-button:hover,
.forum-nav > a[aria-current="page"] {
    background: rgba(225, 29, 72, 0.1);
    color: var(--accent);
}

.forum-button {
    border-color: rgba(242, 193, 78, 0.55);
    background: linear-gradient(135deg, #e11d48, #b91c1c);
    color: #fff7ed;
    box-shadow: 0 8px 18px rgba(190, 18, 60, 0.2);
}

.forum-category-link:hover,
.forum-category-link.is-active {
    background: rgba(225, 29, 72, 0.12);
}

.forum-topic-icon,
.forum-category-icon {
    border-color: rgba(242, 193, 78, 0.32);
    background: rgba(225, 29, 72, 0.1);
    color: var(--secondary);
}

.forum-stat-avatar {
    background: rgba(225, 29, 72, 0.14);
    color: var(--secondary);
}

.forum-category-count {
    background: rgba(225, 29, 72, 0.16);
    color: var(--accent);
}

.forum-editor-canvas:focus,
.forum-compose input:focus,
.forum-compose textarea:focus,
.forum-compose select:focus,
.forum-report-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}

.forum-category-lock-badge {
    border-color: rgba(242, 193, 78, 0.35);
    background: rgba(225, 29, 72, 0.1);
    color: var(--accent);
}

.forum-status.is-hidden,
.forum-button-danger {
    border-color: rgba(225, 29, 72, 0.32);
    background: rgba(225, 29, 72, 0.12);
    color: #fecdd3;
}

.forum-toast {
    border-color: rgba(242, 193, 78, 0.4);
    background: #2a1118;
    color: var(--text);
}

.forum-toast strong {
    color: var(--secondary);
}
