:root {
    --bg: #07080d;
    --bg-elevated: #0e1018;
    --bg-card: #12151f;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8eaef;
    --text-muted: #8b93a7;
    --gold: #d4a853;
    --gold-bright: #f0c96a;
    --gold-dim: rgba(212, 168, 83, 0.15);
    --blue: #4a7cff;
    --green: #3ecf8e;
    --purple: #a78bfa;
    --radius: 14px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --font: "Inter", system-ui, sans-serif;
    --font-display: "Cinzel", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}
.bg-glow--gold {
    width: 500px; height: 500px;
    top: -120px; right: -100px;
    background: rgba(212, 168, 83, 0.12);
}
.bg-glow--blue {
    width: 400px; height: 400px;
    bottom: 10%; left: -80px;
    background: rgba(74, 124, 255, 0.08);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 8, 13, 0.85);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

.brand__mark {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), #9a7028);
    color: #1a1205;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: -0.03em;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.brand__text strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}
.brand__text small {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.site-nav {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.site-nav__link {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.site-nav__link:hover,
.site-nav__link.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}
.site-nav__link--muted { opacity: 0.7; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--gold {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: #1a1205;
    box-shadow: 0 8px 24px rgba(212, 168, 83, 0.25);
}
.btn--gold:hover { box-shadow: 0 12px 32px rgba(212, 168, 83, 0.35); }
.btn--sm { padding: 9px 16px; font-size: 0.85rem; }
.btn--outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn--vote {
    padding: 7px 16px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.hero {
    position: relative;
    z-index: 1;
    padding: 64px 0 40px;
}

.hero__eyebrow {
    margin: 0 0 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
}

.hero__title {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: 0.02em;
}
.hero__title span {
    background: linear-gradient(90deg, var(--gold-bright), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__sub {
    margin: 0 0 32px;
    max-width: 520px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    padding: 16px 22px;
    min-width: 120px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.hero-stat__val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold-bright);
    line-height: 1;
}
.hero-stat__lbl {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.toolbar {
    position: relative;
    z-index: 1;
    padding: 8px 0 24px;
}

.toolbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.tab {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active {
    background: var(--gold-dim);
    color: var(--gold-bright);
}

.toolbar__filters {
    display: flex;
    gap: 10px;
}

.select, .search {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: 0.88rem;
}
.search { min-width: 200px; }
.select:focus, .search:focus {
    outline: none;
    border-color: rgba(212, 168, 83, 0.5);
}

.list-section {
    position: relative;
    z-index: 1;
    padding-bottom: 64px;
}

.panel {
    border-radius: calc(var(--radius) + 4px);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.panel.is-hidden { display: none; }

.panel__head {
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--border);
}
.panel__head h2 {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.03em;
}
.panel__head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.server-table-wrap { overflow-x: auto; }

.server-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.server-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.server-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.server-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.server-table tbody tr:last-child td { border-bottom: none; }

.rank {
    display: inline-grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}
.rank--1 { background: linear-gradient(135deg, #ffd700, #b8860b); color: #1a1205; }
.rank--2 { background: linear-gradient(135deg, #c0c0c0, #808080); color: #111; }
.rank--3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }

.server-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}
.server-cell__avatar {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bg-card), #1a2030);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
}
.server-cell__info strong {
    display: block;
    font-size: 0.95rem;
}
.server-cell__info strong a {
    color: var(--text);
    text-decoration: none;
}
.server-cell__info strong a:hover { color: var(--gold-bright); }
.server-cell__info small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 4px;
    margin-top: 4px;
}
.badge--featured { background: var(--gold-dim); color: var(--gold-bright); }
.badge--new { background: rgba(62, 207, 142, 0.15); color: var(--green); }
.badge--upcoming { background: rgba(167, 139, 250, 0.15); color: var(--purple); }

.votes {
    font-weight: 700;
    color: var(--gold-bright);
    font-variant-numeric: tabular-nums;
}

.chronicle-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(74, 124, 255, 0.12);
    color: #8ab4ff;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 20px;
}

.server-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color 0.15s, transform 0.15s;
}
.server-card:hover {
    border-color: rgba(212, 168, 83, 0.35);
    transform: translateY(-2px);
}
.server-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.server-card__name {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.server-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.server-card__meta span {
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.78rem;
    color: var(--text-muted);
}
.server-card__desc {
    margin: 0 0 16px;
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.server-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.server-card__date {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.server-card__date strong { color: var(--purple); }

.cta-section {
    position: relative;
    z-index: 1;
    padding: 48px 0 72px;
}
.cta-section__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 36px;
    border-radius: calc(var(--radius) + 4px);
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.08), rgba(74, 124, 255, 0.06));
    border: 1px solid rgba(212, 168, 83, 0.2);
}
.cta-section__inner h2 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.4rem;
}
.cta-section__inner p {
    margin: 0;
    color: var(--text-muted);
    max-width: 480px;
}

.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 28px 0;
    background: rgba(0, 0, 0, 0.25);
}
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
}
.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.site-footer__brand strong {
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}
.site-footer__brand span {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.site-footer__links {
    display: flex;
    gap: 20px;
    margin-left: auto;
}
.site-footer__links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-decoration: none;
}
.site-footer__links a:hover { color: var(--gold-bright); }
.site-footer__copy {
    width: 100%;
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .site-header__inner { flex-wrap: wrap; min-height: auto; padding: 12px 0; }
    .site-nav { order: 3; width: 100%; overflow-x: auto; margin-left: 0; }
    .site-header .btn--gold { margin-left: auto; }
    .toolbar__inner { flex-direction: column; align-items: stretch; }
    .toolbar__filters { flex-direction: column; }
    .search { min-width: 0; width: 100%; }
    .server-table th:nth-child(4),
    .server-table td:nth-child(4),
    .server-table th:nth-child(5),
    .server-table td:nth-child(5) { display: none; }
    .site-footer__links { margin-left: 0; }
}
