:root {
    --bg-color: #0a0a0a;
    --card-bg: rgba(20, 20, 20, 0.8);
    --card-border: rgba(212, 175, 55, 0.2);
    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa;
    --accent-color: #d4af37;
    --accent-glow: rgba(212, 175, 55, 0.4);
    --success-color: #10b981;
    --silver-color: #c0c0c0;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-top: 5px; /* space for progress bar */
}

.refresh-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-glow);
    width: 0%;
    z-index: 1000;
    transition: width 1s linear;
}

/* Background animated blobs for premium feel */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    background: var(--accent-color);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    max-width: 700px;
    max-height: 700px;
    background: var(--silver-color);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 2rem;
}

.logo-title-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.header-logo:hover {
    filter: drop-shadow(0 0 15px var(--accent-color)) brightness(1.2);
    transform: scale(1.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-nav {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.3rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--text-primary);
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.2rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

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

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.server-metrics {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.has-tooltip {
    position: relative;
    cursor: help;
}

.tooltip-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 200;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.tooltip-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.has-tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.25rem;
}

.tooltip-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.metric-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

.hidden {
    display: none !important;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.chart-container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    height: 300px;
    width: 100%;
    position: relative;
}

.staff-glow {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3) !important;
}

.player-card {
    cursor: pointer;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.player-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.player-card.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.card-checkbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 22px;
    height: 22px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.card-checkbox:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.card-checkbox:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.card-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: #000;
    font-size: 14px;
    font-weight: 800;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px -5px var(--accent-glow);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--silver-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.player-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.player-id {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 0.25rem;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 500;
    text-align: right;
    direction: ltr; /* Keeps discord tags ltr even if arabic in names */
}

.job-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, rgba(255,255,255,0.05) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 1rem;
}

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

/* New header elements */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.join-btn {
    background: linear-gradient(135deg, var(--accent-color), #b8860b);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-weight: 600;
    box-shadow: 0 4px 14px var(--accent-glow);
    transition: all 0.2s ease;
}

.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.search-container {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
    position: sticky;
    top: 1rem;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.search-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.sort-select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.9rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

.sort-select:focus {
    border-color: var(--accent-color);
}

.export-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.9rem 1.2rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Specific Job Badges */
.job-police { background: rgba(59, 130, 246, 0.15) !important; color: #60a5fa !important; }
.job-ems { background: rgba(239, 68, 68, 0.15) !important; color: #f87171 !important; }
.job-mechanic { background: rgba(249, 115, 22, 0.15) !important; color: #fb923c !important; }
.job-security { background: rgba(15, 118, 110, 0.15) !important; color: #2dd4bf !important; }
.job-admin { background: rgba(234, 179, 8, 0.15) !important; color: #facc15 !important; box-shadow: 0 0 10px rgba(234, 179, 8, 0.2) !important; }
.job-company { background: rgba(168, 85, 247, 0.15) !important; color: #c084fc !important; }
.job-unemployed { background: rgba(156, 163, 175, 0.15) !important; color: #9ca3af !important; }

/* Discord tag copy interaction */
.discord-tag-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.copy-icon {
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 0.9rem;
}

.discord-row:hover .copy-icon {
    opacity: 1;
}

.copy-icon:active {
    transform: scale(0.9);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0,0,0,0.8);
}

.modal-banner {
    height: 120px;
    background: linear-gradient(45deg, #111, var(--accent-color));
    background-size: cover;
    background-position: center;
}

.modal-header {
    padding: 0 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-top: -30px;
    margin-bottom: 1.5rem;
}

.modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    background: linear-gradient(135deg, var(--accent-color), var(--silver-color));
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
}

.modal-title {
    padding-bottom: 0.5rem;
}

.modal-title h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.modal-body {
    padding: 0 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-body .detail-row {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.05);
}

/* =============================================
   Server Info Banner
   ============================================= */
.server-info-banner {
    position: relative;
    margin-top: 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.server-banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    z-index: 0;
    filter: blur(2px);
    transition: opacity 0.5s ease;
}

.server-info-banner:hover .server-banner-bg {
    opacity: 0.35;
}

.server-info-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    gap: 1.5rem;
    flex-wrap: wrap;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.server-info-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1;
}

.server-owner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.server-owner-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 18px var(--accent-glow);
}

.server-info-text {
    min-width: 0;
}

.server-name {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-color), #f0e68c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}

.server-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.server-tag {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.06);
    letter-spacing: 0.02em;
}

.server-info-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.server-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.server-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.server-stat-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.server-stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
}

.server-owner-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.server-owner-link:hover {
    color: #f0e68c;
    text-shadow: 0 0 8px var(--accent-glow);
}

/* =============================================
   Ping Badges & Player Meta
   ============================================= */
.player-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.ping-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    letter-spacing: 0.02em;
}

.ping-good {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399 !important;
}

.ping-ok {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15 !important;
}

.ping-warn {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c !important;
}

.ping-bad {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171 !important;
}

.ping-unknown {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280 !important;
}

/* Ping value in modal */
.ping-value {
    font-weight: 600;
    font-size: 0.9rem;
}

/* =============================================
   Server Status Bar
   ============================================= */
.server-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 0.65rem 1.25rem;
    margin-top: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-bar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.status-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: dot-pulse 2s infinite;
}

.status-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.8); }
}

.status-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #10b981;
}

.status-dot.offline + .status-label {
    color: #ef4444;
}

.status-divider {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
}

.status-hostname {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.status-chip {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.25rem 0.6rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chip-label {
    font-size: 0.75rem;
}

.chip-value {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* =============================================
   Ping Stats
   ============================================= */
.ping-stats {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 0.25rem;
}

.ping-stat {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.ping-stat strong {
    font-weight: 600;
    color: var(--text-primary);
}

.ping-stat.best strong {
    color: #10b981;
}

.ping-stat.worst strong {
    color: #ef4444;
}

/* =============================================
   Refresh Controls
   ============================================= */
.refresh-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.countdown {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 30px;
    text-align: center;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    line-height: 1;
}

.refresh-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: rotate(90deg);
}

.refresh-btn.spinning {
    animation: spin 0.8s linear infinite;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

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


/* =============================================
   Responsive
   ============================================= */
@media (max-width: 600px) {
    .header-content {
        justify-content: center;
        text-align: center;
    }
    .header-actions {
        justify-content: center;
        width: 100%;
    }
    .server-info-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .server-info-right {
        width: 100%;
        justify-content: space-around;
    }
    .server-name {
        font-size: 1rem;
    }
}

/* =============================================
   Advanced Analytics Upgrades
   ============================================= */
.trend-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.dashboard-widget.full-width {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 15px -3px var(--accent-glow);
}

.stat-card-icon {
    font-size: 1.8rem;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 0.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.15);
    flex-shrink: 0;
}

.stat-card-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.15rem 0;
    line-height: 1.2;
}

.stat-card-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Time Filters */
.time-filters {
    display: flex;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.2rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.time-filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.time-filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.time-filter-btn.active {
    background: var(--accent-color);
    color: #000000;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

@media (max-width: 768px) {
    .trend-stats-row {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
}

.player-code-tag {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-color);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    font-weight: 600;
    margin-left: 6px;
    font-size: 0.75rem;
    display: inline-block;
    vertical-align: middle;
}

.delegated-jobs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: flex-end;
    align-items: center;
    max-width: 70%;
}

.favorite-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    opacity: 0.25;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
    outline: none;
}

.favorite-btn.active {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.6));
}

.favorite-btn:hover {
    opacity: 0.8;
    transform: scale(1.15);
}

.modal-favorite-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.35;
    transition: all 0.2s ease;
    vertical-align: middle;
    outline: none;
}

.modal-favorite-btn.active {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.6));
    transform: scale(1.15);
}

.favorited-glow {
    border-color: rgba(212, 175, 55, 0.45) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15) !important;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(212, 175, 55, 0.04) 100%) !important;
}

.fade-out {
    animation: fade-out 0.3s ease forwards;
    pointer-events: none;
}

@keyframes fade-out {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }
}

.status-dot.restarting {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    animation: dot-pulse-restarting 2s infinite;
}

@keyframes dot-pulse-restarting {
    0%, 100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.8); }
}

.status-dot.restarting + .status-label {
    color: #f59e0b;
}

.pulse.restarting {
    background-color: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
    animation: pulse-animation-restarting 2s infinite;
}

@keyframes pulse-animation-restarting {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

