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

body {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #d0d0d0;
    line-height: 1.6;
}

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

header {
    background: #050505;
    border-bottom: 2px solid #cc0000;
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Orbitron', 'Racing Sans One', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: #cc0000;
    text-shadow: 0 0 30px rgba(204, 0, 0, 0.3);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.logo span {
    color: #ffffff;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin-top: 10px;
    justify-content: center;
}

nav a {
    color: #aaa;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 4px;
    transition: all 0.25s ease;
    background: transparent;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover,
nav a.active {
    color: #ffffff;
    background: #cc0000;
    border-color: #cc0000;
    box-shadow: 0 0 25px rgba(204, 0, 0, 0.25);
}

#auth-link {
    border-color: #cc0000;
    color: #cc0000;
}

#auth-link:hover {
    color: #ffffff;
    background: #cc0000;
}

.page {
    display: block;
}

.page.hidden {
    display: none !important;
}

.section {
    padding: 50px 0;
}

.dark { background: #0a0a0a; }
.light { background: #111111; }

h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #cc0000;
    border-left: 4px solid #cc0000;
    padding-left: 18px;
    margin-bottom: 35px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.carousel-wrapper {
    overflow: hidden;
    flex: 1;
    border-radius: 8px;
    max-width: 1000px;
    border: 1px solid #1a1a1a;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-track .news-card {
    min-width: 100%;
    padding: 20px;
}

.news-card {
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-card img {
    width: 100%;
    max-height: 500px;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 18px;
    background: #0a0a0a;
}

.news-card h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.news-card p {
    color: #999;
    font-size: 1rem;
    font-weight: 300;
}

.carousel-btn {
    background: rgba(204, 0, 0, 0.15);
    border: 1px solid #cc0000;
    color: #cc0000;
    font-size: 1.5rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.25s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
}

.carousel-btn:hover {
    background: #cc0000;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(204, 0, 0, 0.3);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    cursor: pointer;
    transition: 0.25s;
}

.dot.active {
    background: #cc0000;
    border-color: #cc0000;
    box-shadow: 0 0 15px rgba(204, 0, 0, 0.4);
}

.pilots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.pilot-card {
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
}

.pilot-card:hover {
    border-color: #cc0000;
    box-shadow: 0 8px 30px rgba(204, 0, 0, 0.1);
    transform: translateY(-4px);
}

.pilot-card img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #cc0000;
    margin-bottom: 12px;
}

.pilot-card .name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.pilot-card .number {
    color: #cc0000;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Orbitron', sans-serif;
}

.pilot-card .stat {
    font-size: 0.85rem;
    color: #888;
    font-weight: 300;
    margin: 2px 0;
}

.race-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    background: transparent;
    color: #888;
    border: 1px solid #2a2a2a;
    padding: 10px 28px;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.25s;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn.active {
    background: #cc0000;
    color: #ffffff;
    border-color: #cc0000;
    box-shadow: 0 0 25px rgba(204, 0, 0, 0.2);
}

.tab-btn:hover:not(.active) {
    border-color: #cc0000;
    color: #cc0000;
}

.race-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.race-card {
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
}

.race-card:hover {
    border-color: #cc0000;
    box-shadow: 0 8px 30px rgba(204, 0, 0, 0.1);
    transform: translateY(-4px);
}

.race-card img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    background: #0a0a0a;
}

.race-card .title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 18px 4px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.race-card .meta {
    padding: 0 18px 14px;
    color: #888;
    font-size: 0.85rem;
    font-weight: 300;
}

.merch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.merch-card {
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    text-align: center;
    padding-bottom: 18px;
}

.merch-card:hover {
    border-color: #cc0000;
    box-shadow: 0 8px 30px rgba(204, 0, 0, 0.1);
    transform: translateY(-4px);
}

.merch-card img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    background: #0a0a0a;
}

.merch-card h3 {
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    font-size: 1rem;
    padding: 12px 16px 4px;
}

.merch-card .price {
    color: #cc0000;
    font-size: 1.2rem;
    font-weight: 700;
}

.merch-card .desc {
    color: #888;
    font-size: 0.85rem;
    padding: 4px 16px 0;
}

.social-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-btn {
    display: inline-block;
    padding: 12px 35px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: 0.25s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-btn.tiktok {
    background: #cc0000;
    color: #ffffff;
}

.social-btn.twitch {
    background: #cc0000;
    color: #ffffff;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(204, 0, 0, 0.3);
    background: #dd1111;
}

.support-email {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #1a1a1a;
}

.support-label {
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
    margin-bottom: 6px;
}

.support-link {
    color: #cc0000;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    transition: 0.25s;
}

.support-link:hover {
    color: #ffffff;
    text-shadow: 0 0 25px rgba(204, 0, 0, 0.3);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden { display: none; }

.modal-content {
    background: #0d0d0d;
    border: 1px solid #cc0000;
    border-radius: 8px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 50px rgba(204, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    font-family: 'Orbitron', sans-serif;
    color: #cc0000;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 25px;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 1.8rem;
    color: #555;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Orbitron', sans-serif;
}

.close-modal:hover { color: #cc0000; }

#login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#login-form input {
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #222;
    background: #0a0a0a;
    color: #e0e0e0;
    font-size: 0.95rem;
    font-family: 'Rajdhani', sans-serif;
}

#login-form input:focus {
    border-color: #cc0000;
    outline: none;
}

#login-form button {
    padding: 12px;
    background: #cc0000;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.25s;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#login-form button:hover {
    background: #dd1111;
    box-shadow: 0 0 30px rgba(204, 0, 0, 0.25);
}

.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-panel.hidden { display: none; }

.admin-container {
    background: #0d0d0d;
    border: 1px solid #cc0000;
    border-radius: 8px;
    padding: 30px;
    max-width: 820px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(204, 0, 0, 0.08);
}

.admin-container h2 {
    font-family: 'Orbitron', sans-serif;
    color: #cc0000;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#close-admin {
    background: #222;
    color: #aaa;
    border: none;
    padding: 6px 18px;
    border-radius: 4px;
    cursor: pointer;
    float: right;
    font-size: 1rem;
    font-family: 'Orbitron', sans-serif;
}

#close-admin:hover {
    background: #cc0000;
    color: #ffffff;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin: 18px 0;
    flex-wrap: wrap;
}

.admin-tab {
    background: transparent;
    color: #888;
    border: 1px solid #222;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.25s;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-tab.active {
    background: #cc0000;
    color: #ffffff;
    border-color: #cc0000;
}

.admin-tab:hover:not(.active) {
    border-color: #cc0000;
    color: #cc0000;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active { display: block; }

.admin-tab-content form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-tab-content input,
.admin-tab-content textarea,
.admin-tab-content select {
    padding: 10px 14px;
    border-radius: 4px;
    border: 1px solid #222;
    background: #0a0a0a;
    color: #e0e0e0;
    font-size: 0.9rem;
    font-family: 'Rajdhani', sans-serif;
}

.admin-tab-content textarea {
    min-height: 70px;
    resize: vertical;
}

.admin-tab-content select option {
    background: #0a0a0a;
}

.admin-tab-content button {
    padding: 10px;
    background: #cc0000;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.admin-tab-content button:hover {
    background: #dd1111;
}

.admin-tab-content h4 {
    color: #cc0000;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 18px 0 10px 0;
}

.admin-list {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.admin-list-item {
    padding: 8px 12px;
    border-bottom: 1px solid #141414;
    color: #aaa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.admin-list-item .item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-list-item .badge {
    font-size: 0.65rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge.future {
    background: #1a3a1a;
    color: #4caf50;
}

.badge.past {
    background: #3a1a1a;
    color: #f44336;
}

.admin-list-item button {
    background: #2a1a1a;
    color: #cc0000;
    border: 1px solid #3a1a1a;
    padding: 3px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.admin-list-item button:hover {
    background: #cc0000;
    color: #ffffff;
    border-color: #cc0000;
}

footer {
    background: #050505;
    padding: 25px 0;
    border-top: 1px solid #111;
    text-align: center;
    color: #444;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Модалка пилота */
#pilot-modal-body {
    color: #ccc;
}

#pilot-modal-body .pilot-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #222;
    align-items: center;
}

#pilot-modal-body .pilot-info img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cc0000;
}

#pilot-modal-body .pilot-info .details {
    flex: 1;
}

#pilot-modal-body .pilot-info .details .name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
}

#pilot-modal-body .pilot-info .details .number {
    color: #cc0000;
    font-size: 1.1rem;
    font-weight: 700;
}

#pilot-modal-body .pilot-info .details .stat {
    color: #888;
    font-size: 0.9rem;
}

.race-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.race-history-table th {
    background: #1a1a1a;
    color: #cc0000;
    padding: 10px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #cc0000;
}

.race-history-table td {
    padding: 10px;
    border-bottom: 1px solid #1a1a1a;
    color: #aaa;
    font-size: 0.9rem;
}

.race-history-table tr:hover td {
    background: #111;
}

.race-history-table .position {
    font-weight: 700;
    color: #cc0000;
}

@media (max-width: 768px) {
    .logo { font-size: 1.3rem; letter-spacing: 2px; }
    nav ul { gap: 4px; }
    nav a { font-size: 0.7rem; padding: 6px 10px; letter-spacing: 0.5px; }
    h2 { font-size: 1.2rem; }
    .carousel-btn { width: 32px; height: 32px; font-size: 1rem; }
    .news-card img { max-height: 300px; }
    .race-card img { max-height: 200px; }
    .merch-card img { max-height: 220px; }
    .pilot-card img { width: 120px; height: 120px; }
    .admin-container { padding: 15px; }
    #pilot-modal-body .pilot-info { flex-direction: column; text-align: center; }
    .race-history-table { font-size: 0.75rem; }
    .race-history-table th, .race-history-table td { padding: 6px; }
}
