:root {
    --bg: #05070d;
    --panel: rgba(15, 20, 33, 0.74);
    --panel-2: rgba(18, 25, 40, 0.86);
    --line: rgba(255,255,255,0.09);
    --line-strong: rgba(255,255,255,0.14);
    --text: #f4f7fb;
    --muted: #a8b0c2;
    --red: #ff5b5b;
    --green: #31d29a;
    --blue: #4ea0ff;
    --gold: #ffbf47;
    --discord: #5865f2;
    --shadow: 0 22px 50px rgba(0,0,0,0.34);
    --glow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 30px 60px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255,83,83,0.11), transparent 22%),
        radial-gradient(circle at top right, rgba(88,101,242,0.16), transparent 24%),
        radial-gradient(circle at 50% 20%, rgba(78,160,255,0.12), transparent 35%),
        linear-gradient(180deg, #03050a, #07101d 50%, #06080d 100%);
}

body.effects-off #snow-canvas,
body.effects-off .fireline,
body.effects-off .ember-layer,
body.effects-off .background-orb {
    display: none;
}

body.effects-off .hero-card,
body.effects-off .account-card,
body.effects-off .server-section,
body.effects-off .topbar,
body.effects-off .stat-card {
    transition: none;
}

a { color: inherit; }

.background-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
}

.background-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

.orb-1 {
    top: 8%;
    left: -80px;
    width: 320px;
    height: 320px;
    background: rgba(255, 74, 74, 0.18);
    animation: floatOrb 12s ease-in-out infinite;
}

.orb-2 {
    right: -60px;
    top: 18%;
    width: 280px;
    height: 280px;
    background: rgba(88, 101, 242, 0.18);
    animation: floatOrb 14s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, 22px, 0) scale(1.08); }
}

#snow-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.95;
}

.ember-layer {
    position: fixed;
    inset: auto 0 0 0;
    height: 230px;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ember {
    position: absolute;
    bottom: -20px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,220,120,0.95) 0%, rgba(255,122,0,0.8) 45%, rgba(255,122,0,0) 72%);
    box-shadow: 0 0 14px rgba(255,153,51,0.3);
    animation: emberRise linear infinite;
    opacity: 0.65;
}

@keyframes emberRise {
    0% { transform: translate3d(0, 0, 0) scale(0.8); opacity: 0; }
    10% { opacity: 0.9; }
    100% { transform: translate3d(var(--drift), -210px, 0) scale(1.4); opacity: 0; }
}

.fireline {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.85;
    background:
        radial-gradient(circle at 8% 100%, rgba(255,120,0,0.9) 0%, rgba(255,120,0,0.0) 28%),
        radial-gradient(circle at 24% 100%, rgba(255,190,0,0.75) 0%, rgba(255,190,0,0.0) 26%),
        radial-gradient(circle at 40% 100%, rgba(255,80,0,0.88) 0%, rgba(255,80,0,0.0) 29%),
        radial-gradient(circle at 57% 100%, rgba(255,150,0,0.72) 0%, rgba(255,150,0,0.0) 28%),
        radial-gradient(circle at 74% 100%, rgba(255,90,0,0.86) 0%, rgba(255,90,0,0.0) 30%),
        radial-gradient(circle at 90% 100%, rgba(255,210,90,0.75) 0%, rgba(255,210,90,0.0) 25%);
    filter: blur(22px);
    animation: firePulse 2s ease-in-out infinite alternate;
}

.fireline::before,
.fireline::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(255,80,0,0.16), transparent 55%),
        radial-gradient(circle at 14% 100%, rgba(255,250,200,0.28) 0%, transparent 16%),
        radial-gradient(circle at 46% 100%, rgba(255,230,150,0.18) 0%, transparent 14%),
        radial-gradient(circle at 77% 100%, rgba(255,250,200,0.22) 0%, transparent 15%);
    filter: blur(16px);
}

.fireline::after {
    opacity: 0.55;
    animation: firePulse 1.35s ease-in-out infinite alternate-reverse;
}

@keyframes firePulse {
    0% { transform: translateY(0) scaleY(0.96); opacity: 0.72; }
    50% { transform: translateY(-4px) scaleY(1.06); opacity: 0.92; }
    100% { transform: translateY(0) scaleY(1); opacity: 0.82; }
}

.page {
    position: relative;
    z-index: 3;
    width: min(1240px, calc(100vw - 28px));
    margin: 18px auto 28px;
}

.topbar, .hero-card, .account-card, .server-section, .stat-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(18, 24, 39, 0.85), rgba(11, 16, 27, 0.86));
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.topbar {
    border-radius: 22px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.brand-mini {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand-mini-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.brand-mini-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.brand-mini-sub, .muted {
    color: var(--muted);
}

.topbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.clock-box, .refresh-btn, .chip, .hint-pill, .notice {
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.05);
}

.clock-box,
.refresh-btn,
.fx-toggle {
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
}

.refresh-btn {
    cursor: pointer;
    font-weight: 700;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.refresh-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }

.notice {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
}

.notice.info { color: #dde7ff; }
.notice.danger { color: #ffd6d6; border-color: rgba(255,83,83,0.35); background: rgba(255,83,83,0.12); }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.hero-card, .account-card, .server-section {
    border-radius: 26px;
    padding: 22px;
}

.hero-card {
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(255,83,83,0.11), transparent 30%, rgba(78,160,255,0.08) 70%, transparent 100%);
    pointer-events: none;
}

.hero-head {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.logo-box {
    width: 136px;
    height: 136px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--glow);
}

.hero-logo {
    width: 112px;
    height: 112px;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,0.24));
}

.hero-eyebrow {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
}

h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-shadow: 0 0 30px rgba(255,83,83,0.26);
}

.hero-copy p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 820px;
}

.action-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.btn {
    min-height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 900;
    font-size: 15px;
    border: 1px solid transparent;
    padding: 12px 16px;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, filter .18s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0,0,0,.2); filter: saturate(1.05); }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: linear-gradient(135deg, #ff4343, #ff8240); color: #fff; box-shadow: 0 16px 30px rgba(255, 75, 75, 0.22); }
.btn-success { background: linear-gradient(135deg, #18ba84, #37dca7); color: #fff; box-shadow: 0 16px 30px rgba(49,210,154,.18); }
.btn-discord { background: linear-gradient(135deg, #5865f2, #7a84ff); color: #fff; box-shadow: 0 16px 30px rgba(88,101,242,.20); }
.btn-dark { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.08); }

.hint-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

.hint-pill {
    padding: 9px 12px;
    color: var(--muted);
    font-size: 13px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
}

.chip {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
}

.chip-gray { color: var(--muted); }
.chip-green { color: #dcfff2; background: rgba(49,210,154,.12); border-color: rgba(49,210,154,.3); }
.chip-red { color: #ffdada; background: rgba(255,83,83,.12); border-color: rgba(255,83,83,.3); }
.chip-orange { color: #ffeab9; background: rgba(255,191,71,.12); border-color: rgba(255,191,71,.3); }

.user-box {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 15px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    object-fit: cover;
    flex: 0 0 60px;
}

.avatar-placeholder {
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 900;
    background: rgba(255,255,255,.06);
    color: var(--muted);
}

.status-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.status-item span { color: var(--muted); }
.status-item strong { text-align: right; }

.music-card {
    margin-top: 14px;
    padding: 15px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(88,101,242,0.12), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
}

.music-card-top {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.music-title {
    font-weight: 900;
    font-size: 16px;
}

.music-sub,
.music-hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.music-hint {
    margin-top: 10px;
}

.music-toggle {
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    background: linear-gradient(135deg, #ff4e66, #7a5cff);
    border-radius: 14px;
    padding: 11px 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.music-toggle:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0,0,0,.18); }
.music-toggle:disabled { opacity: .6; cursor: not-allowed; }

.server-section {
    margin-top: 16px;
}

.server-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.server-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.server-dot.loading { background: var(--gold); box-shadow: 0 0 0 4px rgba(255,191,71,.16); }
.server-dot.online { background: var(--green); box-shadow: 0 0 0 4px rgba(49,210,154,.16); }
.server-dot.offline { background: var(--red); box-shadow: 0 0 0 4px rgba(255,83,83,.16); }

.server-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    border-radius: 22px;
    padding: 18px;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 46%);
    pointer-events: none;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
    position: relative;
}

.stat-value {
    font-size: clamp(28px, 3.1vw, 38px);
    font-weight: 900;
    letter-spacing: -0.03em;
    position: relative;
}

.small-value {
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.28;
}

.stat-sub {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
    position: relative;
}

.accent-red { box-shadow: inset 0 0 0 1px rgba(255,83,83,.18), var(--shadow); }
.accent-green { box-shadow: inset 0 0 0 1px rgba(49,210,154,.18), var(--shadow); }
.accent-blue { box-shadow: inset 0 0 0 1px rgba(78,160,255,.18), var(--shadow); }
.accent-gold { box-shadow: inset 0 0 0 1px rgba(255,191,71,.18), var(--shadow); }

code {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
}

.sr-only-player {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    left: -9999px;
    top: -9999px;
}

@media (max-width: 1080px) {
    .hero-grid, .server-grid { grid-template-columns: 1fr 1fr; }
    .server-section .server-grid { grid-template-columns: 1fr 1fr; }
    .action-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .page { width: min(100vw - 16px, 1240px); }
    .topbar, .hero-card, .account-card, .server-section { padding: 16px; border-radius: 18px; }
    .hero-grid, .server-grid, .server-section .server-grid, .action-row { grid-template-columns: 1fr; }
    .hero-head { grid-template-columns: 1fr; text-align: center; }
    .logo-box { margin: 0 auto; }
    .section-head, .topbar, .music-card-top { flex-direction: column; align-items: flex-start; }
    .server-inline { flex-wrap: wrap; }
    .status-item { flex-direction: column; align-items: flex-start; }
    .status-item strong { text-align: left; }
    .fireline { height: 120px; }
    .ember-layer { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


.section-head-stack {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.section-sub {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.player-section {
    margin-top: 16px;
}

.players-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.players-board {
    margin-top: 14px;
}

.players-table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
}

.players-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.players-table thead th {
    text-align: left;
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--muted);
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.players-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
    font-size: 14px;
}

.players-table tbody tr:hover {
    background: rgba(255,255,255,0.025);
}

.player-name {
    font-weight: 800;
}

.player-sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}

.role-admin {
    color: #ffd8d8;
    background: rgba(255,83,83,.12);
    border-color: rgba(255,83,83,.28);
}

.role-user {
    color: #dff7ff;
    background: rgba(78,160,255,.12);
    border-color: rgba(78,160,255,.28);
}

@media (max-width: 760px) {
    .section-head-stack {
        flex-direction: column;
        align-items: flex-start;
    }
}
