/* ============================================
   DrainHNS - Complete Stylesheet
   ============================================ */

/* === CSS Variables === */
:root {
    /* Dark Theme (default) */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #1e2130;
    --bg-card-hover: #252840;
    --bg-input: #252840;
    --bg-sidebar: #141620;
    --bg-topbar: rgba(15, 17, 23, 0.85);
    
    --text-primary: #e4e6f0;
    --text-secondary: #8b8fa3;
    --text-muted: #5c6078;
    --text-accent: #818cf8;
    
    --border-color: #2a2d3e;
    --border-subtle: #1f2233;
    
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-bg: rgba(99, 102, 241, 0.1);
    
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.1);
    
    --gold: #f59e0b;
    --silver: #94a3b8;
    --bronze: #d97706;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f1f5;
    --bg-input: #f0f1f5;
    --bg-sidebar: #ffffff;
    --bg-topbar: rgba(245, 246, 250, 0.9);
    
    --text-primary: #1a1d2e;
    --text-secondary: #6b7089;
    --text-muted: #9ca0b5;
    --text-accent: #6366f1;
    
    --border-color: #e2e4ec;
    --border-subtle: #ecedf3;
    
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-bg: rgba(99, 102, 241, 0.08);
    --success-bg: rgba(52, 211, 153, 0.08);
    --danger-bg: rgba(248, 113, 113, 0.08);
    --warning-bg: rgba(251, 191, 36, 0.08);
    --info-bg: rgba(96, 165, 250, 0.08);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.1);
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition), background var(--transition);
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.logo-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.93rem;
    transition: all var(--transition);
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--accent-bg);
}

.nav-item.active {
    color: var(--accent);
    background: var(--accent-bg);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
    animation: pulse-dot 2s infinite;
}

.status-dot.offline {
    background: var(--danger);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.mobile-toggle svg {
    width: 20px;
    height: 20px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

/* === Main Content === */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

/* === Topbar === */
.topbar {
    height: var(--topbar-height);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-topbar);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    text-decoration: none;
}

.topbar-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--accent-bg);
}

.topbar-btn svg {
    width: 18px;
    height: 18px;
}

/* Discord */
.discord-btn:hover {
    color: #5865f2;
    border-color: #5865f2;
    background: rgba(88, 101, 242, 0.1);
}

/* Lang toggle */
.lang-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Theme toggle */
.theme-toggle .sun-icon {
    display: none;
}
[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}
[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* Search */
.search-box {
    position: relative;
    width: 220px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 34px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 200;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.search-result-item:hover {
    background: var(--bg-card-hover);
}

.search-result-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.search-result-item .search-name {
    font-weight: 500;
    font-size: 0.88rem;
}

.search-result-item .search-steamid {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* === Content Area === */
.content-area {
    padding: 24px 28px;
    flex: 1;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.card-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* === Monitoring === */
.monitoring-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

/* Server Info */
.server-details {
    padding: 16px 22px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid var(--border-subtle);
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.ip-connect {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--accent);
    transition: color var(--transition);
}

.ip-connect:hover {
    color: var(--accent-hover);
}

.copy-icon {
    width: 14px;
    height: 14px;
}

.server-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--success-bg);
    color: var(--success);
}

.server-status-badge.offline {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-dot-lg {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.server-status-badge.offline .status-dot-lg {
    background: var(--danger);
}

.connect-section {
    padding: 14px 22px 18px;
}

.btn-connect {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 2px 10px var(--accent-glow);
}

.btn-connect:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-connect svg {
    width: 16px;
    height: 16px;
}

/* Players List */
.players-online-card {
    max-height: calc(100vh - var(--topbar-height) - 80px);
    display: flex;
    flex-direction: column;
}

.players-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    transition: background var(--transition);
}

.player-row:hover {
    background: var(--bg-card-hover);
}

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-input);
}

.player-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-name:hover {
    color: var(--accent);
}

a.player-name-link {
    cursor: pointer;
}

.player-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.player-duration {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.player-count-badge {
    background: var(--accent);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    min-width: 28px;
    text-align: center;
}

/* Loading */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: var(--text-muted);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-placeholder {
    display: inline-block;
    width: 80px;
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-color) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-cell {
    text-align: center;
    padding: 40px !important;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    gap: 8px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--border-color);
    margin-bottom: 8px;
}

.empty-state .empty-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* === Tops === */
.tops-switcher {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4px;
}

.tops-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.tops-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.tops-tab.active {
    color: white;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    box-shadow: 0 2px 10px var(--accent-glow);
}

.tops-tab svg {
    width: 18px;
    height: 18px;
}

.top-content {
    display: none;
}

.top-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Jump type selector */
.jump-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border-color);
}

.jt-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all var(--transition);
}

.jt-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--accent-bg);
}

.jt-btn.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

/* === Data Table === */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.data-table td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Table rank column */
.rank-cell {
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
}

.rank-1 { color: var(--gold); }
.rank-2 { color: var(--silver); }
.rank-3 { color: var(--bronze); }

/* Table player cell */
.table-player {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-input);
}

.table-player-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition);
}

.table-player-name:hover {
    color: var(--accent);
}

/* Stat values */
.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.85rem;
}

.stat-distance {
    color: var(--accent);
    font-weight: 700;
}

.stat-mmr {
    font-weight: 800;
    font-size: 0.95rem;
}

.mmr-high { color: var(--success); }
.mmr-mid { color: var(--warning); }
.mmr-low { color: var(--danger); }

.stat-positive { color: var(--success); }
.stat-negative { color: var(--danger); }

/* Winrate bar */
.winrate-bar {
    width: 50px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
}

.winrate-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.page-btn {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.page-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* === Players Grid === */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    padding: 16px 20px;
}

.player-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.player-card:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.player-card .pc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-input);
}

.player-card .pc-info {
    flex: 1;
    min-width: 0;
}

.player-card .pc-name {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-card .pc-steam {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* === Profile Page === */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    flex-shrink: 0;
    background: var(--bg-input);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.profile-steam {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 8px;
}

.profile-links {
    display: flex;
    gap: 8px;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.profile-link:hover {
    background: var(--accent);
    color: white;
}

.profile-link svg {
    width: 14px;
    height: 14px;
}

/* Profile Stats Grid */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-card-value {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

.stat-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

/* Back button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 16px;
    font-family: inherit;
}

.btn-back:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.btn-back svg {
    width: 16px;
    height: 16px;
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .monitoring-grid {
        grid-template-columns: 1fr;
    }
    
    .players-online-card {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.visible {
        display: block;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        padding: 0 16px 0 64px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .search-box {
        width: 160px;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .players-grid {
        grid-template-columns: 1fr;
    }
    
    .tops-switcher {
        flex-direction: column;
    }
    
    .jump-type-selector {
        padding: 10px 14px;
    }
    
    .jt-btn {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
}

/* ============================================
   DrainHNS - Complete Stylesheet v2
   ============================================ */

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #1e2130;
    --bg-card-hover: #252840;
    --bg-input: #252840;
    --bg-sidebar: #141620;
    --bg-topbar: rgba(15, 17, 23, 0.85);
    
    --text-primary: #e4e6f0;
    --text-secondary: #8b8fa3;
    --text-muted: #5c6078;
    --text-accent: #818cf8;
    
    --border-color: #2a2d3e;
    --border-subtle: #1f2233;
    
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-bg: rgba(99, 102, 241, 0.1);
    
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.1);
    
    --gold: #f59e0b;
    --silver: #94a3b8;
    --bronze: #d97706;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    --sidebar-width: 240px;
    --topbar-height: 56px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f1f5;
    --bg-input: #f0f1f5;
    --bg-sidebar: #ffffff;
    --bg-topbar: rgba(245, 246, 250, 0.9);
    
    --text-primary: #1a1d2e;
    --text-secondary: #6b7089;
    --text-muted: #9ca0b5;
    --text-accent: #6366f1;
    
    --border-color: #e2e4ec;
    --border-subtle: #ecedf3;
    
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-bg: rgba(99, 102, 241, 0.08);
    --success-bg: rgba(52, 211, 153, 0.08);
    --danger-bg: rgba(248, 113, 113, 0.08);
    --warning-bg: rgba(251, 191, 36, 0.08);
    --info-bg: rgba(96, 165, 250, 0.08);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transition: transform var(--transition), background var(--transition);
}

.sidebar-header { padding: 16px 16px 14px; border-bottom: 1px solid var(--border-color); }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 34px; height: 34px; flex-shrink: 0; }

.logo-text { display: flex; flex-direction: column; }
.logo-title {
    font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-subtitle { font-size: 0.68rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-md);
    color: var(--text-secondary); text-decoration: none;
    font-weight: 500; font-size: 0.88rem;
    transition: all var(--transition); position: relative;
}
.nav-item:hover { color: var(--text-primary); background: var(--accent-bg); }
.nav-item.active { color: var(--accent); background: var(--accent-bg); }
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer { padding: 12px 14px; border-top: 1px solid var(--border-color); }
.server-status { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.status-dot.online { background: var(--success); box-shadow: 0 0 8px rgba(52,211,153,0.5); animation: pulse-dot 2s infinite; }
.status-dot.offline { background: var(--danger); }
@keyframes pulse-dot { 0%,100%{opacity:1}50%{opacity:0.5} }

.mobile-toggle {
    display: none; position: fixed; top: 12px; left: 12px; z-index: 200;
    width: 40px; height: 40px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-primary); cursor: pointer;
    align-items: center; justify-content: center; box-shadow: var(--shadow-md);
}
.mobile-toggle svg { width: 18px; height: 18px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90; }

/* === Main === */
.main-content {
    margin-left: var(--sidebar-width); flex: 1; min-height: 100vh;
    display: flex; flex-direction: column; transition: margin-left var(--transition);
}

/* === Topbar === */
.topbar {
    height: var(--topbar-height); padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-topbar); backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 50;
}
.page-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.topbar-right { display: flex; align-items: center; gap: 6px; }

.topbar-btn {
    width: 36px; height: 36px; border-radius: var(--radius-md);
    border: 1px solid var(--border-color); background: var(--bg-card);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); text-decoration: none;
}
.topbar-btn:hover { color: var(--text-primary); border-color: var(--accent); background: var(--accent-bg); }
.topbar-btn svg { width: 16px; height: 16px; }

.discord-btn:hover { color: #5865f2; border-color: #5865f2; background: rgba(88,101,242,0.1); }

.lang-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; }

.theme-toggle .sun-icon { display: none; }
[data-theme="light"] .theme-toggle .sun-icon { display: block; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }

/* Search */
.search-box { position: relative; width: 200px; }
.search-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-muted); pointer-events: none; }
.search-input {
    width: 100%; height: 36px; padding: 0 10px 0 30px;
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
    background: var(--bg-input); color: var(--text-primary);
    font-size: 0.82rem; font-family: inherit; outline: none; transition: all var(--transition);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-input::placeholder { color: var(--text-muted); }

.search-results {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    max-height: 280px; overflow-y: auto; display: none; z-index: 200;
}
.search-results.visible { display: block; }
.search-result-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    cursor: pointer; transition: background var(--transition);
    text-decoration: none; color: var(--text-primary);
}
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-item img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.search-result-item .search-name { font-weight: 500; font-size: 0.85rem; }
.search-result-item .search-steamid { font-size: 0.7rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* === Content === */
.content-area { padding: 20px 24px; flex: 1; }
.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)} }

/* === Cards === */
.card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--border-color);
}
.card-header-left { display: flex; align-items: center; gap: 8px; }
.card-icon { width: 20px; height: 20px; color: var(--accent); }
.card-header h2 { font-size: 0.95rem; font-weight: 700; }

/* === Monitoring === */
.monitoring-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }

.server-details { padding: 12px 18px; }
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; }
.detail-row:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }
.detail-label { font-size: 0.82rem; color: var(--text-secondary); font-weight: 500; }
.detail-value { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }

.ip-connect { display: flex; align-items: center; gap: 5px; cursor: pointer; color: var(--accent); transition: color var(--transition); }
.ip-connect:hover { color: var(--accent-hover); }
.copy-icon { width: 13px; height: 13px; }

.server-status-badge {
    display: flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 16px;
    font-size: 0.75rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
    background: var(--success-bg); color: var(--success);
}
.server-status-badge.offline { background: var(--danger-bg); color: var(--danger); }
.status-dot-lg { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.server-status-badge.offline .status-dot-lg { background: var(--danger); }

.connect-section { padding: 12px 18px 16px; }
.btn-connect {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 11px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white; font-weight: 600; font-size: 0.88rem;
    text-decoration: none; transition: all var(--transition);
    box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-connect:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-connect svg { width: 15px; height: 15px; }

/* Players List */
.players-online-card { max-height: calc(100vh - var(--topbar-height) - 72px); display: flex; flex-direction: column; }
.players-list { flex: 1; overflow-y: auto; padding: 6px; }

.player-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-md); transition: background var(--transition); }
.player-row:hover { background: var(--bg-card-hover); }

.player-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); flex-shrink: 0; background: var(--bg-input); }
.player-avatar-placeholder {
    width: 34px; height: 34px; border-radius: 50%; background: var(--bg-input);
    border: 2px solid var(--border-color); display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-weight: 700; font-size: 0.82rem; flex-shrink: 0;
}

.player-info { flex: 1; min-width: 0; }
.player-name {
    font-weight: 600; font-size: 0.88rem; color: var(--text-primary);
    text-decoration: none; transition: color var(--transition);
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player-name:hover { color: var(--accent); }
a.player-name-link { cursor: pointer; }
.player-meta { font-size: 0.72rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.player-duration { font-size: 0.75rem; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; white-space: nowrap; }

.player-count-badge {
    background: var(--accent); color: white;
    font-size: 0.75rem; font-weight: 700;
    padding: 2px 9px; border-radius: 10px; min-width: 26px; text-align: center;
}

/* Loading */
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px; gap: 10px; color: var(--text-muted); }
.spinner { width: 24px; height: 24px; border: 3px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }

.loading-placeholder {
    display: inline-block; width: 70px; height: 12px; border-radius: 3px;
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-color) 50%, var(--bg-input) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0%{background-position:200% 0}100%{background-position:-200% 0} }
.loading-cell { text-align: center; padding: 36px !important; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 20px; color: var(--text-muted); gap: 6px; }
.empty-state svg { width: 40px; height: 40px; color: var(--border-color); margin-bottom: 6px; }
.empty-state .empty-title { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); }

/* === Tops Layout (compact) === */
.tops-layout { display: flex; flex-direction: column; gap: 0; }

.tops-nav {
    display: inline-flex; gap: 2px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 3px;
    margin-bottom: 16px; align-self: flex-start;
}

.tops-nav-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 18px; border: none; border-radius: 7px;
    background: transparent; color: var(--text-secondary);
    font-weight: 600; font-size: 0.82rem; cursor: pointer;
    transition: all var(--transition); font-family: inherit;
    white-space: nowrap;
}
.tops-nav-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.tops-nav-btn.active {
    color: white; background: var(--accent);
    box-shadow: 0 1px 6px var(--accent-glow);
}
.tops-nav-btn svg { width: 14px; height: 14px; }

.top-panel { display: none; }
.top-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* Jump type pills */
.js-top-header { padding: 10px 16px; border-bottom: 1px solid var(--border-color); }

.jump-type-pills {
    display: flex; flex-wrap: wrap; gap: 4px;
}

.jt-btn {
    padding: 4px 10px; border: 1px solid var(--border-color);
    border-radius: 5px; background: var(--bg-input);
    color: var(--text-secondary); font-size: 0.72rem; font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer; transition: all var(--transition);
    line-height: 1.4;
}
.jt-btn:hover { color: var(--text-primary); border-color: var(--accent); background: var(--accent-bg); }
.jt-btn.active { color: white; background: var(--accent); border-color: var(--accent); }

/* === Data Table === */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 10px 14px; text-align: left;
    font-size: 0.7rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border-color);
    white-space: nowrap; position: sticky; top: 0;
}
.data-table td {
    padding: 10px 14px; font-size: 0.84rem;
    border-bottom: 1px solid var(--border-subtle); white-space: nowrap;
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--bg-card-hover); }

.rank-cell { font-weight: 800; font-family: 'JetBrains Mono', monospace; font-size: 0.84rem; }
.rank-1 { color: var(--gold); }
.rank-2 { color: var(--silver); }
.rank-3 { color: var(--bronze); }

.table-player { display: flex; align-items: center; gap: 8px; min-width: 160px; }
.table-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); flex-shrink: 0; background: var(--bg-input); }
.table-player-name { font-weight: 600; color: var(--text-primary); text-decoration: none; cursor: pointer; transition: color var(--transition); font-size: 0.84rem; }
.table-player-name:hover { color: var(--accent); }

.stat-value { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 0.82rem; }
.stat-distance { color: var(--accent); font-weight: 700; }
.stat-mmr { font-weight: 800; font-size: 0.9rem; }
.mmr-high { color: var(--success); }
.mmr-mid { color: var(--warning); }
.mmr-low { color: var(--danger); }
.stat-positive { color: var(--success); }
.stat-negative { color: var(--danger); }

.winrate-bar { width: 44px; height: 3px; background: var(--border-color); border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 5px; }
.winrate-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }

/* === Pagination === */
.pagination { display: flex; align-items: center; justify-content: center; gap: 3px; padding: 12px 16px; border-top: 1px solid var(--border-color); }
.page-btn {
    min-width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color); border-radius: 5px;
    background: var(--bg-input); color: var(--text-secondary);
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: all var(--transition); font-family: inherit;
}
.page-btn:hover { color: var(--text-primary); border-color: var(--accent); }
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* === Players Grid === */
.players-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 14px 18px; }
.player-card {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle); background: var(--bg-secondary);
    cursor: pointer; transition: all var(--transition);
    text-decoration: none; color: var(--text-primary);
}
.player-card:hover { border-color: var(--accent); background: var(--accent-bg); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.player-card .pc-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); flex-shrink: 0; background: var(--bg-input); }
.player-card .pc-info { flex: 1; min-width: 0; }
.player-card .pc-name { font-weight: 600; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-card .pc-steam { font-size: 0.7rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* === Back button === */
.btn-back {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-secondary); font-weight: 600; font-size: 0.82rem;
    cursor: pointer; transition: all var(--transition); font-family: inherit;
    text-decoration: none;
}
.btn-back:hover { color: var(--text-primary); border-color: var(--accent); }
.btn-back svg { width: 14px; height: 14px; }

/* === Toast === */
.toast {
    position: fixed; bottom: 20px; right: 20px;
    padding: 10px 18px; background: var(--bg-card);
    border: 1px solid var(--accent); border-radius: var(--radius-md);
    color: var(--text-primary); font-size: 0.85rem; font-weight: 500;
    box-shadow: var(--shadow-lg); transform: translateY(80px); opacity: 0;
    transition: all 0.3s ease; z-index: 1000;
}
.toast.visible { transform: translateY(0); opacity: 1; }

/* === Responsive === */
@media (max-width: 1024px) {
    .monitoring-grid { grid-template-columns: 1fr; }
    .players-online-card { max-height: 500px; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.visible { display: block; }
    .mobile-toggle { display: flex; }
    .main-content { margin-left: 0; }
    .topbar { padding: 0 14px 0 56px; }
    .content-area { padding: 14px; }
    .search-box { width: 140px; }
    .players-grid { grid-template-columns: 1fr; }
    .tops-nav { align-self: stretch; }
    .tops-nav-btn { flex: 1; justify-content: center; }
}

/* ===== Steam Auth Styles ===== */
.steam-auth-btn {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

.steam-auth-btn svg {
    width: 20px;
    height: 20px;
    color: #66c0f4;
}

.steam-auth-btn:hover {
    color: #66c0f4 !important;
    border-color: #66c0f4 !important;
    background: rgba(102, 192, 244, 0.1) !important;
}

.steam-user-dropdown {
    position: relative;
    display: inline-block;
}

.steam-user-btn {
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    cursor: pointer;
    transition: all var(--transition);
}

.steam-user-btn:hover {
    border-color: var(--accent) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.steam-avatar-mini {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    object-fit: cover;
    display: block;
}

.steam-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--transition), transform var(--transition);
}

.steam-dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.steam-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 15px;
    width: 10px;
    height: 10px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background var(--transition);
    white-space: nowrap;
}

.dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
}

.dropdown-item:hover svg {
    color: var(--accent);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

/* Mobile styles */
@media (max-width: 768px) {
    .steam-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 70px;
        right: 16px;
        left: 16px;
        min-width: auto;
    }
    
    .steam-dropdown-menu::before {
        top: auto;
        bottom: -5px;
        transform: rotate(225deg);
    }
}

/* ===== Profile Page Styles ===== */

/* Profile header */
.ph-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ph-avatar {
    width: 88px !important;
    height: 88px !important;
    max-width: 88px !important;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
    flex-shrink: 0;
    background: var(--bg-input);
}

.ph-info {
    flex: 1;
}

.ph-name {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.ph-steam {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 10px;
}

.ph-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ph-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.ph-link:hover {
    background: var(--accent);
    color: white;
}

.ph-link svg {
    width: 13px;
    height: 13px;
}

/* Profile tabs */
.profile-tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.scard {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.scard-val {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

.scard-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* Map images */
img[src*="/assets/maps/"] {
    width: 40px !important;
    height: 25px !important;
    max-width: 40px !important;
    object-fit: cover;
    border-radius: 4px;
}

/* Jumpstats filter */
.js-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.jsf-btn {
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all var(--transition);
}

.jsf-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.jsf-btn.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

/* Profile wrap */
.profile-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: 100vh;
}

.profile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

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

.ptr {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Not found message */
.nf-msg {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Fix for any oversized images */
img {
    max-width: 100%;
    height: auto;
}

/* Captain badge */
.captain-badge {
    font-size: 0.7rem;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Match list items (keep existing) */
.match-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.match-list-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.match-list-map {
    flex-shrink: 0;
    width: 100px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.match-list-info {
    flex: 2;
    min-width: 0;
}

.match-list-mapname {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.match-list-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.match-result-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 10px;
}

.match-result-badge.win {
    background: var(--success-bg);
    color: var(--success);
}

.match-result-badge.loss {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Steam Auth Styles (keep existing) */
.steam-auth-btn {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

.steam-auth-btn svg {
    width: 20px;
    height: 20px;
    color: #66c0f4;
}

.steam-auth-btn:hover {
    color: #66c0f4 !important;
    border-color: #66c0f4 !important;
    background: rgba(102, 192, 244, 0.1) !important;
}

.steam-user-dropdown {
    position: relative;
    display: inline-block;
}

.steam-user-btn {
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    cursor: pointer;
    transition: all var(--transition);
}

.steam-user-btn:hover {
    border-color: var(--accent) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.steam-avatar-mini {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    object-fit: cover;
    display: block;
}

.steam-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--transition), transform var(--transition);
}

.steam-dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.steam-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 15px;
    width: 10px;
    height: 10px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background var(--transition);
    white-space: nowrap;
}

.dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
}

.dropdown-item:hover svg {
    color: var(--accent);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}
