/* ============================================================
   The Order — Site Design System
   Sourced from /design/website_preview.html (source of truth)
   ============================================================ */

:root {
    /* Core palette (preview tokens) */
    --gold-dark:    #6E4F1D;
    --gold:         #D4A347;
    --gold-lt:      #F5D77A;
    --navy-0:       #050B18;
    --navy-1:       #0A1428;
    --navy-2:       #0E1A34;
    --navy-3:       #1A2A48;
    --blue-gem:     #4BA1FF;
    --text-gold:    #E8C468;
    --text-gold-lt: #F0D27A;
    --text-body:    #c9c4b8;
    --text-mute:    #8a8576;

    /* States */
    --error-bg: rgba(124, 28, 40, 0.55);
    --error-fg: #FFB8C2;
    --success-bg: rgba(28, 80, 36, 0.55);
    --success-fg: #B8E8B0;

    /* Legacy aliases (so the auth pages keep working) */
    --gold-50:  var(--gold-lt);
    --gold-100: var(--text-gold-lt);
    --gold-200: var(--text-gold);
    --gold-300: var(--gold);
    --gold-400: #a07120;
    --gold-500: var(--gold-dark);
    --gold-rim: rgba(212, 163, 71, 0.45);
    --navy-700: var(--navy-3);
    --navy-800: var(--navy-2);
    --navy-900: var(--navy-0);
    --text-primary: var(--text-gold);
    --text-soft:    var(--text-gold-lt);
    --text-muted:   var(--text-body);
    --text-dim:     var(--text-mute);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background-color: #050B18;
    background-image:
        linear-gradient(180deg, rgba(5, 11, 24, 0.55), rgba(6, 13, 29, 0.82)),
        url('/assets/img/clouds.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-body);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}
/* iOS chokes on fixed backgrounds — let it scroll on small screens */
@media (max-width: 720px) {
    body { background-attachment: scroll; }
}
h1, h2, h3, .serif { font-family: 'Cinzel', Georgia, serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- NAV ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    min-height: 136px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 0 40px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(8, 14, 28, 0.82);
    border-bottom: 1px solid rgba(212, 163, 71, 0.25);
}
/* Two balanced zones (1fr each) flank the auto-width logo, so the logo is dead
   centre. Within each zone, the corner button sits at the far edge and the link
   group hugs the logo (space-between). */
.nav-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; }
.nav-links-grp { display: flex; align-items: center; gap: 22px; }
.nav-links-grp a {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--text-gold);
    position: relative;
    padding: 6px 0;
    white-space: nowrap;
    transition: color .2s;
}
.nav-links-grp a::after {
    content: ''; position: absolute; left: 50%; right: 50%; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transition: .25s ease;
}
.nav-links-grp a:hover { color: var(--text-gold-lt); }
.nav-links-grp a:hover::after { left: 0; right: 0; }
.nav-logo { display: flex; align-items: center; justify-content: center; }
.nav-logo img {
    height: 124px; width: auto;
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.55));
    transition: transform .25s ease, filter .25s ease;
}
.nav-logo img:hover { transform: scale(1.05); filter: drop-shadow(0 6px 24px rgba(100, 160, 255, 0.45)); }

.nav-burger { display: none; }

@media (max-width: 1024px) {
    .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
        padding: 14px 18px;
        gap: 0;
    }
    .nav-logo { order: -1; justify-content: center; padding: 2px 0 8px; }
    .nav-logo img { height: 66px; }
    .nav-burger {
        display: inline-flex; align-items: center; justify-content: center;
        position: absolute; left: 16px; top: 18px;
        width: 44px; height: 44px;
        background: none;
        border: 1px solid rgba(212, 163, 71, 0.4);
        border-radius: 6px;
        color: var(--text-gold-lt);
        font-size: 20px; line-height: 1; cursor: pointer;
    }
    .nav-burger:hover { border-color: var(--gold); background: rgba(212, 163, 71, 0.1); }

    /* Collapsed vertical menu */
    .nav-zone { display: none; flex-direction: column; align-items: stretch; gap: 0; }
    .nav.nav-open .nav-zone { display: flex; }
    .nav-links-grp { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
    .nav-zone .nav-links-grp a {
        padding: 13px 8px;
        text-align: center;
        border-top: 1px solid rgba(212, 163, 71, 0.14);
    }
    .nav-links-grp a::after { display: none; }
    .nav-corner {
        width: 100%;
        margin: 10px 0 2px;
        text-align: center;
    }
    .nav.nav-open .nav-zone-left  { padding-top: 6px; }
    .nav.nav-open .nav-zone-right { padding-bottom: 6px; }
}
.brand {
    display: flex; align-items: center; gap: 12px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 4px;
    color: var(--text-gold-lt);
    text-shadow: 0 0 10px rgba(100, 160, 255, 0.4);
}
.crest {
    width: 38px; height: 38px;
    background: radial-gradient(circle at 30% 30%, var(--gold-lt), var(--gold) 50%, var(--gold-dark));
    clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0 70%, 0 30%);
    position: relative;
    box-shadow: 0 0 16px rgba(212, 163, 71, 0.4);
}
.crest::after {
    content: ''; position: absolute; inset: 30%;
    background: radial-gradient(circle, var(--blue-gem), #0a2f6a);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--blue-gem);
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--text-gold);
    position: relative;
    padding: 6px 0;
    transition: color .2s;
}
.nav-links a::after {
    content: ''; position: absolute; left: 50%; right: 50%;
    bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transition: .25s ease;
}
.nav-links a:hover { color: var(--text-gold-lt); }
.nav-links a:hover::after { left: 0; right: 0; }
.nav-cta { display: flex; gap: 12px; align-items: center; }

/* ---------- Shared buttons ---------- */
.btn,
.portal-button,
.cta {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    letter-spacing: 3px;
    padding: 10px 22px;
    cursor: pointer;
    border: 1.5px solid var(--gold);
    background: linear-gradient(180deg, var(--navy-3), var(--navy-1));
    color: var(--text-gold-lt);
    text-decoration: none;
    text-align: center;
    transition: .2s;
    text-transform: uppercase;
}
.btn:hover,
.portal-button:hover,
.cta:hover {
    background: linear-gradient(180deg, #243353, var(--navy-2));
    border-color: var(--gold-lt);
}
.btn.primary,
.portal-button-primary,
.cta-primary {
    color: #2a1d05;
    background: linear-gradient(180deg, var(--gold-lt) 0%, var(--gold) 45%, #a07120 80%, var(--gold-dark) 100%);
    border-color: var(--gold-lt);
    text-shadow: 0 1px 0 rgba(255, 240, 180, 0.6);
    box-shadow: 0 0 18px rgba(212, 163, 71, 0.45), inset 0 1px 0 rgba(255, 245, 200, 0.7);
}
.btn.primary:hover,
.portal-button-primary:hover,
.cta-primary:hover { filter: brightness(1.08); }
.btn.lg { padding: 16px 38px; font-size: 15px; letter-spacing: 4px; }

button.btn,
button.portal-button,
button.cta {
    font: inherit;
    font-family: 'Cinzel', serif;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 136px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 60px 24px 80px;
    overflow: hidden;
    background: transparent;       /* let the body clouds show through */
}
/* Portal art, masked so its lower edge melts into the body clouds */
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -2;
    background: url('/assets/img/hero.jpg') center / cover no-repeat;
    -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
}
/* Centered darkening so the gold title stays legible over the bright portal */
.hero::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(ellipse 85% 70% at 50% 42%, rgba(5, 11, 24, 0.50), rgba(5, 11, 24, 0.22) 55%, transparent 80%),
        linear-gradient(180deg, rgba(5, 11, 24, 0.42) 0%, transparent 38%);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }
.hero-eyebrow {
    font-family: 'Cinzel', serif;
    letter-spacing: 8px;
    font-size: 13px;
    color: var(--text-gold);
    margin-bottom: 18px;
    text-transform: uppercase;
}
.hero h1 {
    font-size: clamp(56px, 9vw, 120px);
    font-weight: 900;
    letter-spacing: 8px;
    color: var(--text-gold-lt);
    text-shadow:
        0 0 30px rgba(100, 160, 255, 0.4),
        0 4px 0 #2a1d05,
        0 -1px 0 rgba(255, 240, 180, 0.5);
    line-height: 1;
    margin-bottom: 16px;
}
.hero-rule {
    width: 320px; height: 2px; margin: 18px auto 24px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--blue-gem), var(--gold), transparent);
}
.hero p.tag {
    font-size: 17px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-body);
}
.hero-cta { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 720px) {
    .hero::after {
        background: linear-gradient(180deg, rgba(5, 11, 24, 0.62), rgba(5, 11, 24, 0.32) 55%, transparent 92%);
    }
}

/* ---------- STATS STRIP ---------- */
.stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 60px auto 0;
    padding: 0 24px;
}
.stat {
    position: relative;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.45);
    padding: 22px 18px;
    text-align: center;
}
.stat::before, .stat::after {
    content: ''; position: absolute;
    width: 10px; height: 10px;
    transform: rotate(45deg);
    background: radial-gradient(circle, var(--blue-gem), #0a2f6a);
    border: 1px solid var(--gold);
    box-shadow: 0 0 6px rgba(80, 160, 255, 0.6);
}
.stat::before { top: -6px; left: -6px; }
.stat::after  { bottom: -6px; right: -6px; }
.stat .num {
    font-family: 'Cinzel', serif;
    font-size: 30px; font-weight: 700;
    color: var(--text-gold-lt);
    text-shadow: 0 0 10px rgba(100, 160, 255, 0.3);
}
.stat .lbl {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-mute);
    text-transform: uppercase;
    margin-top: 4px;
}
.stat.online .num::before {
    content: ''; display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; background: #6dff9b;
    box-shadow: 0 0 8px #6dff9b;
    margin-right: 10px; vertical-align: middle;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #6dff9b; }
    50%      { opacity: 0.55; box-shadow: 0 0 14px #6dff9b; }
}

/* ---------- SECTION SHARED ---------- */
section.block {
    padding: 100px 24px;
    max-width: 1180px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title .eyebrow,
.eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 6px;
    color: var(--gold);
    text-transform: uppercase;
}
.section-title h2 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--text-gold-lt);
    margin-top: 8px;
    text-shadow: 0 2px 0 #2a1d05;
}
.section-title .rule {
    width: 180px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 16px auto 0;
}

/* ---------- NEWS ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.news-card {
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.4);
    overflow: hidden;
    position: relative;
    transition: .25s;
}
.news-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.news-img {
    height: 170px;
    background:
        linear-gradient(135deg, rgba(80, 160, 255, 0.2), transparent 60%),
        linear-gradient(180deg, #1c2e5c, #0a1838);
    position: relative;
    border-bottom: 1px solid rgba(212, 163, 71, 0.35);
    background-size: cover;
    background-position: center;
}
.news-img.has-image {
    background-size: cover;
    background-position: center;
}
.news-img .badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--gold);
    color: var(--text-gold);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 4px 10px;
    text-transform: uppercase;
}
.news-body { padding: 20px 22px 24px; }
.news-date {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-mute);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.news-title {
    font-family: 'Cinzel', serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-gold-lt);
    margin-bottom: 10px;
    line-height: 1.3;
}
.news-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-body);
}
.news-card .read-more {
    display: inline-block;
    margin-top: 14px;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color .18s ease;
}
.news-card .read-more:hover { color: var(--text-gold-lt); }

/* Clean formatting for Discord-sourced patch notes */
.news-excerpt p { margin: 0 0 8px; }
.news-excerpt p:last-child { margin-bottom: 0; }
.news-excerpt ul { margin: 6px 0; padding-left: 20px; }
.news-excerpt li { margin: 3px 0; }
.news-excerpt h4 {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--text-gold-lt);
    letter-spacing: .5px;
    margin: 10px 0 6px;
}
.news-excerpt strong { color: var(--text-gold-lt); }
.news-excerpt a { color: var(--gold); text-decoration: underline; }
.news-excerpt code {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12.5px;
}
.news-excerpt pre {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 10px 12px;
    overflow-x: auto;
    margin: 8px 0;
}

/* Card body is clamped; a fade hints there's more behind "Read More" */
.news-excerpt.clamped {
    max-height: 8.4em;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}

/* ---------- NEWS MODAL ---------- */
.news-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.news-modal[hidden] { display: none; }
.news-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 20, 0.78);
    backdrop-filter: blur(3px);
}
.news-modal-box {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: 82vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid var(--gold);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    padding: 30px 32px 34px;
}
.news-modal-x {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    color: var(--text-mute);
    font-size: 26px; line-height: 1;
    cursor: pointer;
    transition: color .18s ease;
}
.news-modal-x:hover { color: var(--text-gold-lt); }
.news-modal-head {
    border-bottom: 1px solid rgba(212, 163, 71, 0.3);
    padding-bottom: 14px;
    margin-bottom: 16px;
}
.news-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-gold-lt);
    line-height: 1.3;
}
.news-modal-date {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-mute);
    text-transform: uppercase;
    margin-top: 8px;
}
.news-modal-text { font-size: 15px; line-height: 1.7; color: var(--text-body); }
.news-modal-text p { margin: 0 0 10px; }
.news-modal-text ul { margin: 8px 0; padding-left: 22px; }
.news-modal-text li { margin: 4px 0; }
.news-modal-text h4 { font-family: 'Cinzel', serif; color: var(--text-gold-lt); margin: 14px 0 8px; }
.news-modal-text strong { color: var(--text-gold-lt); }
.news-modal-text a { color: var(--gold); text-decoration: underline; }
.news-modal-text code { background: rgba(255,255,255,0.06); border-radius: 4px; padding: 1px 5px; }
.news-modal-text pre { background: rgba(0,0,0,0.35); border-radius: 6px; padding: 10px 12px; overflow-x: auto; }

/* ---------- FEATURES ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature {
    position: relative;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.35);
    padding: 30px 22px;
    text-align: center;
}
.feature .icon {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    background: radial-gradient(circle at 30% 30%, var(--gold-lt), var(--gold), var(--gold-dark));
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    display: flex; align-items: center; justify-content: center;
    color: #2a1d05;
    font-size: 22px;
}
.feature h3 {
    font-size: 16px;
    letter-spacing: 3px;
    color: var(--text-gold-lt);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.feature p { font-size: 13.5px; color: var(--text-body); line-height: 1.6; }

/* ---------- CTA BAND ---------- */
.cta-band {
    background:
        linear-gradient(180deg, rgba(20, 40, 90, 0.5), rgba(8, 14, 28, 0.7)),
        radial-gradient(ellipse at center, rgba(80, 160, 255, 0.2), transparent 70%);
    border-top: 1px solid rgba(212, 163, 71, 0.35);
    border-bottom: 1px solid rgba(212, 163, 71, 0.35);
    padding: 70px 24px;
    text-align: center;
}
.cta-band h2 {
    font-size: 36px;
    letter-spacing: 5px;
    color: var(--text-gold-lt);
    margin-bottom: 16px;
    text-shadow: 0 2px 0 #2a1d05;
}
.cta-band p {
    color: var(--text-body);
    max-width: 540px;
    margin: 0 auto 28px;
}

/* ---------- HOMEPAGE 2-COLUMN (content + server sidebar) ---------- */
.home-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 304px;
    gap: 30px;
    align-items: start;
    text-align: left;
}
.home-main .news-grid { grid-template-columns: repeat(2, 1fr); }

.home-sidebar { display: flex; flex-direction: column; gap: 18px; }
.side-panel {
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.4);
    padding: 16px 18px 18px;
}
.side-title {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-gold-lt);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 163, 71, 0.25);
}
.side-stats { list-style: none; margin: 0; padding: 0; }
.side-stats li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 0;
    font-size: 13.5px;
}
.side-stats li + li { border-top: 1px dashed rgba(255, 255, 255, 0.06); }
.ss-label { color: var(--text-mute); letter-spacing: .5px; }
.ss-value { color: var(--text-body); font-weight: 600; display: flex; align-items: center; }
.ss-value.rate { color: var(--text-gold-lt); font-family: 'Cinzel', serif; letter-spacing: 1px; }

.side-events { list-style: none; margin: 0; padding: 0; }
.side-events li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0;
    font-size: 13.5px;
}
.side-events li + li { border-top: 1px dashed rgba(255, 255, 255, 0.06); }
.se-name { color: var(--text-body); }
.se-timer {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.account-panel .acct-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 0; font-size: 13px;
}
.account-panel .acct-email { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-login { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.acct-login input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 163, 71, 0.3);
    color: var(--text-body);
    padding: 9px 11px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}
.acct-login input:focus { outline: none; border-color: var(--gold); }
.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.btn.sm { font-size: 11px; letter-spacing: 1.5px; padding: 8px 14px; }
.btn.full { width: 100%; text-align: center; }

@media (max-width: 920px) {
    .home-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .home-main .news-grid { grid-template-columns: 1fr; }
}

/* ---------- DOWNLOAD PAGE ---------- */
.dl-tabs {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center;
    margin: 0 0 28px;
    border-bottom: 1px solid rgba(212, 163, 71, 0.25);
}
.dl-tab {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-gold);
    background: none;
    border: 1px solid transparent;
    border-bottom: none;
    padding: 12px 22px;
    cursor: pointer;
    transition: .2s;
}
.dl-tab:hover { color: var(--text-gold-lt); }
.dl-tab.active {
    color: var(--text-gold-lt);
    background: linear-gradient(180deg, rgba(212, 163, 71, 0.12), transparent);
    border-color: rgba(212, 163, 71, 0.4);
    border-bottom: 1px solid var(--navy-1);
    margin-bottom: -1px;
}
.dl-panel { display: none; animation: dlfade .25s ease; }
.dl-panel.active { display: block; }
@keyframes dlfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dl-h { font-family: 'Cinzel', serif; font-size: 20px; letter-spacing: 1px; color: var(--text-gold-lt); margin: 0 0 6px; }
.dl-sub { color: var(--text-mute); margin: 0 0 20px; }
.dl-steps { color: var(--text-body); line-height: 1.7; padding-left: 22px; }
.dl-steps li { margin: 10px 0; }
.dl-steps strong { color: var(--text-gold-lt); }
.dl-inline, .dl-steps a { color: var(--gold); text-decoration: underline; cursor: pointer; }
.dl-note {
    margin-top: 22px;
    padding: 12px 16px;
    background: rgba(80, 160, 255, 0.07);
    border-left: 3px solid var(--gold);
    color: var(--text-mute);
    font-size: 13.5px;
}
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl-card {
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.4);
    padding: 22px 20px;
    text-align: center;
}
.dl-card-name { font-family: 'Cinzel', serif; font-size: 16px; color: var(--text-gold-lt); letter-spacing: 1px; }
.dl-card-meta { color: var(--text-mute); font-size: 12.5px; margin: 6px 0 16px; }
.btn.disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-mute);
    border-color: rgba(255, 255, 255, 0.12);
}
.dl-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dl-spec-col {
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.4);
    padding: 4px 22px 18px;
}
.dl-spec-head {
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-gold-lt);
    text-align: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(212, 163, 71, 0.25);
    margin-bottom: 6px;
}
.dl-spec-list { list-style: none; margin: 0; padding: 0; }
.dl-spec-list li { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; }
.dl-spec-list li + li { border-top: 1px dashed rgba(255, 255, 255, 0.06); }
.dl-spec-list li span:first-child { color: var(--text-mute); letter-spacing: .5px; }
.dl-spec-list li span:last-child { color: var(--text-body); font-weight: 600; }
@media (max-width: 720px) {
    .dl-grid { grid-template-columns: 1fr; }
    .dl-specs { grid-template-columns: 1fr; }
}

/* ---------- MOTION & POLISH ---------- */
@keyframes heroGlow { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
@keyframes heroDrift { from { background-position: 0 0; } to { background-position: 80px 80px; } }
@keyframes titleShine {
    0%, 100% { text-shadow: 0 0 30px rgba(100,160,255,0.4), 0 4px 0 #2a1d05, 0 -1px 0 rgba(255,240,180,0.5); }
    50%      { text-shadow: 0 0 48px rgba(120,180,255,0.75), 0 4px 0 #2a1d05, 0 -1px 0 rgba(255,240,180,0.6); }
}
.hero h1 { animation: titleShine 5s ease-in-out infinite; }

/* Primary buttons get a light sweep on hover */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after {
    content: ''; position: absolute; top: 0; left: -130%;
    width: 55%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
    pointer-events: none;
}
.btn.primary:hover::after { left: 150%; }

/* Cards lift + glow on hover */
.feature, .side-panel, .dl-card {
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.feature:hover, .dl-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 18px rgba(212, 163, 71, 0.15);
}
.feature .icon { transition: transform .25s ease; }
.feature:hover .icon { transform: scale(1.12); }
.side-panel:hover { border-color: rgba(212, 163, 71, 0.7); }

/* Decorative gem in the centered section dividers */
.section-title .rule { position: relative; }
.section-title .rule::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: 9px; height: 9px; transform: translate(-50%, -50%) rotate(45deg);
    background: radial-gradient(circle, var(--gold-lt), var(--gold));
    box-shadow: 0 0 10px rgba(212, 163, 71, 0.7);
}

@media (prefers-reduced-motion: reduce) {
    .hero::before, .hero::after, .hero h1 { animation: none; }
    .btn.primary::after { transition: none; }
}

/* ---------- FROSTED PANELS (float over the cloud backdrop) ---------- */
.feature,
.news-card,
.side-panel,
.dl-card,
.dl-spec-col,
.stat,
.rank-panel,
.rank-card,
.panel {
    background: linear-gradient(180deg, rgba(14, 26, 52, 0.80), rgba(8, 16, 32, 0.86));
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

/* ---------- FOOTER ---------- */
footer.site-footer {
    padding: 50px 48px 30px;
    border-top: 1px solid rgba(212, 163, 71, 0.25);
    display: flex; flex-direction: column; gap: 30px;
    align-items: center;
}
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-links a {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-mute);
    text-transform: uppercase;
    transition: color .2s;
}
.footer-links a:hover { color: var(--gold); }
.socials { display: flex; gap: 14px; }
.social {
    width: 40px; height: 40px;
    border: 1px solid var(--gold);
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-weight: 700;
    transition: .2s;
}
.social:hover {
    background: linear-gradient(180deg, var(--gold), var(--gold-dark));
    color: #2a1d05;
}
.copyright {
    font-size: 11px;
    color: var(--text-mute);
    letter-spacing: 1.5px;
}

/* ============================================================
   Inner page layouts (auth / dashboard) — same design language
   ============================================================ */

.page-shell {
    padding: 60px 24px 80px;
    min-height: calc(100vh - 136px);
}
.page-shell-narrow {
    max-width: 560px;
    margin: 0 auto;
}
.page-shell-wide {
    max-width: 920px;
    margin: 0 auto;
}

.panel {
    position: relative;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.45);
    padding: 36px 36px 32px;
}
.panel::before, .panel::after {
    content: ''; position: absolute;
    width: 12px; height: 12px;
    transform: rotate(45deg);
    background: radial-gradient(circle, var(--blue-gem), #0a2f6a);
    border: 1px solid var(--gold);
    box-shadow: 0 0 6px rgba(80, 160, 255, 0.6);
}
.panel::before { top: -7px; left: -7px; }
.panel::after  { bottom: -7px; right: -7px; }

/* Title block inside panels */
.panel .eyebrow { display: block; margin-bottom: 10px; }
.panel h1.panel-title {
    font-family: 'Cinzel', serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--text-gold-lt);
    text-shadow: 0 2px 0 #2a1d05;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.panel .panel-copy {
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 22px;
}

/* Form fields (the existing markup uses .field) */
.field { display: block; margin-top: 16px; }
.field label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-gold);
}
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1.5px solid rgba(212, 163, 71, 0.55);
    background: linear-gradient(180deg, var(--navy-1) 0%, var(--navy-0) 100%);
    color: var(--text-gold-lt);
    font: inherit;
    font-size: 15px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea {
    min-height: 120px;
    padding: 14px 16px;
    line-height: 1.55;
    resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold-lt);
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(245, 215, 122, 0.3),
        0 0 18px rgba(245, 215, 122, 0.28);
}
.field input::placeholder { color: var(--text-mute); }
.field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-mute);
    letter-spacing: 0.02em;
}

.form-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Messages */
.message {
    margin-top: 18px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-left: 3px solid;
}
.message-error {
    background: var(--error-bg);
    color: var(--error-fg);
    border-color: #FF6E7A;
}
.message-success {
    background: var(--success-bg);
    color: var(--success-fg);
    border-color: #6FCB54;
}

.auth-links {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(212, 163, 71, 0.3);
    text-align: center;
}
.auth-links a {
    display: inline-block;
    margin: 6px 12px;
    color: var(--text-gold);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.auth-links a:hover {
    color: var(--gold-lt);
    text-shadow: 0 0 12px rgba(245, 215, 122, 0.5);
}
.auth-links-single { border-top: none; padding-top: 0; }

/* Legacy compatibility for .auth-shell / .auth-card / etc. so existing pages render */
.auth-shell,
.dashboard-shell {
    padding: 60px 24px 80px;
    max-width: 1180px;
    margin: 0 auto;
    min-height: calc(100vh - 136px);
}
.auth-card { max-width: 560px; margin: 0 auto; }
.dashboard-card { max-width: 920px; margin: 0 auto; }
.auth-card,
.dashboard-card {
    position: relative;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.45);
    padding: 36px 36px 32px;
}
.auth-card::before, .auth-card::after,
.dashboard-card::before, .dashboard-card::after {
    content: ''; position: absolute;
    width: 12px; height: 12px;
    transform: rotate(45deg);
    background: radial-gradient(circle, var(--blue-gem), #0a2f6a);
    border: 1px solid var(--gold);
    box-shadow: 0 0 6px rgba(80, 160, 255, 0.6);
}
.auth-card::before, .dashboard-card::before { top: -7px; left: -7px; }
.auth-card::after, .dashboard-card::after { bottom: -7px; right: -7px; }

.auth-title {
    font-family: 'Cinzel', serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--text-gold-lt);
    text-shadow: 0 2px 0 #2a1d05;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.auth-copy {
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 22px;
}

/* Dashboard info-grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 22px;
}
.info-item {
    padding: 16px 18px;
    border: 1px solid rgba(212, 163, 71, 0.4);
    background: linear-gradient(180deg, rgba(18, 35, 72, 0.45), rgba(6, 13, 29, 0.7));
}
.info-item span {
    display: block;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.info-item strong {
    display: block;
    margin-top: 6px;
    color: var(--text-gold-lt);
    font-size: 15px;
    font-weight: 600;
}
.dashboard-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

/* IG accounts list */
.ig-accounts-list {
    list-style: none;
    margin: 14px 0 0;
}
.ig-accounts-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 1px solid rgba(212, 163, 71, 0.4);
    background: linear-gradient(180deg, rgba(18, 35, 72, 0.45), rgba(6, 13, 29, 0.7));
    color: var(--text-body);
}
.ig-accounts-list .ig-name {
    font-family: 'Cinzel', serif;
    color: var(--text-gold-lt);
    letter-spacing: 2px;
}
.ig-accounts-list .ig-linked {
    color: var(--text-mute);
    font-size: 12px;
}
.ig-empty {
    margin: 14px 0 0;
    padding: 18px;
    border: 1px dashed rgba(212, 163, 71, 0.6);
    text-align: center;
    color: var(--text-mute);
    font-style: italic;
}
.section-divider {
    margin: 28px 0 18px;
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.section-heading {
    margin: 0 0 14px;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-gold-lt);
    letter-spacing: 4px;
    text-transform: uppercase;
}
.feature-list {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(212, 163, 71, 0.3);
}
.feature-list h2 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--text-gold-lt);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.feature-list ul { padding-left: 20px; color: var(--text-body); }
.feature-list li { margin: 6px 0; line-height: 1.6; }
.feature-list li::marker { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav { padding: 0 20px; height: 60px; }
    .nav-links { display: none; }
    .news-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: 1fr; }
    section.block { padding: 70px 18px; }
    .info-grid { grid-template-columns: 1fr; }
    footer.site-footer { padding: 40px 20px 24px; }
}

@media (max-width: 600px) {
    .nav-cta .btn { padding: 8px 14px; font-size: 11px; letter-spacing: 2px; }
    .hero h1 { letter-spacing: 4px; }
    .features { grid-template-columns: 1fr; }
}

/* ============================================================
   Rankings page
   ============================================================ */

.rank-intro {
    text-align: center;
    color: var(--text-body);
    max-width: 640px;
    margin: 0 auto 8px;
    font-size: 15px;
    line-height: 1.7;
}
.rank-updated {
    text-align: center;
    color: var(--text-mute);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.rank-panel {
    position: relative;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.45);
    padding: 24px;
    margin-bottom: 24px;
}
.rank-panel::before, .rank-panel::after {
    content: ''; position: absolute;
    width: 12px; height: 12px;
    transform: rotate(45deg);
    background: radial-gradient(circle, var(--blue-gem), #0a2f6a);
    border: 1px solid var(--gold);
    box-shadow: 0 0 6px rgba(80, 160, 255, 0.6);
}
.rank-panel::before { top: -7px; left: -7px; }
.rank-panel::after  { bottom: -7px; right: -7px; }

.rank-panel h3,
.rank-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-gold-lt);
    text-transform: uppercase;
    text-shadow: 0 2px 0 #2a1d05;
    margin-bottom: 16px;
}

.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-300);
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(212, 163, 71, 0.35);
}
.rank-table th.num, .rank-table td.num { text-align: right; }
.rank-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(138, 106, 44, 0.18);
    color: var(--text-soft);
    font-size: 14px;
}
.rank-table tr:last-child td { border-bottom: none; }
.rank-table tbody tr:hover td { background: rgba(75, 161, 255, 0.06); }

.rank-pos {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 24px; height: 24px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid var(--gold-rim);
    background: linear-gradient(180deg, rgba(18,35,72,0.6), rgba(6,13,29,0.85));
    color: var(--text-soft);
}
.rank-pos.r1 { background: linear-gradient(180deg, #F7DC8A, #D4A347 60%, #A07120); color: #2a1d05; border-color: var(--gold-lt); box-shadow: 0 0 10px rgba(245,215,122,0.5); }
.rank-pos.r2 { background: linear-gradient(180deg, #E6EAF0, #AEB6C2 60%, #7C8696); color: #1a1f28; border-color: #cdd5e0; }
.rank-pos.r3 { background: linear-gradient(180deg, #E0A878, #B97A45 60%, #8A5526); color: #2a1505; border-color: #e0a878; }

.rank-name { font-family: 'Cinzel', serif; letter-spacing: 0.04em; color: var(--text-gold-lt); }
.rank-sub  { color: var(--text-mute); font-size: 12px; }
.rank-val  { font-family: 'Cinzel', serif; color: var(--gold-lt); font-weight: 700; }

.rank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rank-card {
    position: relative;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(212, 163, 71, 0.4);
    padding: 20px 22px;
}
.rank-empty { color: var(--text-mute); font-style: italic; font-size: 13px; padding: 10px 0; }

.online-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
.online-dot.on {
    background: #6dff9b;
    box-shadow: 0 0 8px #6dff9b;
    animation: pulse-dot 2s ease-in-out infinite;
}
.online-dot.off {
    background: #ff5151;
    box-shadow: 0 0 7px rgba(255, 81, 81, 0.7);
}

.rank-table .gr-extra { display: none; }
.rank-table.expanded .gr-extra { display: table-row; }

.show-more-wrap { text-align: center; margin-top: 14px; }
.show-more-btn {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--gold, #d9b96a);
    background: rgba(217, 185, 106, 0.08);
    border: 1px solid rgba(217, 185, 106, 0.4);
    border-radius: 6px;
    padding: 8px 22px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.show-more-btn:hover {
    background: rgba(217, 185, 106, 0.18);
    border-color: rgba(217, 185, 106, 0.7);
    color: #f0d488;
}

@media (max-width: 1000px) { .rank-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .rank-grid { grid-template-columns: 1fr; } }
