/* Global Variables */
:root {
    --primary-black: #000000;
    --primary-white: #FFFFFF;
    --gray-dark: #1a1a1a;
    --gray-medium: #333333;
    --gray-light: #666666;
    --gray-lighter: #999999;
    --gray-border: #e0e0e0;
    --accent-red: #ff0000;
    --accent-green: #00ff00;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--primary-black);
    color: var(--primary-white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Checkered Background */
.checkered-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.racing-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, #000 25%, transparent 25%),
        linear-gradient(-45deg, #000 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #000 75%),
        linear-gradient(-45deg, transparent 75%, #000 75%);
    background-size: 30px 30px;
    background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
    opacity: 0.03;
    animation: moveGrid 10s linear infinite;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.speed-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.speed-lines span {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: speedLine 3s linear infinite;
}

.speed-lines span:nth-child(1) { top: 10%; animation-delay: 0s; }
.speed-lines span:nth-child(2) { top: 30%; animation-delay: 0.6s; }
.speed-lines span:nth-child(3) { top: 50%; animation-delay: 1.2s; }
.speed-lines span:nth-child(4) { top: 70%; animation-delay: 1.8s; }
.speed-lines span:nth-child(5) { top: 90%; animation-delay: 2.4s; }

@keyframes speedLine {
    0% {
        width: 0;
        left: -100%;
    }
    50% {
        width: 100%;
        left: 100%;
    }
    100% {
        width: 0;
        left: 200%;
    }
}

/* Navigation */
.navbar {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-white);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--primary-white);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: all 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-white);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-white);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 2rem 50px;
    position: relative;
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(26,26,26,0.9) 100%);
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    font-size: 1.5rem;
    color: var(--gray-lighter);
    letter-spacing: 4px;
}

.title-main {
    display: block;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -2px;
    background: linear-gradient(180deg, #fff 0%, #666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-sub {
    display: block;
    font-size: 2rem;
    color: var(--accent-red);
    letter-spacing: 6px;
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--gray-lighter);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border: 2px solid var(--primary-white);
    background: transparent;
    color: var(--primary-white);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-white);
    color: var(--primary-black);
}

.btn-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-red);
    transition: left 0.3s;
    z-index: -1;
}

.btn-primary:hover .btn-effect {
    left: 0;
}

.btn-primary:hover {
    color: var(--primary-white);
}

.btn-secondary:hover {
    background: var(--primary-white);
    color: var(--primary-black);
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--accent-red);
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* F1 Car Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.f1-car {
    position: relative;
    width: 300px;
    height: 150px;
    animation: carMove 5s ease-in-out infinite;
}

@keyframes carMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

.car-body {
    position: absolute;
    width: 200px;
    height: 50px;
    background: linear-gradient(90deg, #333 0%, #fff 50%, #333 100%);
    top: 50px;
    left: 50px;
    clip-path: polygon(10% 0%, 100% 0%, 95% 100%, 0% 100%);
}

.car-wing {
    position: absolute;
    width: 80px;
    height: 20px;
    background: var(--primary-white);
    top: 40px;
    left: 200px;
}

.wheel {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--gray-medium);
    border: 3px solid var(--primary-white);
    border-radius: 50%;
    bottom: 30px;
    animation: wheelRotate 1s linear infinite;
}

.wheel-front { left: 180px; }
.wheel-rear { left: 70px; }

@keyframes wheelRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* News Ticker */
.news-ticker {
    background: var(--accent-red);
    color: var(--primary-white);
    padding: 0.75rem 0;
    overflow: hidden;
    white-space: nowrap;
    border-top: 2px solid var(--primary-white);
    border-bottom: 2px solid var(--primary-white);
}

.ticker-content {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

.ticker-content span {
    padding: 0 3rem;
    font-weight: 600;
    text-transform: uppercase;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Sections */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-red);
}

.title-accent {
    color: var(--accent-red);
}

/* News Section */
.news-section {
    padding: 80px 0;
    background: var(--gray-dark);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background: var(--primary-black);
    border: 2px solid var(--gray-medium);
    overflow: hidden;
    transition: all 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-white);
    box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

.news-image {
    width: 100%;
    height: 200px;
    background: var(--gray-medium);
    position: relative;
    overflow: hidden;
}

.news-image.skeleton {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

.news-content {
    padding: 1.5rem;
}

.news-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-red);
    color: var(--primary-white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.news-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.news-content p {
    color: var(--gray-lighter);
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.load-more-btn {
    display: block;
    margin: 0 auto;
    padding: 1rem 3rem;
    background: transparent;
    color: var(--primary-white);
    border: 2px solid var(--primary-white);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--primary-white);
    color: var(--primary-black);
}

/* Calendar Section */
.calendar-section {
    padding: 80px 0;
    background: var(--primary-black);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.race-card {
    background: var(--gray-dark);
    border: 2px solid var(--gray-medium);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.race-card:hover {
    border-color: var(--accent-red);
    transform: translateX(5px);
}

.race-round {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--accent-red);
    color: var(--primary-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
}

.race-date {
    color: var(--gray-lighter);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.race-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.race-circuit {
    color: var(--gray-light);
}

/* Circuit Section */
.circuits-section {
    padding: 80px 0;
    background: var(--gray-dark);
}

.circuit-selector {
    text-align: center;
    margin-bottom: 3rem;
}

.circuit-selector select {
    padding: 1rem 2rem;
    background: var(--primary-black);
    color: var(--primary-white);
    border: 2px solid var(--primary-white);
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.circuit-display {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.circuit-info h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-family: 'Orbitron', monospace;
}

.circuit-stats {
    display: grid;
    gap: 1.5rem;
}

.stat {
    padding: 1rem;
    background: var(--primary-black);
    border-left: 3px solid var(--accent-red);
}

.stat-label {
    display: block;
    color: var(--gray-lighter);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

.circuit-map {
    background: var(--primary-black);
    border: 2px solid var(--gray-medium);
    padding: 2rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.track-layout {
    width: 100%;
    max-width: 500px;
}

.circuit-svg {
    width: 100%;
    height: auto;
}

.track-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawTrack 3s ease forwards;
}

@keyframes drawTrack {
    to {
        stroke-dashoffset: 0;
    }
}

.start-finish {
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Standings Section */
.standings-section {
    padding: 80px 0;
    background: var(--primary-black);
}

.standings-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 0.75rem 2rem;
    background: transparent;
    color: var(--primary-white);
    border: 2px solid var(--gray-medium);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-white);
    color: var(--primary-black);
    border-color: var(--primary-white);
}

.standings-table {
    overflow-x: auto;
}

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

.standings-table th {
    background: var(--gray-dark);
    padding: 1rem;
    text-align: left;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--accent-red);
}

.standings-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-medium);
}

.standings-table tr:hover {
    background: var(--gray-dark);
}

.position-1 { color: #FFD700; }
.position-2 { color: #C0C0C0; }
.position-3 { color: #CD7F32; }

/* Timing Section */
.timing-section {
    padding: 80px 0;
    background: var(--gray-dark);
}

.timing-board {
    background: var(--primary-black);
    border: 2px solid var(--gray-medium);
    overflow: hidden;
}

.timing-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--accent-red);
    color: var(--primary-white);
    font-weight: 700;
    text-transform: uppercase;
}

.timing-grid {
    padding: 1rem;
}

.timing-row {
    display: grid;
    grid-template-columns: 50px 1fr 150px 100px 100px;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-medium);
    align-items: center;
}

.timing-row:hover {
    background: var(--gray-dark);
}

.driver-pos {
    font-weight: 900;
    font-size: 1.2rem;
}

.driver-name {
    font-weight: 600;
}

.lap-time {
    font-family: 'Orbitron', monospace;
    color: var(--accent-green);
}

.gap {
    color: var(--gray-lighter);
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: var(--primary-black);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-dark);
    border: 2px solid var(--gray-medium);
    transition: all 0.3s;
}

.contact-card:hover {
    border-color: var(--primary-white);
}

.contact-icon {
    font-size: 2rem;
}

.contact-details h3 {
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
}

.contact-details a {
    color: var(--gray-lighter);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: var(--primary-white);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background: var(--gray-dark);
    color: var(--primary-white);
    border: 2px solid var(--gray-medium);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-white);
}

.submit-btn {
    padding: 1rem 2rem;
    background: var(--primary-white);
    color: var(--primary-black);
    border: 2px solid var(--primary-white);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.submit-btn:hover {
    background: transparent;
    color: var(--primary-white);
}

/* Footer */
.footer {
    background: var(--primary-black);
    border-top: 2px solid var(--gray-medium);
    padding: 3rem 0 1rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--gray-lighter);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-white);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-social a:hover {
    border-color: var(--primary-white);
    background: var(--primary-white);
    color: var(--primary-black);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-medium);
    color: var(--gray-lighter);
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: -400px;
    max-width: 300px;
    padding: 1rem 1.5rem;
    background: var(--primary-white);
    color: var(--primary-black);
    border-left: 4px solid var(--accent-red);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: right 0.3s;
    z-index: 2000;
}

.notification.show {
    right: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--primary-black);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 2px solid var(--primary-white);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .title-main {
        font-size: 3rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .circuit-display {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}