/* ========== F1 ГОНОЧНЫЙ ПРЕМИУМ ========== */
/* Чёрный карбон + неоново-красный + гоночные акценты */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
    background: #050505;
    color: #fff;
    min-height: 100vh;
}

/* ===== КАРБОНОВЫЙ ФОН (градиент с текстурой) ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 8px),
        radial-gradient(circle at 20% 30%, #0a0a0a 0%, #000000 100%);
    pointer-events: none;
    z-index: -1;
}

/* ===== СКРОЛЛБАР ГОСТИЧНЫЙ ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #e10600; border-radius: 3px; }

/* ===== НАВБАР С БЛЮРОМ И ТЕНЬЮ ===== */
.navbar {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(225, 6, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #e10600 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    text-transform: uppercase;
}

.logo span {
    background: none;
    -webkit-background-clip: unset;
    color: #e10600;
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: #ddd;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.nav-links a:hover {
    background: rgba(225, 6, 0, 0.15);
    color: #fff;
}

.nav-links a.active {
    background: #e10600;
    color: #fff;
    box-shadow: 0 0 12px rgba(225, 6, 0, 0.5);
}

/* ===== КНОПКИ С НЕОНОВЫМ ЭФФЕКТОМ ===== */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary {
    background: #e10600;
    color: white;
    box-shadow: 0 0 8px rgba(225, 6, 0, 0.4);
}

.btn-primary:hover {
    background: #ff1a0a;
    transform: scale(1.02);
    box-shadow: 0 0 16px rgba(225, 6, 0, 0.7);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(225, 6, 0, 0.2);
    border-color: #e10600;
    color: #fff;
}

/* ===== КАРТОЧКИ С БОРДЕРОМ И ТЕНЬЮ ===== */
.card {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.card:hover {
    border-color: rgba(225, 6, 0, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Карточки гонок — с красной полосой */
.race-card {
    border-left: 4px solid #e10600;
    border-radius: 20px;
}

/* ===== ТАБЛИЦЫ В СТИЛЕ F1 ===== */
table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
}

th, td {
    padding: 1rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: #e10600;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

tr:hover {
    background: rgba(225, 6, 0, 0.08);
}

/* ===== ФОРМЫ С RED BULL СТИЛЕМ ===== */
.form-group {
    margin-bottom: 1.2rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #e10600;
    box-shadow: 0 0 0 2px rgba(225, 6, 0, 0.2);
    background: #111;
}

/* ===== ЧАТ В КИБЕРСПОРТИВНОМ СТИЛЕ ===== */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #222;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
}

.message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: #e10600;
    border-radius: 20px 20px 4px 20px;
}

.ai-message .message-content {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 20px 20px 20px 4px;
}

.message-content {
    max-width: 70%;
    padding: 0.8rem 1.2rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.chat-input-area {
    display: flex;
    padding: 1rem;
    background: #050505;
    gap: 0.8rem;
    border-top: 1px solid #1a1a1a;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes glow {
    0% { text-shadow: 0 0 0px #e10600; }
    100% { text-shadow: 0 0 8px #e10600; }
}

/* ===== МОДАЛКА С RED BULL СТИЛЕМ ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #0f0f0f;
    padding: 2rem;
    border-radius: 28px;
    max-width: 500px;
    width: 90%;
    border: 1px solid #e10600;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* ===== КАЛЕНДАРЬ ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* ===== СТАТИСТИКА НА ГЛАВНОЙ ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* ===== ГРАФИКИ ===== */
canvas {
    max-height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 1rem;
}

/* ===== ГОНОЧНЫЕ ЦИФРЫ ===== */
.hero h1 span {
    color: #e10600;
    animation: glow 1.5s ease-in-out infinite alternate;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1rem;
    }
    
    .nav-links {
        justify-content: center;
        gap: 0.2rem;
    }
    
    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    th, td {
        padding: 0.6rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== ЗАГРУЗОЧНЫЙ ЭФФЕКТ ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top-color: #e10600;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== СТАТУСЫ ===== */
.status-excluded {
    background: #dc3545;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: bold;
}

.status-past {
    background: #28a745;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: bold;
}

.status-upcoming {
    background: #ffc107;
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: bold;
}