:root {
    --bg: #050505;
    --bg-soft: #0a0a0a;
    --surface: #0b0b0b;
    --card: #101010;
    --card-alt: #131313;
    --border: rgba(255, 193, 7, 0.1);
    --border-strong: rgba(255, 193, 7, 0.24);
    --primary: #d4a017;
    --primary-hover: #e0b84b;
    --primary-soft: rgba(212, 160, 23, 0.13);
    --text-main: #f5f1e8;
    --text-muted: #8f8a80;
    --text-faint: #6c675f;
    --success: #6bcf9b;
    --danger: #df7f7f;
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.45);
    --shadow-gold: 0 12px 30px rgba(212, 160, 23, 0.12);
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 14px;
    --space-4: 18px;
    --space-5: 24px;
    --space-6: 34px;
    --space-7: 46px;
    --space-8: 62px;
    --title-xl: clamp(2.4rem, 4vw, 4rem);
    --title-lg: clamp(1.7rem, 2.5vw, 2.5rem);
    --title-md: clamp(1.35rem, 2vw, 1.8rem);
    --body: 0.98rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 12%, rgba(212, 160, 23, 0.08), transparent 28%),
        radial-gradient(circle at 88% 0%, rgba(212, 160, 23, 0.06), transparent 23%),
        linear-gradient(170deg, #070707 0%, #050505 42%, #0b0b0b 100%);
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: var(--body);
    line-height: 1.6;
    animation: pageFade 900ms ease-out;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 var(--space-3);
    font-family: "Playfair Display", "Times New Roman", serif;
    letter-spacing: 0.02em;
    color: #f8f3e8;
}

h1 { font-size: var(--title-xl); }
h2 { font-size: var(--title-lg); }
h3 { font-size: var(--title-md); }
p { margin: 0 0 var(--space-3); color: var(--text-muted); }
a { color: inherit; }

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.logo-watermark {
    position: absolute;
    width: min(74vw, 900px);
    aspect-ratio: 1;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    background-image: url("../img/logo-symbol.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.045;
    filter: saturate(0.8) blur(0.2px);
    animation: watermarkFloat 22s ease-in-out infinite;
}

.blob {
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
    opacity: 0.28;
}

.blob-1 {
    width: 420px;
    height: 420px;
    top: -140px;
    left: -90px;
    background: radial-gradient(circle at center, rgba(212, 160, 23, 0.2), rgba(10, 10, 10, 0));
    animation: blobDriftA 18s ease-in-out infinite alternate;
}

.blob-2 {
    width: 390px;
    height: 390px;
    right: -130px;
    top: 34%;
    background: radial-gradient(circle at center, rgba(42, 42, 42, 0.6), rgba(6, 6, 6, 0));
    animation: blobDriftB 20s ease-in-out infinite alternate;
}

.blob-3 {
    width: 380px;
    height: 380px;
    left: 38%;
    bottom: -210px;
    background: radial-gradient(circle at center, rgba(212, 160, 23, 0.1), rgba(6, 6, 6, 0));
    animation: blobDriftC 24s ease-in-out infinite alternate;
}

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.shell {
    position: relative;
}

.topbar {
    position: sticky;
    top: var(--space-3);
    z-index: 40;
}

.topbar-content {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(210px, 1fr);
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-main);
    text-decoration: none;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #0c0c0c;
    border: 1px solid var(--border-strong);
    color: #1c1305;
    font-family: "Playfair Display", serif;
    font-weight: 700;
}

.brand-mark img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    opacity: 0.95;
}

.brand-text {
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #e4d6bc;
}

.nav-pill {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(11, 11, 11, 0.76);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}

.nav-pill a {
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: 180ms ease;
}

.nav-pill a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.nav-pill a.active {
    color: #251a05;
    background: linear-gradient(130deg, var(--primary), #f1cf77);
    box-shadow: var(--shadow-gold);
}

.user-chip {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(11, 11, 11, 0.9);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #26221a, #0d0d0d);
    border: 1px solid var(--border);
    color: #f6e7c5;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-meta {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.1;
}

.user-meta strong {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f5f1e8;
}

.badge {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(212, 160, 23, 0.07);
    color: #d9c699;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
}

.badge-admin {
    background: rgba(212, 160, 23, 0.24);
    color: #fee3a8;
}

.badge-you {
    background: rgba(255, 255, 255, 0.06);
    color: #f5f1e8;
}

.page-content {
    padding: var(--space-7) 0 var(--space-8);
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: clamp(32px, 6vw, 72px);
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at top right, rgba(212, 160, 23, 0.19), transparent 34%),
        linear-gradient(130deg, #0e0e0e 0%, #080808 65%);
    box-shadow: var(--shadow-soft);
}

.hero h1 {
    max-width: 730px;
}

.hero-center {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.hero-logo {
    width: clamp(170px, 24vw, 260px);
    margin-bottom: var(--space-5);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    animation: logoBreath 7s ease-in-out infinite;
}

.hero p {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    color: #beb6a8;
    font-size: 1.02rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-5);
    justify-content: center;
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: var(--space-4);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.card {
    background: linear-gradient(158deg, var(--card) 0%, #0d0d0d 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: clamp(18px, 2.2vw, 28px);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.card > :last-child { margin-bottom: 0; }

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 160, 23, 0.22);
    box-shadow: var(--shadow-soft), var(--shadow-gold);
}

.center-card {
    text-align: center;
    max-width: 620px;
    margin: 60px auto 0;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.muted {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.text-faint {
    color: var(--text-faint);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.86rem;
    letter-spacing: 0.01em;
    transition: 180ms ease;
    cursor: pointer;
}

.btn-sm {
    font-size: 0.78rem;
    padding: 8px 12px;
}

.btn-primary {
    background: linear-gradient(130deg, var(--primary), #f0cc73);
    border-color: rgba(255, 227, 158, 0.4);
    color: #281b04;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(130deg, var(--primary-hover), #f7d88d);
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn-outline {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.02);
    color: #e9d7ad;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: #f8e4b7;
    background: var(--primary-soft);
}

.btn-danger {
    border-color: rgba(223, 127, 127, 0.45);
    color: #f8d9d9;
    background: rgba(223, 127, 127, 0.12);
}

.btn-danger:hover {
    background: rgba(223, 127, 127, 0.19);
}

.btn-ghost {
    color: var(--text-muted);
    border-color: var(--border);
    background: transparent;
}

.btn-ghost:hover {
    color: var(--text-main);
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

label {
    display: block;
    margin: var(--space-4) 0 var(--space-1);
    font-weight: 600;
    color: #e8dbc1;
}

input,
textarea,
select {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 11px 13px;
    background: #101010;
    color: var(--text-main);
    font-size: 0.92rem;
    transition: 180ms ease;
}

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

::placeholder {
    color: #6f6a61;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.18);
}

.auth-wrapper {
    display: grid;
    place-items: center;
    min-height: 70vh;
}

.auth-card {
    width: min(500px, 100%);
    background: linear-gradient(165deg, #111111, #0a0a0a);
}

.auth-card p {
    margin-top: var(--space-4);
}

.card form .btn {
    margin-top: var(--space-3);
}

.auth-card a {
    color: #f0cd7a;
}

.alert {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    padding: 11px 13px;
    margin-bottom: 10px;
}

.alert-success {
    background: rgba(107, 207, 155, 0.11);
    border-color: rgba(107, 207, 155, 0.35);
    color: #b8eccf;
}

.alert-error {
    background: rgba(223, 127, 127, 0.1);
    border-color: rgba(223, 127, 127, 0.36);
    color: #f3c1c1;
}

.cover {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 370px;
    object-fit: cover;
    margin-bottom: var(--space-4);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin-bottom: var(--space-3);
}

.chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.75rem;
    color: #d7c8a7;
    background: rgba(255, 255, 255, 0.02);
}

.reactions-row {
    margin-top: var(--space-4);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emoji-btn {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #c5b696;
    background: #111111;
    padding: 7px 11px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: 160ms ease;
}

.emoji-btn:hover {
    border-color: var(--primary);
}

.emoji-btn.active {
    border-color: rgba(255, 213, 125, 0.48);
    color: #231704;
    background: linear-gradient(130deg, #f2d283, #c79012);
}

.reply-item {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: var(--space-4);
    margin-top: var(--space-4);
}

.reply-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.reply-actions {
    margin-top: var(--space-2);
    display: grid;
    gap: 8px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: var(--space-4);
    background: #080808;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.page-head {
    margin-bottom: var(--space-5);
}

.between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.mb-16 { margin-bottom: var(--space-4); }
.mt-24 { margin-top: var(--space-5); }

.stat-card {
    background: linear-gradient(145deg, #121212, #0d0d0d);
}

.stat-card h3 {
    margin: 0;
    font-size: 2.4rem;
    color: #f0cd7a;
}

.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
}

.admin-links a {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-alt);
    padding: var(--space-4);
    text-decoration: none;
    color: #e2d2b1;
}

.admin-links a:hover {
    border-color: var(--primary);
}

.status-form {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    border-style: dashed;
    color: var(--text-muted);
}

.footer {
    padding: var(--space-6) 0;
}

.footer-content {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: var(--space-4);
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.footer-content p {
    margin: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 620ms ease, transform 620ms ease;
}

@keyframes pageFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes watermarkFloat {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.04; }
    50% { transform: translate(-50%, -49%) scale(1.03) rotate(2deg); opacity: 0.06; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.04; }
}

@keyframes blobDriftA {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(24px, -18px, 0) scale(1.05); }
}

@keyframes blobDriftB {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-26px, 24px, 0) scale(1.08); }
}

@keyframes blobDriftC {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(18px, -22px, 0) scale(1.06); }
}

@keyframes logoBreath {
    0% { transform: scale(1); filter: saturate(0.96); }
    50% { transform: scale(1.018); filter: saturate(1); }
    100% { transform: scale(1); filter: saturate(0.96); }
}

.nav-toggle {
    display: none;
    justify-self: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #0d0d0d;
    color: #ddc89b;
    padding: 8px 14px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 980px) {
    .topbar-content {
        grid-template-columns: 1fr auto;
        gap: var(--space-2);
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-pill {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: center;
        display: none;
        flex-wrap: wrap;
        border-radius: var(--radius-md);
    }

    .nav-pill.open {
        display: inline-flex;
    }

    .user-chip {
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .page-content {
        padding-top: var(--space-6);
    }

    .hero {
        border-radius: var(--radius-md);
    }

    .user-chip {
        width: 100%;
        justify-self: stretch;
        justify-content: center;
        grid-column: 1 / -1;
    }

    .footer-content {
        flex-direction: column;
    }
}
