/* CSS Variables - Dark Theme with Gold Accents (Portál Nova style) */
:root {
    --bg-primary: #0c0c0c;
    --bg-secondary: #111111;
    --bg-card: rgba(18, 18, 18, 0.75);
    --bg-card-solid: #121212;
    --bg-card-hover: rgba(28, 28, 28, 0.85);
    --bg-elevated: rgba(35, 35, 35, 0.5);
    
    --accent-primary: #d4a528;
    --accent-secondary: #e8b92f;
    --accent-tertiary: #f5c842;
    --accent-glow: rgba(212, 165, 40, 0.25);
    
    --success: #22c55e;
    --success-glow: rgba(34, 197, 94, 0.2);
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(212, 165, 40, 0.3);
    
    --gradient-primary: linear-gradient(135deg, #d4a528 0%, #e8b92f 100%);
    --gradient-secondary: linear-gradient(135deg, #b8941f 0%, #d4a528 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(212, 165, 40, 0.15);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --transition-fast: all 0.15s ease;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background with image overlay */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1542751371-adc38448a05e?w=1920') center/cover no-repeat fixed;
    filter: brightness(0.3) saturate(0.8);
}

.bg-animation::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(12, 12, 12, 0.5) 0%, 
        rgba(12, 12, 12, 0.7) 30%,
        rgba(12, 12, 12, 0.9) 70%,
        rgba(12, 12, 12, 0.98) 100%
    );
}

.bg-gradient,
.bg-grid,
.bg-glow {
    display: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: rgba(12, 12, 12, 0.8);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 16px;
}

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

.logo-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    color: #000;
}

.logo-pulse {
    display: none;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo h1 span {
    color: var(--accent-primary);
}

.nav {
    display: flex;
    gap: 2px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 13px;
}

.nav-link svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

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

.nav-link:hover svg {
    opacity: 1;
}

.nav-link.active {
    color: #000;
    background: var(--accent-primary);
    font-weight: 600;
}

.nav-link.active svg {
    opacity: 1;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-dot.online::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--success);
    opacity: 0.3;
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.6); opacity: 0; }
}

.status-ping {
    color: var(--success);
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(34, 197, 94, 0.12);
    border-radius: 50px;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 0 40px;
    gap: 28px;
}

.hero-content {
    flex: 1;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent-primary);
    margin-bottom: 12px;
    padding: 6px 12px;
    background: rgba(212, 165, 40, 0.08);
    border-radius: 50px;
    border: 1px solid rgba(212, 165, 40, 0.2);
}

.hero-label::before {
    content: '📊';
    font-size: 12px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-title span {
    color: var(--accent-primary);
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 400px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 2px;
}

.hero-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-color);
}

/* Main Content */
.main {
    padding-bottom: 48px;
}

.section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.title-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    color: #000;
}

.title-icon svg {
    width: 18px;
    height: 18px;
}

.section-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(212, 165, 40, 0.08);
    border: 1px solid rgba(212, 165, 40, 0.15);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-secondary);
}

.section-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(16px);
}

.stat-card-bg {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: blur(35px);
    opacity: 0.15;
    transition: var(--transition);
}

.stat-card[data-color="blue"] .stat-card-bg { background: var(--info); }
.stat-card[data-color="green"] .stat-card-bg { background: var(--success); }
.stat-card[data-color="yellow"] .stat-card-bg { background: var(--accent-primary); }
.stat-card[data-color="purple"] .stat-card-bg { background: #a855f7; }

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
    background: var(--bg-card-hover);
}

.stat-card:hover .stat-card-bg {
    opacity: 0.25;
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-card[data-color="green"] .stat-icon { color: var(--success); }
.stat-card[data-color="yellow"] .stat-icon { color: var(--accent-primary); }
.stat-card[data-color="purple"] .stat-icon { color: #a855f7; }

.stat-content {
    position: relative;
    z-index: 1;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 600;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.stat-trend svg {
    width: 12px;
    height: 12px;
}

.stat-trend.up {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-trend.neutral {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-secondary);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
    transition: var(--transition);
    backdrop-filter: blur(16px);
}

.chart-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: var(--bg-card-hover);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-period {
    font-size: 11px;
    color: var(--text-muted);
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50px;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.search-box {
    flex: 1;
    min-width: 260px;
    position: relative;
}

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

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    transition: var(--transition);
    backdrop-filter: blur(16px);
}

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

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

/* Table */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(16px);
}

.table-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-card-solid);
    z-index: 10;
}

.table-loading.hidden {
    display: none;
}

.loader {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

.players-table th,
.players-table td {
    padding: 14px 18px;
    text-align: left;
}

.players-table th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.th-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.th-content svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.players-table th:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.sort-icon {
    opacity: 0.3;
    font-size: 10px;
}

.players-table th.sorted .sort-icon {
    opacity: 1;
    color: var(--accent-primary);
}

.players-table tbody tr {
    border-top: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.player-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-avatar-small {
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #000;
}

.player-name-text {
    font-weight: 500;
    font-size: 14px;
}

.player-identifier {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-body);
    transition: var(--transition);
}

.pagination-btn svg {
    width: 14px;
    height: 14px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Events */
.events-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.events-list {
    max-height: 380px;
    overflow-y: auto;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.event-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.event-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    font-size: 16px;
}

.event-content {
    flex: 1;
}

.event-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 13px;
}

.event-description {
    font-size: 12px;
    color: var(--text-secondary);
}

.event-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transform: scale(0.95) translateY(10px);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.player-avatar {
    width: 52px;
    height: 52px;
    background: var(--accent-primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.player-info h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.player-id {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 8px;
    border-radius: 4px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.detail-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 165, 40, 0.08);
    border-radius: 6px;
    color: var(--accent-primary);
}

.detail-icon svg {
    width: 16px;
    height: 16px;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.detail-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-value {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
}

.footer-logo svg {
    width: 18px;
    height: 18px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-subtitle {
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 14px;
        padding: 18px;
    }
    
    .hero-stat-divider {
        width: 80%;
        height: 1px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}