﻿:root {
    /* Frost Theme (Default) */
    --bg-dark: #080d14;
    --bg-mid: #0d1520;
    --sidebar-bg: #0a1018;
    --card-bg: rgba(0, 200, 255, 0.03);
    --card-border: rgba(0, 200, 255, 0.12);
    --card-border-hover: rgba(0, 200, 255, 0.35);
    --primary: #00c8ff;
    --primary-rgb: 0,200,255;
    --primary-glow: rgba(0, 200, 255, 0.25);
    --primary-dim: rgba(0, 200, 255, 0.08);
    --secondary: #4a7fa5;
    --accent: #e0f4ff;
    --text-main: #ffffff;
    --text-muted: #7ab8d4;
    --online: #00e5a0;
    --offline: #ff4d6a;
    --tps-color: #00c8ff;
    --mspt-color: #f59e0b;
    --player-color: #ffffff;
    --glass: blur(20px);
    --shadow-premium: 0 20px 60px rgba(0, 0, 0, 0.9);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-quartz {
    --bg-dark: #f0f8ff;
    --bg-mid: #e0f0ff;
    --sidebar-bg: #ffffff;
    --card-bg: rgba(0, 100, 180, 0.04);
    --card-border: rgba(0, 100, 180, 0.12);
    --card-border-hover: rgba(0, 100, 180, 0.3);
    --primary: #0077cc;
    --primary-rgb: 0,119,204;
    --primary-glow: rgba(0, 119, 204, 0.2);
    --primary-dim: rgba(0, 119, 204, 0.08);
    --secondary: #5599bb;
    --accent: #003366;
    --text-main: #0a1a2e;
    --text-muted: #5599bb;
    --glass: blur(10px);
    --shadow-premium: 0 10px 30px rgba(0, 50, 100, 0.1);
}

body.theme-crimson {
    --bg-dark: #0a0508;
    --bg-mid: #120810;
    --sidebar-bg: #0d060b;
    --card-bg: rgba(220, 50, 100, 0.04);
    --card-border: rgba(220, 50, 100, 0.15);
    --card-border-hover: rgba(220, 50, 100, 0.4);
    --primary: #ff2d6b;
    --primary-rgb: 255,45,107;
    --primary-glow: rgba(255, 45, 107, 0.3);
    --primary-dim: rgba(255, 45, 107, 0.08);
    --secondary: #8b1a3a;
    --accent: #ffd0df;
    --text-main: #ffe0ea;
    --text-muted: #7a2040;
    --shadow-premium: 0 20px 60px rgba(0, 0, 0, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline-color: var(--primary);
}

/* Custom crosshair cursor everywhere */
*, *:hover, button, a, [onclick], select, input, .nav-item, .player-card, .lb-row, .pcard-tab, .pcard-close {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='11' y='0' width='2' height='9' fill='%23888888' rx='1'/%3E%3Crect x='11' y='15' width='2' height='9' fill='%23888888' rx='1'/%3E%3Crect x='0' y='11' width='9' height='2' fill='%23888888' rx='1'/%3E%3Crect x='15' y='11' width='9' height='2' fill='%23888888' rx='1'/%3E%3C/svg%3E") 12 12, crosshair !important;
}

div:focus { outline: none; }

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--primary-dim) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='11' y='0' width='2' height='9' fill='%23888888' rx='1'/%3E%3Crect x='11' y='15' width='2' height='9' fill='%23888888' rx='1'/%3E%3Crect x='0' y='11' width='9' height='2' fill='%23888888' rx='1'/%3E%3Crect x='15' y='11' width='9' height='2' fill='%23888888' rx='1'/%3E%3C/svg%3E") 12 12, crosshair;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(var(--primary-rgb,0,200,255),0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 70%, rgba(var(--primary-rgb,0,200,255),0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 50%, var(--primary-dim) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
    animation: bgShimmer 8s ease-in-out infinite alternate;
}

@keyframes bgShimmer {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb,0,200,255),0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb,0,200,255),0.3); }

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════
   SIDEBAR — Compact dark panel
═══════════════════════════════════════ */
.sidebar {
    width: 220px;
    background: #060b11;
    border-right: 1px solid var(--primary-dim);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 10;
    flex-shrink: 0;
}

/* Theme Switcher */
.theme-switcher { display: flex; gap: 5px; margin-bottom: 18px; padding: 3px; background: rgba(0,0,0,0.4); border-radius: 8px; border: 1px solid var(--primary-dim); }
.theme-btn { width: 100%; height: 28px; border: none; border-radius: 6px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; font-size: 12px; background: transparent; color: var(--text-muted); }
.theme-btn:hover { color: var(--text-main); }
.theme-btn.active { background: var(--primary); color: #000; }

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.logo-icon { font-size: 22px; }
.logo-text { font-size: 16px; font-weight: 900; letter-spacing: 3px; color: var(--primary); }
.logo-text span { color: rgba(var(--primary-rgb,0,200,255),0.4); font-weight: 300; }

/* Nav */
.nav-section { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border-radius: 8px; cursor: pointer; transition: var(--transition);
    color: rgba(100,160,200,0.6); font-size: 13px; font-weight: 500;
    position: relative;
}
.nav-item:hover { color: var(--text-main); background: rgba(var(--primary-rgb,0,200,255),0.05); }
.nav-item.active {
    color: var(--primary);
    background: var(--primary-dim);
    font-weight: 700;
    border-left: 2px solid var(--primary);
    padding-left: 12px;
}
.nav-item.active::after {
    content: '•'; position: absolute; right: 12px;
    color: var(--primary); font-size: 14px;
    animation: navDotPulse 2s ease-in-out infinite;
}
@keyframes navDotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.nav-item i { width: 16px; text-align: center; font-size: 13px; }

/* Live Broadcast widget */
.live-activity-widget {
    margin-top: 16px;
    background: rgba(var(--primary-rgb,0,200,255),0.03);
    border: 1px solid var(--primary-dim);
    border-radius: 10px;
    padding: 12px;
}
.live-activity-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.live-activity-header h3 {
    font-size: 9px; text-transform: uppercase; letter-spacing: 2px;
    color: var(--text-muted); font-weight: 700;
}
.pulse-dot {
    width: 6px; height: 6px; background: var(--online);
    border-radius: 50%; box-shadow: 0 0 6px var(--online);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
.live-log-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 11px;
}
.live-log-item:last-child { border-bottom: none; }
.log-user { font-weight: 600; color: var(--text-main); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-change { font-weight: 800; font-size: 11px; margin-left: auto; flex-shrink: 0; }
.log-change.pos { color: var(--online); }
.log-change.neg { color: var(--offline); }

/* Server status */
.server-status-card {
    background: rgba(var(--primary-rgb,0,200,255),0.03);
    border: 1px solid var(--primary-dim);
    border-radius: 10px; padding: 12px; margin-top: 10px;
}
.status-header { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; margin-bottom: 8px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.status-indicator { width: 6px; height: 6px; border-radius: 50%; }
.status-indicator.online { background: var(--online); box-shadow: 0 0 6px var(--online); animation: onlinePulse 2s ease-in-out infinite; }
@keyframes onlinePulse {
    0%, 100% { box-shadow: 0 0 4px var(--online); }
    50% { box-shadow: 0 0 12px var(--online); }
}
.server-metrics { display: flex; flex-direction: column; gap: 4px; }
.metric { display: flex; justify-content: space-between; align-items: center; }
.metric-label { font-size: 10px; color: var(--text-muted); }
.metric-value { font-size: 11px; font-weight: 700; color: var(--primary); font-family: 'JetBrains Mono', monospace; }

.sidebar-footer { margin-top: 12px; font-size: 10px; color: var(--primary-glow); text-align: center; letter-spacing: 1px; }

/* ═══════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    background: #080d14;
    min-width: 0;
}

.content-header {
    height: 58px; padding: 0 32px; display: flex; align-items: center;
    border-bottom: 1px solid rgba(var(--primary-rgb,0,200,255),0.07);
    background: rgba(6, 11, 17, 0.95); position: sticky; top: 0; z-index: 5;
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.search-bar { position: relative; width: 280px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 12px; }
.search-bar input {
    width: 100%; border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    background: rgba(var(--primary-rgb,0,200,255),0.03);
    border-radius: 8px; padding: 9px 14px 9px 40px;
    color: var(--text-main); transition: var(--transition);
    font-family: inherit; font-size: 13px;
}
.search-bar input::placeholder { color: rgba(74,127,165,0.5); }
.search-bar input:focus { outline: none; border-color: rgba(var(--primary-rgb,0,200,255),0.3); background: rgba(var(--primary-rgb,0,200,255),0.05); }

/* Refresh FAB — fixed bottom right */
.refresh-fab {
    position: fixed; bottom: 28px; right: 28px; z-index: 50;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(var(--primary-rgb,0,200,255),0.1);
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.3);
    color: var(--primary); font-size: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb,0,200,255),0.15);
}
.refresh-fab:hover {
    background: rgba(var(--primary-rgb,0,200,255),0.2);
    box-shadow: 0 4px 24px rgba(var(--primary-rgb,0,200,255),0.3);
    transform: rotate(30deg);
}
.refresh-fab:active { transform: rotate(180deg); }

.viewport { padding: 28px 32px; }

.section-title { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.section-title h2 {
    font-size: 13px; font-weight: 700; letter-spacing: 3px;
    text-transform: uppercase; color: #ffffff;
    display: flex; align-items: center; gap: 10px;
}
.section-title h2::before {
    content: ''; display: inline-block; width: 3px; height: 16px;
    background: var(--primary); border-radius: 2px;
    box-shadow: 0 0 8px var(--primary);
}
.section-title p { color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.title-left { display: flex; flex-direction: column; }

.sort-controls { display: flex; align-items: center; gap: 8px; }
.sort-controls label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; }

select#sort-by {
    appearance: none;
    background: rgba(var(--primary-rgb,0,200,255),0.04);
    border: 1px solid var(--card-border);
    border-radius: 7px;
    color: var(--text-main);
    padding: 7px 28px 7px 12px;
    font-family: inherit; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300c8ff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center; background-size: 10px;
    min-width: 120px;
}
select#sort-by:focus { outline: none; border-color: var(--primary); }
select#sort-by option { background: #0d1520; color: var(--text-main); }

/* ═══════════════════════════════════════
   PLAYER CARDS — Match reference design
═══════════════════════════════════════ */
.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.player-card {
    background: #0a1018;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.2);
    border-radius: 18px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: cardEntrance 0.4s ease forwards;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb,0,200,255),0.05), inset 0 0 30px rgba(0,200,255,0.02);
}
.player-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-border-hover);
    box-shadow: 0 8px 30px var(--primary-glow);
}
.player-card:focus { outline: none; }
.player-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
    box-shadow: 0 8px 32px rgba(var(--primary-rgb,0,200,255),0.15), 0 0 0 1px rgba(var(--primary-rgb,0,200,255),0.15);
}
.player-card.offline-card { opacity: 0.4; }

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Top row: rank badge left, status right */
.p-card-top {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; margin-bottom: 12px;
}

/* Rank badge — gold box like reference */
.p-card-rank-badge {
    background: rgba(255, 200, 0, 0.15);
    border: 1px solid rgba(255, 200, 0, 0.4);
    color: #ffd700;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px; font-weight: 900;
    padding: 4px 10px; border-radius: 8px;
    letter-spacing: 0.5px;
}

/* Online/Offline status top-right */
.p-status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.p-status.online { color: var(--online); }
.p-status.online .status-dot { background: var(--online); box-shadow: 0 0 6px var(--online); animation: pulse-blue 2s infinite; }
.p-status.offline { color: #555; }
.p-status.offline .status-dot { background: #555; }

/* Bust skin — head + torso, front facing */
.p-avatar {
    width: 100px; height: 100px;
    margin-bottom: 12px;
    overflow: hidden;
    background: transparent;
    position: relative;
    flex-shrink: 0;
}
.p-avatar img {
    width: 100%; height: 100%;
    display: block;
    image-rendering: auto;
}

/* Player name */
.p-name {
    font-size: 16px; font-weight: 700; color: #ffffff;
    margin-bottom: 12px; text-align: center;
}

/* 2x2 stat mini-grid */
.p-mini-stats {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 6px; width: 100%; margin-bottom: 10px;
}
.p-mini-stat {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px; padding: 7px 10px;
    display: flex; align-items: center; gap: 7px;
}
.p-mini-stat i { font-size: 12px; flex-shrink: 0; }
.p-mini-stat span { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: #ffffff; }

/* Bottom divider + K/D row */
.p-card-bottom {
    width: 100%; border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 10px; margin-top: 2px;
    display: flex; justify-content: space-between; align-items: center;
}
.p-kd-label { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.p-kd-val { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 800; color: var(--primary); }

/* Effect Badge */
.p-effect-badge {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 10px; margin-bottom: 2px; padding: 6px 14px; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-dim), rgba(0, 150, 200, 0.04));
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.2);
    color: var(--primary); font-weight: 700; font-size: 12px;
    box-shadow: 0 0 12px rgba(var(--primary-rgb,0,200,255),0.1);
    transition: var(--transition); width: 100%; justify-content: center;
    animation: effectGlow 3s ease-in-out infinite alternate;
}
@keyframes effectGlow {
    from { box-shadow: 0 0 8px rgba(var(--primary-rgb,0,200,255),0.1); }
    to   { box-shadow: 0 0 18px var(--primary-glow); }
}
.player-card:hover .p-effect-badge {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.14), rgba(0, 150, 200, 0.08));
    border-color: rgba(var(--primary-rgb,0,200,255),0.4);
}
.p-effect-badge.effect-none {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.06);
    color: var(--text-muted);
    box-shadow: none;
    animation: none;
}
.p-effect-badge i { font-size: 11px; }
.p-effect-badge .lab { font-size: 9px; opacity: 0.6; letter-spacing: 1px; text-transform: uppercase; }
.p-effect-badge .val { font-family: 'JetBrains Mono', monospace; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }

/* Quick Stats on Cards */
.p-quick-stats {
    display: flex; justify-content: center; gap: 20px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(var(--primary-rgb,0,200,255),0.06);
}
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-item .val { font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 13px; color: var(--text-main); }
.stat-item .lab { font-size: 9px; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-top: 2px; }

/* ELO Rank Badge on player cards */
.p-rank-badge {
    display: inline-block; margin-top: 8px;
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    padding: 3px 10px; border-radius: 20px; border: 1px solid;
    letter-spacing: 0.5px;
}

/* ELO Rank Pill on leaderboard rows */
.elo-rank-pill {
    display: inline-block; font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 8px; border-radius: 20px; border: 1px solid;
    white-space: nowrap;
}

/* FAQ Section */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 780px; }
.faq-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 16px; padding: 0;
    transition: var(--transition); cursor: pointer; overflow: hidden;
}
.faq-card:hover { border-color: rgba(255,255,255,0.12); }
.faq-card.faq-open { border-color: rgba(255,255,255,0.2); }
.faq-q {
    font-size: 14px; font-weight: 800; color: var(--text-main);
    padding: 18px 22px; display: flex; align-items: center;
    justify-content: space-between; gap: 12px; user-select: none;
}
.faq-q::after {
    content: '+';
    font-size: 22px; font-weight: 300; color: var(--text-muted);
    flex-shrink: 0; line-height: 1;
}
.faq-card.faq-open .faq-q::after { content: '\00D7'; color: var(--text-main); font-size: 24px; }
.faq-a {
    font-size: 13px; color: var(--text-muted); line-height: 1.8;
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
    padding: 0 22px;
}
.faq-card.faq-open .faq-a { max-height: 400px; padding: 0 22px 18px; }
.faq-a b { color: var(--text-main); }

@keyframes pulse-blue {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Details Panel — Right side slide-in */
.details-panel {
    position: fixed; inset: 0;
    z-index: 100;
    display: flex; align-items: stretch; justify-content: flex-end;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
}
.details-panel.open { opacity: 1; pointer-events: auto; }

.pcard-overlay-bg {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}
.pcard-container {
    position: relative; z-index: 1;
    width: 400px; height: 100vh; overflow-y: auto;
    background: #0a0a0a; border-radius: 0;
    border-left: 1px solid rgba(var(--primary-rgb,0,200,255),0.15);
    padding: 20px 16px 32px;
    display: flex; flex-direction: column; gap: 10px;
    font-family: 'Space Grotesk','Outfit',sans-serif;
    box-shadow: -8px 0 40px rgba(0,0,0,0.8);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.details-panel.open .pcard-container {
    transform: translateX(0);
}
.pcard-container::-webkit-scrollbar { width: 4px; }
.pcard-container::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
.pcard-close {
    position: sticky; top: 0; align-self: flex-end;
    width: 28px; height: 28px; border-radius: 8px;
    background: #111; border: 1px solid rgba(var(--primary-rgb,0,200,255),0.15); color: var(--text-muted);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: background 0.15s, color 0.15s;
    margin-bottom: 4px; flex-shrink: 0; z-index: 10;
}
.pcard-close:hover { background: rgba(var(--primary-rgb,0,200,255),0.1); color: var(--primary); }
.pcard-block {
    background: #111;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    border-radius: 12px;
    box-shadow: 0 4px 0 #000;
    transition: box-shadow 0.1s, transform 0.1s;
}
.pcard-block:active { box-shadow: 0 1px 0 #000; transform: translateY(2px); }
.pcard-hero { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.pcard-avatar {
    width: 52px; height: 52px; border-radius: 12px;
    background: #0d1520;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.2);
    overflow: hidden;
    flex-shrink: 0;
}
.pcard-hero-info { flex: 1; min-width: 0; }
.pcard-username { font-size: 20px; font-weight: 700; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.pcard-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.pcard-badge {
    font-size: 11px; font-weight: 600; padding: 3px 10px;
    border-radius: 20px;
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.2);
}
.pcard-badge-status { background: rgba(255,255,255,0.04); color: var(--text-muted); border-color: rgba(255,255,255,0.08); }
.pcard-badge-status.online { color: #00e5a0; border-color: rgba(0,229,160,0.3); background: rgba(0,229,160,0.08); }
.pcard-elo-block { text-align: right; flex-shrink: 0; }
.pcard-elo-val { font-family: 'Space Mono',monospace; font-size: 32px; font-weight: 700; color: var(--primary); line-height: 1; text-shadow: 0 0 20px rgba(var(--primary-rgb,0,200,255),0.4); }
.pcard-elo-lab { font-size: 10px; color: var(--text-muted); letter-spacing: 2px; margin-top: 2px; }
.pcard-quick-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.pcard-quick { padding: 12px 8px; text-align: center; }
.pcard-quick-val { font-family: 'Space Mono',monospace; font-size: 18px; font-weight: 700; color: #ffffff; line-height: 1; }
.pcard-quick-lab { font-size: 9px; color: var(--text-muted); letter-spacing: 1.5px; margin-top: 4px; }
.pcard-effect { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.pcard-effect-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--primary-dim);
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 15px; flex-shrink: 0;
}
.pcard-effect-info { flex: 1; }
.pcard-effect-name { font-size: 15px; font-weight: 600; color: #ffffff; }
.pcard-effect-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.pcard-effect-boost { text-align: right; }
.pcard-effect-boost-lab { font-size: 9px; color: var(--text-muted); letter-spacing: 1.5px; }
.pcard-effect-boost-val { font-family: 'Space Mono',monospace; font-size: 22px; font-weight: 700; color: var(--primary); }
.pcard-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.pcard-tab {
    padding: 10px 0; border-radius: 10px;
    background: #111; border: 1px solid var(--primary-dim); color: var(--text-muted);
    font-family: 'Space Grotesk',sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
    cursor: pointer; box-shadow: 0 4px 0 #000;
    transition: box-shadow 0.1s, transform 0.1s, background 0.15s, color 0.15s;
}
.pcard-tab:hover { color: var(--primary); border-color: rgba(var(--primary-rgb,0,200,255),0.2); }
.pcard-tab:active { box-shadow: 0 1px 0 #000; transform: translateY(2px); }
.pcard-tab-active {
    background: rgba(var(--primary-rgb,0,200,255),0.1);
    border-color: rgba(var(--primary-rgb,0,200,255),0.3);
    color: var(--primary);
    box-shadow: 0 4px 0 #000, 0 0 12px rgba(var(--primary-rgb,0,200,255),0.1);
}
.pcard-panel { display: flex; flex-direction: column; }
.pcard-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 4px; border-bottom: 1px solid rgba(var(--primary-rgb,0,200,255),0.06);
}
.pcard-row:last-child { border-bottom: none; }
.pcard-row-lab { font-size: 13px; color: var(--text-muted); }
.pcard-row-val { font-family: 'Space Mono',monospace; font-size: 13px; font-weight: 700; color: #ffffff; }
.pcard-mini-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.pcard-mini { padding: 12px 14px; box-shadow: 0 4px 0 #000; }
.pcard-mini-lab { font-size: 9px; color: var(--text-muted); letter-spacing: 1.5px; margin-bottom: 6px; }
.pcard-mini-val { font-family: 'Space Mono',monospace; font-size: 18px; font-weight: 700; color: #ffffff; }

.stat-group { display: flex; flex-direction: column; gap: 20px; }
.group-title { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--secondary); font-weight: 700; border-left: 3px solid var(--primary); padding-left: 12px; }

/* Grid Fix */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat-card {
    background: #0d1520;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    padding: 16px 18px; border-radius: 14px;
    display: flex; flex-direction: column; gap: 8px;
    transition: var(--transition);
}
.stat-card:hover { background: #111d2a; border-color: rgba(var(--primary-rgb,0,200,255),0.2); }
.stat-label { font-size: 11px; color: #ffffff; text-transform: uppercase; font-weight: 700; display: block; letter-spacing: 1px; }
.stat-value { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 700; display: block; color: var(--primary); }

/* Health card values */
.h-value { font-size: 36px; font-weight: 800; color: var(--primary); font-family: 'JetBrains Mono', monospace; line-height: 1; }
.h-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #7ab8d4; }
.h-unit { font-size: 18px; font-weight: 700; color: #ffffff; font-family: 'JetBrains Mono', monospace; }

/* Performance Graph Card */
.advanced-graph-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 24px; padding: 24px; margin-top: 32px; }
.graph-wrapper { position: relative; height: 200px; }
.graph-tooltip { pointer-events: none; position: absolute; background: rgba(5,5,7,0.95); border-radius: 8px; padding: 10px; z-index: 50; display: none; font-size: 11px; }

/* ═══════════════════════════════════════
   HEALTH DASHBOARD — New design
═══════════════════════════════════════ */
.health-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 24px;
}
.health-card {
    background: #0d1520;
    border: 1px solid var(--card-border);
    border-radius: 14px; padding: 20px;
    display: flex; flex-direction: column; gap: 6px;
}
.hc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.hc-icon {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.tps-icon { background: rgba(var(--primary-rgb,0,200,255),0.15); color: var(--primary); }
.mspt-icon { background: rgba(var(--primary-rgb,0,200,255),0.15); color: var(--primary); }
.hc-sub { font-size: 11px; color: var(--text-muted); }
.hc-change { font-size: 11px; color: var(--primary); font-weight: 600; }

.health-charts-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; margin-bottom: 24px;
}
.health-chart-card {
    background: #0d1520;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    border-radius: 14px; padding: 20px;
}
.hcc-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: #ffffff; margin-bottom: 16px;
}

.health-summary-card {
    background: #0d1520;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    border-radius: 14px; padding: 24px; margin-bottom: 16px;
}
.hsc-title {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: #ffffff; margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
}
.hsc-title i { color: var(--primary); }
.hsc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hsc-item {
    background: #080d14;
    border: 1px solid var(--primary-dim);
    border-radius: 10px; padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
}
.hsc-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.hsc-val { font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 800; color: var(--primary); }

.health-status-card {
    background: #0d1520;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    border-radius: 14px; padding: 24px;
}
.sys-status-list { display: flex; flex-direction: column; }
.sys-status-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid rgba(var(--primary-rgb,0,200,255),0.06);
    font-size: 14px; font-weight: 500; color: #ffffff;
}
.sys-status-row:last-child { border-bottom: none; }
.sys-status-val { font-weight: 700; font-size: 14px; }

/* Odometer Theme Override (Quartz Style) */
.odometer.odometer-auto-theme, .odometer.odometer-theme-minimal {
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 800 !important;
    color: inherit !important;
    line-height: 1 !important;
}
.odometer.odometer-theme-minimal .odometer-digit { background: transparent !important; border: none !important; color: inherit !important; }
.odometer.odometer-theme-minimal .odometer-digit .odometer-digit-inner { overflow: hidden; color: inherit !important; }
.odometer.odometer-theme-minimal .odometer-digit-spacer { color: inherit !important; }
.odometer.odometer-theme-minimal .odometer-ribbon { color: inherit !important; }
.odometer.odometer-theme-minimal .odometer-ribbon-inner { color: inherit !important; }
.odometer.odometer-theme-minimal .odometer-value { color: inherit !important; }
.odometer * { color: inherit !important; }

/* Triple Chart Suite */
.triple-chart-stack { display: flex; flex-direction: column; gap: 32px; margin-top: 40px; }

.chart-container-premium {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 24px; padding: 24px; position: relative;
    transition: var(--transition);
}
.chart-container-premium:hover { border-color: rgba(255, 255, 255, 0.15); }

.chart-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--card-border);
}

.chart-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-main); }
.chart-title i { margin-right: 10px; opacity: 0.7; }

.axis-y-title { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); opacity: 0.5; }

.chart-body { position: relative; height: 160px; }

.chart-footer-time {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 24px; background: rgba(255,255,255,0.02); border-radius: 12px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted);
}
.axis-x-label { font-weight: 700; color: var(--secondary); text-transform: uppercase; letter-spacing: 2px; }

.chart-tooltip {
    pointer-events: none; position: absolute; background: rgba(5,5,7,0.95);
    border: 1px solid var(--card-border); border-radius: 8px; padding: 12px;
    z-index: 50; display: none; font-family: 'JetBrains Mono', monospace; font-size: 11px;
    box-shadow: var(--shadow-premium); backdrop-filter: blur(10px);
}

.graph-line { fill: none; stroke-width: 2.5; stroke-linecap: round; transition: stroke-dashoffset 2s; }
.line-players { stroke: var(--player-color); }
.line-tps { stroke: var(--tps-color); }
.line-mspt { stroke: var(--mspt-color); opacity: 0.6; stroke-dasharray: 4; }
.line-net { stroke: #3b82f6; filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5)); }

/* Grid & Axis */
.grid-line { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; transition: var(--transition); }
.axis-text { 
    font-family: 'JetBrains Mono', monospace; font-size: 9px; 
    fill: var(--text-muted); opacity: 0.7; pointer-events: none;
    font-weight: 600;
}
.axis-y { text-anchor: end; }
.axis-x { text-anchor: middle; font-size: 8.5px; }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 20px; }

.icon-btn {
    background: var(--card-bg); border: 1px solid var(--card-border);
    color: var(--text-main); width: 42px; height: 42px; border-radius: 12px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--primary); color: #000; border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow); transform: rotate(180deg);
}

.icon-btn i { font-size: 18px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.player-card { animation: fadeIn 0.4s ease forwards; }

/* Leaderboard Ranked List View */
/* ═══════════════════════════════════════
   LEADERBOARD — New design
═══════════════════════════════════════ */
.leaderboard-mode { display: block; width: 100%; }
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }

.lb-row {
    background: #0a0d12;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; transition: all 0.2s ease;
    gap: 16px;
}
.lb-row:hover {
    background: rgba(var(--primary-rgb,0,200,255),0.05);
    border-color: var(--primary-glow);
    transform: translateX(3px);
}

.lb-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }

.lb-medal { font-size: 22px; width: 32px; text-align: center; flex-shrink: 0; }
.lb-rank-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px; font-weight: 700; color: var(--text-muted);
    width: 32px; text-align: center; flex-shrink: 0;
}

.lb-avatar {
    width: 48px; height: 48px; border-radius: 10px;
    overflow: hidden; background: #111;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.15);
    position: relative; flex-shrink: 0;
}
.lb-avatar img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.lb-online-dot {
    position: absolute; bottom: 3px; right: 3px;
    width: 8px; height: 8px; border-radius: 50%;
    border: 1.5px solid #0a0d12;
}
.lb-online-dot.online { background: #00e5a0; box-shadow: 0 0 6px #00e5a0; }
.lb-online-dot.offline { background: #333; }

.lb-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lb-name {
    font-size: 16px; font-weight: 700; color: #ffffff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-sub { font-size: 11px; color: var(--text-muted); }
.lb-sub b { color: var(--primary); font-weight: 700; }

.lb-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.lb-metric-box {
    background: #111;
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.15);
    border-radius: 10px;
    padding: 8px 16px;
    text-align: right; min-width: 90px;
}
.lb-metric-lab { display: block; font-size: 9px; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 2px; }
.lb-metric-val {
    display: block; font-family: 'JetBrains Mono', monospace;
    font-size: 22px; font-weight: 800; color: var(--primary);
    line-height: 1;
}

.lb-status-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.lb-status-dot.online { background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.lb-status-dot.offline { background: #2a2a2a; }

/* Kill Logs Modal */
.kill-logs-modal-overlay {
    position: fixed; inset: 0; background: rgba(5,5,7,0.85); backdrop-filter: blur(8px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.kill-logs-modal-overlay.active { opacity: 1; pointer-events: auto; }
.kill-logs-modal {
    background: var(--card-bg); width: 90%; max-width: 500px;
    border: 1px solid var(--card-border); border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); overflow: hidden;
    transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh; display: flex; flex-direction: column;
}
.kill-logs-modal-overlay.active .kill-logs-modal { transform: translateY(0); }
.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--card-border);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.02);
}
.modal-header h2 { font-size: 16px; font-weight: 800; color: var(--text-main); margin: 0; display: flex; align-items: center; gap: 8px; }
.modal-header h2 i { color: #ef4444; }
.close-modal-btn { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; transition: color 0.2s; }
.close-modal-btn:hover { color: var(--primary); }
.modal-body { padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.kill-log-row {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 12px 16px;
    border-radius: 8px; display: flex; justify-content: space-between; align-items: center; transition: var(--transition);
}
.kill-log-row:hover { background: rgba(255,255,255,0.06); border-color: rgba(239, 68, 68, 0.3); transform: scale(1.02); }
.kill-log-victim { font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.kill-log-victim img { width: 24px; height: 24px; border-radius: 4px; }
.kill-log-time { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }
.kill-log-empty { text-align: center; color: var(--text-muted); font-style: italic; padding: 20px 0; }
.app-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5; padding: 12px 20px; border-radius: 10px; cursor: pointer;
    font-weight: 700; font-size: 13px; transition: var(--transition); width: 100%; margin-top: 20px;
}
.app-btn:hover { background: rgba(239, 68, 68, 0.2); box-shadow: 0 0 15px rgba(239, 68, 68, 0.2); transform: translateY(-2px); }

/* Blog / Updates Section */
.blog-feed { display: flex; flex-direction: column; gap: 24px; max-width: 900px; margin: 0 auto; }
.update-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 16px; padding: 24px; position: relative;
    transition: var(--transition); overflow: hidden;
}
.update-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

.update-date {
    display: inline-block; font-size: 11px; text-transform: uppercase;
    font-weight: 700; color: var(--text-muted); margin-bottom: 12px;
    letter-spacing: 1px; padding: 4px 10px; background: rgba(0,0,0,0.2);
    border-radius: 6px;
}
.update-title { font-size: 20px; font-weight: 800; color: var(--text-main); margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.update-version { 
    font-size: 11px; background: var(--primary); color: #000;
    padding: 2px 8px; border-radius: 4px; font-weight: 800;
}
.update-desc { color: var(--text-muted); line-height: 1.6; font-size: 14px; }
.update-features { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.u-feat { font-size: 11px; background: rgba(255,255,255,0.05); color: var(--text-main); padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); }

/* Blog Reader Overlay */
.blog-reader-overlay {
    position: fixed; inset: 0; background: rgba(5,5,7,0.98); backdrop-filter: blur(20px);
    z-index: 10000; overflow-y: auto; opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease; display: flex; justify-content: center;
}
.blog-reader-overlay.active { opacity: 1; pointer-events: auto; }
.blog-reader-content {
    width: 100%; max-width: 800px; padding: 60px 24px;
    transform: translateY(30px); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.blog-reader-overlay.active .blog-reader-content { transform: translateY(0); }

.close-reader {
    background: none; border: none; color: var(--primary); font-weight: 700;
    font-size: 14px; cursor: pointer; margin-bottom: 40px; display: flex;
    align-items: center; gap: 8px; transition: var(--transition);
}
.close-reader:hover { color: var(--text-main); transform: translateX(-4px); }

/* Article Typography */
.article-header { border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 40px; margin-bottom: 40px; }
.article-title { font-size: 42px; font-weight: 800; color: var(--text-main); line-height: 1.1; margin-bottom: 16px; letter-spacing: -1px; }
.article-meta { color: var(--text-muted); font-size: 14px; font-weight: 600; margin-bottom: 30px; }

/* Author Block */
.author-block { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); }
.author-info { display: flex; flex-direction: column; }
.author-name { font-weight: 700; color: var(--text-main); font-size: 15px; }
.author-handle { color: var(--text-muted); font-size: 13px; font-family: 'JetBrains Mono', monospace; }

/* Table of Contents */
.toc-card {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 16px; margin-bottom: 40px;
}
.toc-header { 
    display: flex; justify-content: space-between; align-items: center; 
    cursor: pointer; color: var(--text-main); font-weight: 700; font-size: 14px;
}
.toc-content { margin-top: 15px; display: flex; flex-direction: column; gap: 8px; }
.toc-link { color: var(--text-muted); font-size: 14px; text-decoration: none; transition: var(--transition); }
.toc-link:hover { color: var(--primary); padding-left: 4px; }

/* Body Content */
.article-body { color: #d1d5db; line-height: 1.8; font-size: 17px; }
.article-body h2 { color: var(--text-main); margin: 40px 0 20px; font-size: 24px; font-weight: 800; border-left: 3px solid var(--primary); padding-left: 15px; }
.article-body p { margin-bottom: 24px; }
.article-body code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--primary); }
.article-body .highlight-text { color: var(--primary); font-weight: 700; }

/* Utility */
.hide { display: none !important; }

/* Mobile Responsiveness (max-width: 768px) */
@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    
    /* Navigation Bar (Top) */
    .sidebar { 
        width: 100%; height: auto; padding: 16px; border-right: none; 
        border-bottom: 1px solid var(--card-border); gap: 12px; z-index: 50; 
    }
    .logo { margin-bottom: 0; justify-content: center; }
    .logo-text { font-size: 18px; }
    .nav-section { 
        flex-direction: row; overflow-x: auto; width: 100%; 
        padding-bottom: 4px; gap: 10px;
    }
    .nav-section::-webkit-scrollbar { display: none; }
    .nav-item { white-space: nowrap; padding: 10px 16px; flex-shrink: 0; }
    .server-status-card { display: none; }
    
    /* Main Layout */
    .content-header { 
        height: auto; padding: 16px; flex-direction: column; gap: 16px; 
        position: static; backdrop-filter: none; background: transparent; border-bottom: none; 
    }
    .search-bar { width: 100%; }
    .sort-controls label { display: none; }
    
    .viewport { padding: 16px; }
    .section-title { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 24px; }
    .section-title h2 { font-size: 24px; }
    .section-title p { font-size: 13px; }
    
    /* Health & Charts */
    .health-grid { gap: 12px; }
    .health-card { padding: 16px; }
    .h-value { font-size: 32px; }
    .chart-container-premium { padding: 16px; border-radius: 16px; }
    .chart-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .chart-footer-time { flex-direction: column; gap: 8px; font-size: 9px; padding: 8px; text-align: center; }
    
    /* Leaderboard */
    .leader-row { flex-wrap: wrap; padding: 16px; gap: 12px; justify-content: center; text-align: center; border-radius: 12px; }
    .rank-number { width: 100%; font-size: 20px; line-height: 1; }
    .leader-info { align-items: center; }
    .leader-name-wrapper { justify-content: center; margin-bottom: 6px; flex-wrap: wrap; }
    .leader-name { max-width: 100%; white-space: normal; line-height: 1.2; }
    .leader-metric { width: 100%; text-align: center; }
    
    /* Floating Panel */
    .details-panel { width: 100%; border-left: none; }
    .detail-content-wrapper { padding: 0 16px 24px; }
    .close-panel { top: 12px; right: 12px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Premium Graphs */
.graph-grid-line { stroke: rgba(255,255,255,0.03); stroke-width: 1; }
.graph-rank-marker { stroke: rgba(255,255,255,0.05); stroke-width: 1; stroke-dasharray: 4 4; }
.graph-label-text { fill: var(--text-muted); font-size: 8px; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.5px; }

.graph-bar-container { background: rgba(0,0,0,0.3); border-radius: 100px; height: 16px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.graph-bar {
    height: 100%; border-radius: 100px; position: relative;
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
}
.graph-bar::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: barShine 3s infinite linear;
}

@keyframes barShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.p-rank-badge { animation: badgeFade 0.6s ease-out forwards; }
@keyframes badgeFade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

#svg-elo-progression circle { transition: r 0.2s, stroke-width 0.2s; }
#svg-elo-progression circle:hover { r: 6; stroke-width: 3; filter: drop-shadow(0 0 5px var(--primary)); }

/* Chart Interaction Layer */
.chart-container { position: relative; width: 100%; height: 100px; }
.chart-crosshair {
    position: absolute; top: 0; bottom: 0; width: 1px;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none; opacity: 0; transition: opacity 0.2s;
    z-index: 10;
}
.chart-container:hover .chart-crosshair { opacity: 1; }

.chart-slice {
    fill: transparent !important;
    stroke: none !important;
    cursor: crosshair;
}
.chart-slice:hover { fill: rgba(255, 255, 255, 0.05) !important; }

#svg-elo-progression circle, #svg-rank-progression circle {
    pointer-events: none; /* Make circles non-blocking, handled by slices */
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Live Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    min-width: 340px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    animation: toast-in 0.6s forwards;
}

@keyframes toast-in {
    to { transform: translateX(0); }
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(50px);
}

.toast-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-msg {
    font-size: 1.0rem;
    color: var(--text-muted);
}

.toast.gain { border-left-color: #10b981; }
.toast.gain .toast-icon { color: #10b981; }
.toast.loss { border-left-color: #ef4444; }
.toast.loss .toast-icon { color: #ef4444; }

/* Rank Specific Toasts */
.toast.rank-up { border-left-color: #f59e0b; background: rgba(30, 25, 10, 0.9); }
.toast.rank-up .toast-icon { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.toast.rank-down { border-left-color: #8b5cf6; background: rgba(25, 20, 35, 0.9); }
.toast.rank-down .toast-icon { color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }

/* Dashboard Ticker / Sidebar Widget */
.live-activity-widget {
    margin-top: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.live-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.live-activity-header h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.live-log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.live-log-item:last-child { border-bottom: none; }

.log-user { font-weight: 600; font-size: 0.85rem; }
.log-change { font-weight: 800; font-size: 0.85rem; margin-left: auto; }
.log-change.pos { color: #10b981; }
.log-change.neg { color: #ef4444; }

/* ═══════════════════════════════════════
   ACTIVITY LOG — Live Events redesign
═══════════════════════════════════════ */
.events-feed-container {
    display: flex; flex-direction: column;
    max-width: 860px;
}

/* Header */
.al-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.al-title-row { display: flex; align-items: center; gap: 12px; }
.al-title-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(var(--primary-rgb,0,200,255),0.1);
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 15px;
}
.al-title { font-size: 18px; font-weight: 800; color: #ffffff; letter-spacing: 2px; }
.al-live-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(var(--primary-rgb,0,200,255),0.08);
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.2);
    color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: 1px;
}
.al-live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 0 6px var(--primary);
    animation: pulse 2s infinite;
}

/* Summary cards */
.al-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px; }
.al-sum-card {
    background: #0d1520; border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    border-radius: 12px; padding: 16px 18px;
}
.al-sum-lab { font-size: 9px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.al-sum-val { font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 800; color: #ffffff; line-height: 1; }
.al-sum-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Tabs */
.al-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.al-tab {
    padding: 8px 20px; border-radius: 8px;
    background: #0d1520; border: 1px solid rgba(var(--primary-rgb,0,200,255),0.1);
    color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
    cursor: pointer; transition: all 0.15s ease;
}
.al-tab:hover { color: #ffffff; border-color: rgba(var(--primary-rgb,0,200,255),0.25); }
.al-tab-active {
    background: rgba(var(--primary-rgb,0,200,255),0.1);
    border-color: rgba(var(--primary-rgb,0,200,255),0.3);
    color: var(--primary);
}

/* Feed */
.al-feed { display: flex; flex-direction: column; gap: 6px; }
.al-empty { text-align: center; padding: 48px; color: var(--text-muted); }
.al-empty i { font-size: 2rem; margin-bottom: 12px; opacity: 0.3; display: block; }

/* Row */
.al-row {
    display: flex; align-items: center; gap: 16px;
    background: #0a0d12; border: 1px solid rgba(var(--primary-rgb,0,200,255),0.08);
    border-radius: 10px; padding: 12px 16px;
    transition: background 0.15s, border-color 0.15s;
}
.al-row:hover { background: rgba(var(--primary-rgb,0,200,255),0.04); border-color: rgba(var(--primary-rgb,0,200,255),0.18); }
.al-row-rank {
    background: rgba(var(--primary-rgb,0,200,255),0.05);
    border-color: rgba(var(--primary-rgb,0,200,255),0.2);
}

.al-row-time { min-width: 52px; }
.al-time-main { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: #ffffff; }
.al-time-sub  { font-size: 10px; color: var(--text-muted); }

.al-row-info { flex: 1; min-width: 0; }
.al-row-user { font-size: 15px; font-weight: 700; color: #ffffff; display: flex; align-items: center; gap: 8px; }
.al-row-sub  { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

.al-rank-tag {
    font-size: 10px; font-weight: 700; padding: 2px 7px;
    border-radius: 6px; background: rgba(var(--primary-rgb,0,200,255),0.1);
    border: 1px solid rgba(var(--primary-rgb,0,200,255),0.2);
    color: var(--primary); font-family: 'JetBrains Mono', monospace;
}

/* Value badges */
.al-val-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px; font-weight: 800;
    padding: 6px 14px; border-radius: 8px;
    border: 1px solid; white-space: nowrap; flex-shrink: 0;
}
.al-val-gain {
    color: var(--primary);
    background: rgba(var(--primary-rgb,0,200,255),0.08);
    border-color: rgba(var(--primary-rgb,0,200,255),0.25);
}
.al-val-loss {
    color: #ff4d6a;
    background: rgba(255,77,106,0.08);
    border-color: rgba(255,77,106,0.25);
}
.al-val-rankup {
    color: var(--primary);
    background: rgba(var(--primary-rgb,0,200,255),0.08);
    border-color: rgba(var(--primary-rgb,0,200,255),0.3);
    display: flex; align-items: center; gap: 5px;
}
.al-val-rankdn {
    color: #ff4d6a;
    background: rgba(255,77,106,0.08);
    border-color: rgba(255,77,106,0.3);
    display: flex; align-items: center; gap: 5px;
}
.tag-top250 { background: #10b98122; color: #10b981; border: 1px solid #10b98144; }

/* Inline search in sort controls */
.search-inline {
    display: flex; align-items: center;
    background: rgba(var(--primary-rgb,0,200,255),0.04);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s ease;
}
.search-inline-btn {
    width: 36px; height: 36px; flex-shrink: 0;
    background: transparent; border: none;
    color: var(--text-muted); font-size: 13px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: color 0.2s;
}
.search-inline-btn:hover { color: var(--primary); }
.search-inline-input {
    width: 0; max-width: 0; padding: 0;
    background: transparent; border: none; outline: none;
    color: #ffffff; font-family: inherit; font-size: 13px;
    transition: all 0.25s ease; overflow: hidden;
}
.search-inline.open { border-color: rgba(var(--primary-rgb,0,200,255),0.3); background: rgba(var(--primary-rgb,0,200,255),0.06); }
.search-inline.open .search-inline-btn { color: var(--primary); }
.search-inline.open .search-inline-input { width: 160px; max-width: 160px; padding: 0 10px 0 0; }

.filter-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 12px;
}
.filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}
.filter-pill.active {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}
.filter-pill i { font-size: 10px; }
/* Exclusive Weapon Badge */
.p-weapon-badge {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
    margin-top: 10px; 
    padding: 8px 16px; 
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(21, 128, 61, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80; 
    font-weight: 800; 
    font-size: 14px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
}
.p-weapon-badge i { 
    color: #4ade80; 
    font-size: 16px; 
    flex-shrink: 0;
}
.p-weapon-badge .val { 
    color: #fff; 
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-ranked-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 5;
    animation: pulse-rank 2s infinite;
}
@keyframes pulse-rank {
    0% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1); }
    50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3); }
    100% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1); }
}
.p-weapon-badge .lab { 
    opacity: 0.6; 
    font-size: 9px; 
    font-weight: 900;
    margin-right: -2px;
    letter-spacing: 2px;
}

.strength-row { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0 10px; }

/* Profile Hero Stats Styling */
.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px;
}
@media (min-width: 640px) {
    .hero-stats-row { grid-template-columns: repeat(4, 1fr); }
}

.hero-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}
.hero-stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.hero-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.hero-value {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    font-family: 'Outfit', sans-serif !important;
}
.hero-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 6px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#hero-weapon {
    font-family: 'Outfit', sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.weapon-stat-card {
    grid-column: span 2;
}
@media (min-width: 640px) {
    .weapon-stat-card { grid-column: span 1; }
}

/* Fix for the weapon container alignment in profile */
.weapon-stat-card div {
    height: 32px;
}

/* Leaderboard Mini Stats */
.l-stats-mini {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.8;
}
.l-stat-item { display: flex; align-items: center; gap: 4px; }
.l-stat-item i { font-size: 10px; opacity: 0.7; }
.l-stat-strength { color: #f43f5e; font-weight: 700; }
.l-stat-weapon { color: #22c55e; font-weight: 700; text-transform: uppercase; }
