@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
    --blurple: #5865f2;
    --blurple-hover: #4752c4;
    --blurple-dim: rgba(88, 101, 242, 0.15);
    --bg-main: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-elevated: #171717;
    --bg-modifier-accent: #1e1e1e;
    --bg-modifier-hover: rgba(255, 255, 255, 0.04);
    --bg-modifier-selected: rgba(88, 101, 242, 0.2);
    --text-normal: #c8ccd0;
    --text-muted: #62676e;
    --text-dimmer: #4a4f56;
    --text-header: #f0f2f4;
    --danger: #ed4245;
    --danger-dim: rgba(237, 66, 69, 0.12);
    --success: #23a559;
    --gold: #f0b429;
    --silver: #a8b3c0;
    --bronze: #cd7f32;
    --border-subtle: rgba(255, 255, 255, 0.055);
    --border-medium: rgba(255, 255, 255, 0.09);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.8);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font-ui: 'Inter', 'gg sans', -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-main);
    font-family: var(--font-ui);
    color: var(--text-normal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* ─── HEADER ─── */
.header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 20px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-header);
    letter-spacing: -0.01em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── HEADER LOGO (used by pages with live stats strip) ─── */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-header);
}

/* ─── LIVE STATS STRIP (hitters / victims in header) ─── */
.live-stats-strip {
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 1px solid var(--border-subtle);
    padding-left: 15px;
    height: 18px;
}

.live-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.live-stat span {
    color: var(--text-normal);
    font-size: 13px;
}

/* ─── DOT ONLINE ─── */
.dot-online {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(35, 165, 89, 0.5);
    flex-shrink: 0;
}

/* ─── LAYOUT ─── */
.main {
    flex: 1;
    padding: 36px 24px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.dashboard-container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ─── PANEL (login page) ─── */
.panel {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-header);
    letter-spacing: -0.03em;
}

.panel-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ─── BUTTONS ─── */
button,
.btn,
.action-btn {
    background: var(--blurple);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.2, 0, 0.2, 1);
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

button:hover,
.btn:hover,
.action-btn:hover {
    background: var(--blurple-hover);
    transform: translateY(-1px);
}

button:active,
.btn:active,
.action-btn:active {
    transform: translateY(0) scale(0.98);
}

.btn.secondary {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-normal);
}

.btn.secondary:hover {
    background: var(--bg-modifier-accent);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-header);
}

/* ─── MAIN TABS (used in dashboard and leaderboard) ─── */
.m-tab {
    position: relative;
    overflow: hidden;
}

.m-tab.active {
    background: rgba(88, 101, 242, 0.15) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.m-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-header) !important;
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(237, 66, 69, 0.35);
    color: var(--danger);
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: var(--radius-sm);
}

.logout-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
    transform: translateY(-1px);
}

/* ─── STATUS PANEL (dashboard) ─── */
.status-panel {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.profile-banner {
    height: 90px;
    background: linear-gradient(135deg, #1a1b4b 0%, #2d1b69 40%, #1a0933 70%, #0d0a1a 100%);
    position: relative;
    overflow: hidden;
}

.profile-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(88, 101, 242, 0.25) 0%, transparent 65%),
        radial-gradient(ellipse at 80% 20%, rgba(180, 100, 255, 0.15) 0%, transparent 55%);
}

.profile-content {
    padding: 0 20px 20px;
}

.profile-header {
    display: flex;
    align-items: flex-end;
    margin-top: -42px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 5px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-header);
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    padding-top: 48px;
    min-width: 0;
}

.username-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.username {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-header);
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-tag {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.user-tag+.user-tag {
    margin-top: 3px;
}

#tokenText {
    cursor: copy;
    font-family: 'Menlo', 'Consolas', monospace;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--blurple);
    letter-spacing: 0.02em;
    transition: color 0.15s;
}

#tokenText:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* ─── RESET ICON BUTTON ─── */
.reset-icon-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-dimmer);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0.2, 1);
    padding: 0;
    flex-shrink: 0;
}

.reset-icon-btn svg {
    width: 13px;
    height: 13px;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reset-icon-btn:hover {
    background: var(--danger-dim);
    border-color: rgba(237, 66, 69, 0.4);
    color: var(--danger);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(237, 66, 69, 0.2);
}

.reset-icon-btn:hover svg {
    transform: rotate(180deg);
}

.reset-icon-btn:active {
    transform: scale(0.92);
}

/* ─── STATS ROW ─── */
.stats-row {
    display: flex;
    gap: 1px;
    background: var(--border-subtle);
    border-top: 1px solid var(--border-subtle);
    overflow: hidden;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.stat-cell {
    flex: 1;
    padding: 14px 12px;
    background: var(--bg-secondary);
    text-align: center;
}

.stat-cell+.stat-cell {
    border-left: 1px solid var(--border-subtle);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-header);
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);

    letter-spacing: 0.08em;
    margin-top: 5px;
}

/* ─── SEARCH BAR ─── */
.search-bar-wrap {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar-wrap input {
    width: 100%;
    height: 34px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0 12px 0 34px;
    color: var(--text-normal);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.search-bar-wrap input:focus {
    border-color: var(--blurple);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ─── CLIENT CARDS ─── */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
    width: 100%;
}

.client-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s cubic-bezier(0.2, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(14px);
}

.client-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.client-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.client-card-header {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.client-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.client-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-card-body {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.client-section-title {
    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.1em;
    color: var(--text-dimmer);
    margin-bottom: 10px;
}

.data-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.data-item {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
}

.data-label {
    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.06em;
    color: var(--text-dimmer);
    margin-bottom: 2px;
}

.data-value {
    font-size: 13px;
    color: var(--text-normal);
    font-weight: 500;
    word-break: break-all;
}

.card-action-btn {
    margin-top: 12px;
    width: 100%;
    height: 34px;
    font-size: 12.5px;
    border-radius: var(--radius-sm);
}

.no-clients-message {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    width: 100%;
}

.clients-grid:has(.no-clients-message) {
    display: block;
}

/* ─── SEND ALL BUTTON ─── */
.send-all-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-normal);
}

.send-all-btn:hover {
    background: var(--bg-modifier-accent);
    color: var(--text-header);
}

/* ─── TOASTS ─── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    background: var(--bg-elevated);
    color: var(--text-header);
    padding: 13px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--blurple);
    font-size: 13.5px;
    font-weight: 500;
    animation: toast_slide_in 0.3s cubic-bezier(0.2, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    min-width: 220px;
    max-width: 360px;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.fade-out {
    animation: toast_slide_out 0.3s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

@keyframes toast_slide_in {
    from {
        transform: translateX(110%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast_slide_out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(110%);
        opacity: 0;
    }
}

/* ─── MODAL ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: modal_fade_in 0.18s ease;
}

@keyframes modal_fade_in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    animation: modal_slide_in 0.22s cubic-bezier(0.2, 0, 0.2, 1);
}

@keyframes modal_slide_in {
    from {
        transform: translateY(16px) scale(0.96);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-header);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

#modal_message {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.modal-content textarea {
    width: 100%;
    height: 110px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-normal);
    padding: 12px 14px;
    font-family: var(--font-ui);
    font-size: 13.5px;
    resize: none;
    margin-bottom: 18px;
    transition: border-color 0.15s;
    outline: none;
}

.modal-content textarea:focus {
    border-color: var(--blurple);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    width: auto;
    height: 36px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.modal-btn.cancel {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-muted);
}

.modal-btn.cancel:hover {
    background: var(--bg-elevated);
    color: var(--text-header);
    transform: none;
}

.modal-btn.confirm {
    background: var(--blurple);
}

/* ─── STATUS BOX / BADGE ─── */
.status-box {
    border-left: 2px solid transparent;
    padding: 5px 8px;
    border-radius: 4px;
}

.status-box.online {
    border-left-color: var(--success);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 99px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;

}

.badge.online {
    background: rgba(35, 165, 89, 0.18);
    color: #3bba6e;
}

.status-value {
    font-size: 12px;
}

/* ─── DIVIDER ─── */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 16px 0;
}

/* ─── LEADERBOARD ─── */
.lb-controls {
    display: flex;
    gap: 12px;
    margin: 16px 0 0;
    flex-wrap: wrap;
    align-items: center;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    flex: 1;
    min-width: 160px;
}

.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-normal);
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    user-select: none;
}

.dropdown-trigger:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--bg-elevated);
    color: var(--text-header);
}

.dropdown-trigger svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.22s ease;
    flex-shrink: 0;
}

.custom-dropdown.open .dropdown-trigger {
    border-color: var(--blurple);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.custom-dropdown.open .dropdown-trigger svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 5px;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: dropdown_fade 0.18s cubic-bezier(0.2, 0, 0.2, 1) forwards;
    max-height: 280px;
    overflow-y: auto;
}

.custom-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.13s ease;
}

.dropdown-item:hover {
    background: var(--bg-elevated);
    color: var(--text-normal);
}

.dropdown-item.active {
    background: var(--blurple-dim);
    color: #818cf8;
}

@keyframes dropdown_fade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Period Tabs */
.period-tabs {
    display: flex;
    background: var(--bg-tertiary);
    padding: 3px;
    border-radius: var(--radius-md);
    gap: 2px;
    border: 1px solid var(--border-subtle);
}

.tab-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s;
    letter-spacing: 0.02em;
    height: auto;
}

.tab-btn:hover {
    color: var(--text-normal);
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.tab-btn.active {
    background: var(--blurple);
    color: #fff;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.35);
}

/* LB rows */
.lb-list,
#leaderboard-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lb-header {
    display: flex;
    align-items: center;
    padding: 0 16px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;

    color: var(--text-dimmer);
}

.lb-row {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.18s ease;
    animation: lb_row_fade 0.4s ease both;
    opacity: 0;
    margin-bottom: 10px;
}

@keyframes lb_row_fade {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lb-row:hover {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    transform: scale(1.008);
}

.highlight-me {
    background: var(--bg-elevated) !important;
    border-color: rgba(88, 101, 242, 0.4) !important;
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.2);
}

.col-rank {
    width: 56px;
    display: flex;
    justify-content: center;
}

.col-player {
    flex: 1;
    min-width: 0;
}

.col-percentage {
    width: 78px;
    text-align: right;
    font-size: 12px;
    color: var(--text-dimmer);
    font-weight: 500;
}

.col-score {
    width: 88px;
    text-align: right;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--text-header);
    font-size: 16px;
    letter-spacing: -0.02em;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12px;
}

.rank-1 .rank-badge {
    background: linear-gradient(135deg, #ffd700, #f0a500);
    color: #000;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, #c8d6e0, #9bb4c4);
    color: #000;
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32, #a0622a);
    color: #fff;
}

.rank-normal .rank-badge {
    background: var(--bg-elevated);
    color: var(--text-dimmer);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 11px;
}

.small-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.player-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-header);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── SPINNER ─── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--border-subtle);
    border-top-color: var(--blurple);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0 auto;
}

/* ─── INPUT ─── */
input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-normal);
    font-family: var(--font-ui);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

input:focus {
    border-color: var(--blurple);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

/* ─── FADE IN ─── */
.fade-in {
    animation: fade_in 0.3s ease;
}

@keyframes fade_in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .main {
        padding: 20px 14px;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -30px;
        gap: 10px;
    }

    .username-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .user-info {
        padding-top: 0;
        width: 100%;
    }

    .avatar {
        margin-right: 0;
    }

    .send-all-btn {
        width: 100%;
    }

    .lb-controls {
        flex-direction: column;
    }

    .custom-dropdown {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        height: 48px;
        padding: 0 12px;
    }

    .header-logo h1 {
        font-size: 13px;
    }

    .live-stats-strip {
        gap: 8px;
        padding-left: 10px;
    }

    .live-stat {
        font-size: 0;
        /* Hides the label text "hitters" / "victims" */
    }

    .live-stat span {
        font-size: 12px;
        margin-left: 2px;
    }

    .dot-online {
        width: 6px;
        height: 6px;
    }

    .header-actions {
        gap: 4px;
    }

    .logout-btn {
        height: 28px;
        padding: 0 8px;
        font-size: 11.5px;
    }

    .btn.secondary {
        height: 28px;
        padding: 0 10px !important;
        font-size: 11.5px !important;
    }

    .btn.secondary svg {
        display: none;
    }

    .panel {
        padding: 28px 20px;
        border-radius: var(--radius-lg);
    }

    .status-panel {
        border-radius: var(--radius-lg);
    }

    .header h1 {
        font-size: 14px;
    }

    .logout-btn {
        padding: 0 9px;
        font-size: 12px;
    }

    .username {
        font-size: 17px;
    }

    .profile-banner {
        height: 60px !important;
    }

    .avatar {
        width: 70px;
        height: 70px;
        margin-top: -35px;
    }
}