:root {
    --display-font: 'Orbitron', 'Segoe UI', sans-serif;
    --body-font: 'Oxanium', 'Segoe UI', sans-serif;
    --mono-font: 'IBM Plex Mono', monospace;
    --bg: #050816;
    --bg-deep: #02030a;
    --bg-steel: #131726;
    --panel: rgba(10, 14, 34, 0.78);
    --panel-strong: rgba(12, 18, 42, 0.92);
    --tile: rgba(255, 255, 255, 0.04);
    --tile-line: rgba(157, 198, 255, 0.14);
    --text: #e9f2ff;
    --text-strong: #ffffff;
    --muted: #9da8c5;
    --line: rgba(154, 198, 255, 0.18);
    --blue-core: #189bff;
    --blue-hot: #57d7ff;
    --magenta-core: #c84dff;
    --magenta-hot: #ff78ea;
    --chrome: #f5f8ff;
    --chrome-dim: #b8c5ff;
    --danger: #ff6b8f;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--body-font);
    color: var(--text);
    background:
        radial-gradient(circle at 16% 24%, rgba(24, 155, 255, 0.30), transparent 25%),
        radial-gradient(circle at 82% 28%, rgba(200, 77, 255, 0.22), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(87, 215, 255, 0.12), transparent 38%),
        linear-gradient(180deg, var(--bg-steel), #080c1d 34%, var(--bg));
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
}

body::after {
    background:
        radial-gradient(circle at 18% 48%, rgba(24, 155, 255, 0.18), transparent 22%),
        radial-gradient(circle at 79% 42%, rgba(255, 120, 234, 0.16), transparent 26%);
    filter: blur(48px);
    opacity: 0.9;
}

::selection {
    background: rgba(200, 77, 255, 0.36);
    color: var(--text-strong);
}

a {
    color: inherit;
}

.page-shell {
    position: relative;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.page-shell::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 240px;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(87, 215, 255, 0.20), transparent 24%),
        radial-gradient(circle at 78% 30%, rgba(255, 120, 234, 0.18), transparent 26%);
    filter: blur(36px);
    opacity: 0.85;
}

.panel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, var(--panel), rgba(7, 10, 24, 0.94));
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel::before,
.panel::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.panel::before {
    background:
        linear-gradient(118deg, transparent 20%, rgba(87, 215, 255, 0.11) 40%, transparent 56%),
        linear-gradient(300deg, transparent 34%, rgba(255, 120, 234, 0.10) 56%, transparent 72%);
    opacity: 0.95;
}

.panel::after {
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero {
    padding: 2rem;
    animation: riseIn 420ms ease both;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    gap: 1.5rem;
    align-items: center;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-mark {
    position: relative;
    display: grid;
    gap: 0.9rem;
    align-content: center;
    min-height: 100%;
    padding: 1.5rem;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
        radial-gradient(circle at 18% 28%, rgba(24, 155, 255, 0.28), transparent 36%),
        radial-gradient(circle at 88% 72%, rgba(200, 77, 255, 0.26), transparent 38%),
        rgba(5, 8, 22, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 48px rgba(0, 0, 0, 0.38);
    animation: logoDrift 8s ease-in-out infinite;
}

.hero-mark::before,
.hero-mark::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.hero-mark::before {
    inset: 16% -18% auto;
    height: 34%;
    background: linear-gradient(90deg, transparent, rgba(87, 215, 255, 0.52), rgba(255, 120, 234, 0.54), transparent);
    filter: blur(14px);
    transform: rotate(-8deg);
}

.hero-mark::after {
    inset: auto 12% 14% auto;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.34), rgba(87, 215, 255, 0.16) 34%, transparent 70%);
    opacity: 0.85;
}

.hero-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--chrome);
    font-family: var(--mono-font);
    font-size: 0.78rem;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.hero-badge::before {
    content: '';
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue-hot), var(--magenta-hot));
    box-shadow: 0 0 18px rgba(87, 215, 255, 0.45);
}

.hero-logo {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    justify-self: center;
    filter: drop-shadow(0 0 18px rgba(87, 215, 255, 0.26)) drop-shadow(0 0 26px rgba(200, 77, 255, 0.24));
}

.hero-note {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.hero-compact h1 {
    max-width: 13ch;
    font-size: clamp(2.4rem, 7vw, 4.25rem);
}

.hero-compact .hero-logo {
    width: min(100%, 360px);
}

.eyebrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.9rem;
    color: var(--blue-hot);
    font-family: var(--mono-font);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: '';
    width: 1.4rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue-hot));
}

h1,
h2,
h3,
p,
ul,
pre {
    position: relative;
    z-index: 1;
}

h1 {
    margin: 0;
    max-width: 11ch;
    color: var(--chrome);
    font-family: var(--display-font);
    font-size: clamp(2.75rem, 8vw, 5.5rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    text-wrap: balance;
}

h1 span {
    background: linear-gradient(90deg, var(--blue-hot), var(--magenta-hot));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2,
h3 {
    color: var(--text-strong);
    font-family: var(--display-font);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.lede,
.dashboard-copy,
.leaderboard-summary {
    max-width: 64ch;
    margin: 1.25rem 0 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.15rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 215, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 14px 28px rgba(24, 155, 255, 0.15), 0 14px 28px rgba(200, 77, 255, 0.14);
}

.button-primary {
    border-color: rgba(130, 190, 255, 0.42);
    background: linear-gradient(90deg, rgba(24, 155, 255, 0.24), rgba(200, 77, 255, 0.24));
    color: var(--text-strong);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.04);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.content-grid > .panel,
.dashboard-grid > .panel,
.leaderboard-grid > .panel {
    padding: 1.5rem;
    animation: riseIn 560ms ease both;
}

.content-grid > .panel:nth-child(1),
.dashboard-grid > .panel:nth-child(1),
.leaderboard-grid > .panel:nth-child(1) {
    animation-delay: 90ms;
}

.content-grid > .panel:nth-child(2),
.dashboard-grid > .panel:nth-child(2),
.leaderboard-grid > .panel:nth-child(2) {
    animation-delay: 160ms;
}

.content-grid > .panel:nth-child(3),
.leaderboard-grid > .panel:nth-child(3) {
    animation-delay: 230ms;
}

.content-grid > .panel:nth-child(4),
.leaderboard-grid > .panel:nth-child(4) {
    animation-delay: 300ms;
}

.status-panel {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, var(--panel-strong), rgba(9, 12, 28, 0.96));
}

.spotlight-panel {
    grid-column: 1 / -1;
}

.panel-heading {
    margin-bottom: 1rem;
}

.panel-heading h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.95rem);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.status-grid article,
.split-list article,
.metric-card,
.guild-item,
.empty-state,
.leaderboard-row,
.leaderboard-empty,
.spotlight-empty,
.photo-card {
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid var(--tile-line);
    background: linear-gradient(180deg, var(--tile), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-family: var(--mono-font);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

strong {
    color: var(--text-strong);
    font-size: 1.08rem;
}

.split-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.photo-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.spotlight-media,
.photo-card-media {
    display: block;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(149, 188, 255, 0.16);
    background: linear-gradient(180deg, rgba(4, 6, 18, 0.96), rgba(9, 12, 28, 0.82));
}

.spotlight-media {
    min-height: 360px;
}

.spotlight-image,
.photo-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spotlight-image {
    min-height: 360px;
    aspect-ratio: 16 / 10;
}

.spotlight-empty {
    min-height: 360px;
    display: grid;
    place-items: center;
    color: var(--muted);
    text-align: center;
    line-height: 1.7;
}

.spotlight-copy {
    display: grid;
    gap: 0.85rem;
    align-content: start;
}

.gallery-shell {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-panel {
    padding: 1.5rem;
    animation: riseIn 560ms ease both;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.photo-card {
    display: grid;
    gap: 0.9rem;
}

.photo-card-media {
    aspect-ratio: 4 / 3;
}

.photo-card-body {
    display: grid;
    gap: 0.55rem;
}

.photo-card-title {
    margin: 0;
    font-size: 1rem;
}

.photo-card-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.photo-card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

ul {
    margin: 0.9rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.7;
}

pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 22px;
    border: 1px solid rgba(149, 188, 255, 0.16);
    background: linear-gradient(180deg, rgba(4, 6, 18, 0.96), rgba(9, 12, 28, 0.82));
    color: #bce6ff;
    font-family: var(--mono-font);
    box-shadow: inset 3px 0 0 rgba(87, 215, 255, 0.36);
}

code {
    font-family: var(--mono-font);
}

.caution-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.toolbar,
.leaderboard-toolbar {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
    margin-top: 1rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.metric-card {
    position: relative;
    z-index: 1;
}

.metric-card strong {
    display: block;
    margin-top: 0.45rem;
    color: var(--chrome);
    font-family: var(--display-font);
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    letter-spacing: 0.03em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: var(--chrome);
    font-family: var(--mono-font);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-pill::before {
    content: '';
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: var(--magenta-core);
    box-shadow: 0 0 0 0.2rem rgba(200, 77, 255, 0.14);
}

.status-pill.online::before {
    background: var(--blue-hot);
    box-shadow: 0 0 0 0.2rem rgba(87, 215, 255, 0.14);
}

.status-pill.offline::before {
    background: var(--danger);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 143, 0.14);
}

.guild-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.85rem;
}

.guild-item,
.empty-state {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
}

.empty-state {
    grid-template-columns: 1fr;
    color: var(--muted);
}

.guild-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 24px rgba(24, 155, 255, 0.18);
}

.guild-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: linear-gradient(135deg, rgba(24, 155, 255, 0.18), rgba(200, 77, 255, 0.18));
    color: var(--text-strong);
    font-family: var(--display-font);
    font-weight: 700;
}

.guild-name {
    margin: 0;
    font-size: 1rem;
}

.guild-meta,
.muted-line {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.mono-line {
    font-family: var(--mono-font);
    font-size: 0.82rem;
    color: var(--muted);
}

.guild-count {
    color: var(--magenta-hot);
    font-family: var(--mono-font);
    font-size: 0.92rem;
}

.leaderboard-layout {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.leaderboard-toolbar,
.leaderboard-section,
.leaderboard-empty,
.leaderboard-row {
    position: relative;
    z-index: 1;
}

.leaderboard-toolbar {
    align-items: center;
    justify-content: space-between;
}

.leaderboard-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.guild-picker {
    min-width: min(100%, 320px);
}

.guild-picker label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--blue-hot);
    font-family: var(--mono-font);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guild-picker select {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(149, 188, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
}

.guild-picker select:focus {
    outline: none;
    border-color: rgba(87, 215, 255, 0.46);
    box-shadow: 0 0 0 4px rgba(87, 215, 255, 0.12);
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.leaderboard-list {
    display: grid;
    gap: 0.75rem;
}

.leaderboard-row,
.leaderboard-empty {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
}

.leaderboard-empty {
    grid-template-columns: 1fr;
    color: var(--muted);
}

.leaderboard-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(24, 155, 255, 0.20), rgba(200, 77, 255, 0.24));
    color: var(--text-strong);
    font-family: var(--mono-font);
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.leaderboard-name {
    margin: 0;
    font-size: 1rem;
}

.leaderboard-primary,
.leaderboard-detail {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.leaderboard-value {
    color: var(--blue-hot);
    font-family: var(--mono-font);
    font-size: 0.92rem;
    text-align: right;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoDrift {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@media (max-width: 960px) {
    .hero-grid,
    .dashboard-grid,
    .photo-spotlight {
        grid-template-columns: 1fr;
    }

    h1 {
        max-width: none;
    }

    .hero-mark {
        min-height: 0;
    }
}

@media (max-width: 860px) {
    .content-grid,
    .split-list,
    .status-grid,
    .metric-grid,
    .leaderboard-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .page-shell {
        width: min(100% - 1rem, 1180px);
        padding-top: 1rem;
    }

    .hero,
    .content-grid > .panel,
    .dashboard-grid > .panel,
    .leaderboard-grid > .panel {
        padding: 1.2rem;
    }
}

@media (max-width: 640px) {
    body::before {
        background-size: 24px 24px;
    }

    .hero-actions,
    .toolbar,
    .leaderboard-toolbar,
    .leaderboard-actions,
    .photo-card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .guild-picker {
        min-width: 100%;
    }

    .guild-item,
    .leaderboard-row {
        grid-template-columns: auto 1fr;
    }

    .guild-count,
    .leaderboard-value {
        grid-column: 2;
        justify-self: start;
    }

    .hero-logo {
        max-width: 100%;
    }
}