* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-900: #0a0a1f;
    --primary-800: #12122b;
    --primary-700: #1a1a37;
    --primary-600: #2a2a4a;
    
    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #d946ef;
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.1);
    
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --category-carx: #f97316;
    --category-steam: #0e76a8;
    --category-discord: #5865f2;
    --category-general: #6b7280;
    --category-custom: #8b5cf6;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
    min-height: 100vh;
    color: var(--gray-100);
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

/* Фоновый градиент */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.gradient-sphere-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-1);
    top: -200px;
    left: -100px;
}

.gradient-sphere-2 {
    width: 600px;
    height: 600px;
    background: var(--accent-2);
    bottom: -200px;
    right: -100px;
}

.gradient-sphere-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Навигация */
.navbar {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-brand i {
    font-size: 1.5rem;
    color: var(--accent-1);
}

.nav-stats {
    display: flex;
    gap: 24px;
}

.nav-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 40px;
    font-size: 0.9rem;
}

.nav-stat i {
    font-size: 1rem;
}

#nav-available i { color: var(--success); }
#nav-unavailable i { color: var(--danger); }
#nav-total i { color: var(--info); }

.stat-value {
    font-weight: 600;
}

/* Герой */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--gray-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.hero-subtitle {
    color: var(--gray-400);
    font-size: 1.1rem;
}

/* Панель управления */
.control-panel {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.control-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-200);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--gray-300);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.filter-wrapper, .timeout-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    padding: 4px 16px;
}

.filter-select {
    background: transparent;
    border: none;
    color: var(--gray-200);
    font-size: 0.95rem;
    padding: 8px 0;
    outline: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.filter-select option {
    background: var(--primary-700);
}

.timeout-wrapper i {
    color: var(--gray-400);
}

.timeout-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.95rem;
    width: 50px;
    padding: 8px 0;
    outline: none;
    text-align: center;
}

.timeout-wrapper span {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
}

.progress-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--info));
    transition: width 0.3s ease;
    border-radius: 4px;
}

.status-text {
    color: var(--gray-400);
    font-size: 0.9rem;
    min-width: 150px;
}

/* Таблица */
.table-container {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 4px;
    overflow-x: auto;
    margin-bottom: 24px;
}

.servers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.servers-table th {
    text-align: left;
    padding: 20px 16px;
    font-weight: 600;
    color: var(--gray-400);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.servers-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--gray-200);
}

.servers-table tbody tr {
    transition: background 0.2s ease;
}

.servers-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

.category-badge.CarX { background: var(--category-carx); }
.category-badge.Steam { background: var(--category-steam); }
.category-badge.Discord { background: var(--category-discord); }
.category-badge.General { background: var(--category-general); }
.category-badge.Custom { background: var(--category-custom); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.available {
    background: var(--success-light);
    color: var(--success);
}

.status-badge.unavailable {
    background: var(--danger-light);
    color: var(--danger);
}

.status-badge.waiting {
    background: var(--info-light);
    color: var(--info);
}

.response-time {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
}

.response-time.fast { color: var(--success); }
.response-time.medium { color: var(--warning); }
.response-time.slow { color: var(--danger); }

/* Футер */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-left i {
    color: var(--accent-1);
}

.footer-right {
    display: flex;
    gap: 8px;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

.notification.success {
    border-left-color: var(--success);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.notification.error {
    border-left-color: var(--danger);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.notification.info {
    border-left-color: var(--info);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Загрузка */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 1200px) {
    .navbar {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-stats {
        width: 100%;
        justify-content: center;
    }
    
    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: center;
    }
    
    .progress-wrapper {
        min-width: auto;
    }
    
    .footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .nav-stats {
        flex-wrap: wrap;
    }
    
    .servers-table {
        font-size: 0.85rem;
    }
    
    .servers-table th,
    .servers-table td {
        padding: 12px 8px;
    }
    
    .status-badge {
        padding: 4px 8px;
    }
}