@font-face {
    font-family: 'Xenogears';
    src: url('xenogears.regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --rally-red: #e8291c;
    --rally-yellow: #f5c518;
    --rally-black: #0a0a0c;
    --rally-white: #f0f0f0;
    --rally-gray: #9090a8;
    --rally-dark-gray: #50506a;
    --rally-checker: #ffffff;
    --rally-checker-dark: #000000;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Checkered Pattern */
.checkered-border {
    border: 8px solid;
    border-image: repeating-conic-gradient(
        var(--rally-checker) 0deg 90deg,
        var(--rally-checker-dark) 90deg 180deg
    ) 8;
}

.checkered-bg {
    background-image: 
        repeating-conic-gradient(
            var(--rally-checker) 0deg 90deg,
            var(--rally-checker-dark) 90deg 180deg
        );
    background-size: 20px 20px;
}

/* Navigation */
.rally-nav {
    background: var(--rally-black);
    border-bottom: 4px solid var(--rally-red);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.nav-logo {
    font-family: 'Racing Sans One', cursive;
    font-size: 1.5rem;
    color: var(--rally-yellow);
    letter-spacing: 2px;
}

.toggle-btn {
    background: var(--rally-red);
    color: var(--rally-white);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--rally-red);
}

.toggle-btn:hover {
    background: var(--rally-yellow);
    color: var(--rally-black);
    border-color: var(--rally-yellow);
    transform: translateY(-2px);
}

/* Hero Section */
.rally-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.rally-hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.rally-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 12, 0.4) 0%,
        rgba(10, 10, 12, 0.3) 50%,
        rgba(10, 10, 12, 0.5) 100%
    );
    z-index: 1;
}

.rally-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.rally-title {
    font-family: 'Xenogears', 'Oswald', sans-serif;
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--rally-yellow);
    letter-spacing: 4px;
}

.rally-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--rally-yellow);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.rally-tagline {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    color: var(--rally-gray);
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.rally-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(232, 41, 28, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    border: 2px solid var(--rally-red);
    font-weight: 500;
}

.feature-icon {
    font-size: 1.5rem;
}

/* Cars Section */
.rally-cars {
    padding: 6rem 0;
    background: var(--rally-black);
    position: relative;
}

/* Features Section */
.rally-features-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #0a0a0c 0%, #1a1a1a 100%);
    position: relative;
}

.rally-features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--rally-checker) 0px,
        var(--rally-checker) 20px,
        var(--rally-checker-dark) 20px,
        var(--rally-checker-dark) 40px
    );
}

.feature-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #252530 100%);
    border-radius: 12px;
    border: 3px solid var(--rally-red);
    position: relative;
    transition: all 0.3s;
}

.feature-detail-row::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid var(--rally-yellow);
    border-radius: 8px;
    pointer-events: none;
}

.feature-detail-row:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(232, 41, 28, 0.4);
    border-color: var(--rally-yellow);
}

.feature-detail-row:hover::before {
    border-color: var(--rally-red);
}

.feature-detail-icon {
    font-size: 4rem;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.feature-detail-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.feature-detail-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    color: var(--rally-yellow);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.feature-detail-content > p {
    color: var(--rally-gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feature-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-bullets li {
    color: var(--rally-gray);
    line-height: 1.8;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-bullets li::before {
    content: '▸';
    color: var(--rally-yellow);
    position: absolute;
    left: 0;
    font-weight: bold;
}

@media (max-width: 768px) {
    .feature-detail-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .feature-detail-icon {
        min-width: auto;
    }
    
    .feature-bullets li {
        text-align: left;
    }
}

.rally-cars::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--rally-checker) 0px,
        var(--rally-checker) 20px,
        var(--rally-checker-dark) 20px,
        var(--rally-checker-dark) 40px
    );
}

.car-group {
    margin-bottom: 4rem;
}

.car-group:last-child {
    margin-bottom: 0;
}

.car-group-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    color: var(--rally-yellow);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--rally-red);
    letter-spacing: 2px;
}

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

.car-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #252530 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--rally-red);
    transition: all 0.3s;
    position: relative;
    text-decoration: none;
    display: block;
}

.car-card::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 2px solid var(--rally-yellow);
    border-radius: 8px;
    pointer-events: none;
}

.car-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(232, 41, 28, 0.4);
    border-color: var(--rally-yellow);
}

.car-card:hover::before {
    border-color: var(--rally-red);
}

.car-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: linear-gradient(135deg, #0a0a0c 0%, #1a1a1a 100%);
    padding: 1rem;
    transition: transform 0.3s;
}

.car-card:hover .car-image {
    transform: scale(1.1);
}

.car-info {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.car-info h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    color: var(--rally-white);
    margin-bottom: 0;
    letter-spacing: 1px;
}

/* Devlog Section */
.rally-devlog {
    padding: 6rem 0;
    background: var(--rally-black);
    position: relative;
    background-image: url('23-27-01-864_512 (1).gif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Developer Section */
.rally-developer {
    padding: 6rem 0;
    background: linear-gradient(135deg, #0a0a0c 0%, #1a1a1a 100%);
    position: relative;
}

.rally-developer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--rally-checker) 0px,
        var(--rally-checker) 20px,
        var(--rally-checker-dark) 20px,
        var(--rally-checker-dark) 40px
    );
}

.developer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.developer-image {
    background: linear-gradient(135deg, #1a1a1a 0%, #252530 100%);
    border-radius: 12px;
    border: 3px solid var(--rally-red);
    padding: 1rem;
    position: relative;
}

.developer-image::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 2px solid var(--rally-yellow);
    border-radius: 8px;
    pointer-events: none;
}

.developer-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.developer-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--rally-yellow);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.developer-location {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--rally-gray);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.developer-info p {
    color: var(--rally-gray);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.developer-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.skill-tag {
    background: var(--rally-red);
    color: var(--rally-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.developer-contact {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--rally-yellow);
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .developer-content {
        grid-template-columns: 1fr;
    }
}

.rally-devlog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--rally-checker) 0px,
        var(--rally-checker) 20px,
        var(--rally-checker-dark) 20px,
        var(--rally-checker-dark) 40px
    );
}

.rally-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    margin-bottom: 4rem;
    color: var(--rally-yellow);
    position: relative;
    display: inline-block;
    width: 100%;
    letter-spacing: 2px;
}

.rally-section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--rally-red);
    margin: 1rem auto;
}

.devlog-entries {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.devlog-entry {
    background: linear-gradient(135deg, #1a1a1a 0%, #252530 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 3px solid var(--rally-red);
    position: relative;
    transition: all 0.3s;
}

.devlog-entry::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid var(--rally-yellow);
    border-radius: 8px;
    pointer-events: none;
}

.devlog-entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(232, 41, 28, 0.3);
    border-color: var(--rally-yellow);
}

.devlog-entry:hover::before {
    border-color: var(--rally-red);
}

/* Tuning Guides Section */
.rally-tuning-guides {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0a0a0c 0%, #1a1a2e 100%);
}

.rally-section-subtitle {
    text-align: center;
    color: var(--rally-gray);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-family: 'IBM Plex Sans', sans-serif;
}

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

.tuning-guide-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #252530 100%);
    border-radius: 12px;
    border: 3px solid var(--rally-red);
    overflow: hidden;
    transition: all 0.3s;
}

.tuning-guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(232, 41, 28, 0.3);
    border-color: var(--rally-yellow);
}

.guide-header {
    background: rgba(232, 41, 28, 0.1);
    padding: 1.5rem;
    border-bottom: 2px solid var(--rally-red);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.guide-header h3 {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--rally-yellow);
}

.guide-difficulty {
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.guide-difficulty.beginner {
    background: #39ff14;
    color: #0a0a0c;
}

.guide-difficulty.intermediate {
    background: #f5c518;
    color: #0a0a0c;
}

.guide-difficulty.advanced {
    background: #e8291c;
    color: #fff;
}

.guide-content {
    padding: 1.5rem;
}

.guide-content p {
    color: var(--rally-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.guide-tips {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.guide-tips li {
    padding: 0.5rem 0;
    color: var(--rally-text);
    font-size: 0.95rem;
    line-height: 1.5;
    border-left: 3px solid var(--rally-yellow);
    padding-left: 1rem;
}

.guide-tips li strong {
    color: var(--rally-yellow);
}

.guide-recommendation {
    background: rgba(245, 197, 24, 0.1);
    border: 2px solid var(--rally-yellow);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.rec-label {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    color: var(--rally-yellow);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.rec-values {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--rally-text);
    font-size: 0.9rem;
}

.tuning-legend {
    background: linear-gradient(135deg, #1a1a1a 0%, #252530 100%);
    border-radius: 12px;
    border: 3px solid var(--rally-red);
    padding: 2rem;
    margin-top: 3rem;
}

.tuning-legend h4 {
    font-family: 'Bebas Neue', sans-serif;
    color: var(--rally-yellow);
    font-size: 1.8rem;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

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

.legend-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(232, 41, 28, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--rally-red);
}

.legend-param {
    font-family: 'Bebas Neue', sans-serif;
    color: var(--rally-yellow);
    font-size: 1.1rem;
}

.legend-effect {
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--rally-gray);
    font-size: 0.9rem;
    line-height: 1.4;
}


.devlog-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    color: var(--rally-yellow);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.devlog-entry h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--rally-white);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.devlog-entry p {
    color: var(--rally-gray);
    margin-bottom: 1rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.devlog-entry p:last-child {
    margin-bottom: 0;
}

/* CTA Section */
.rally-cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--rally-black) 0%, #1a1a1a 100%);
    text-align: center;
    position: relative;
    border-top: 4px solid var(--rally-white);
    border-bottom: 4px solid var(--rally-white);
}

.rally-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-conic-gradient(
        rgba(255, 255, 255, 0.05) 0deg 90deg,
        rgba(0, 0, 0, 0.05) 90deg 180deg
    );
    background-size: 40px 40px;
}

.rally-cta .container {
    position: relative;
    z-index: 1;
}

.rally-cta-title {
    font-family: 'Racing Sans One', cursive;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    color: var(--rally-white);
    letter-spacing: 2px;
}

.rally-cta-text {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.rally-play-btn {
    display: inline-block;
    background: var(--rally-yellow);
    color: var(--rally-black);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    border: 4px solid var(--rally-black);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

.rally-play-btn:hover {
    background: var(--rally-white);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Footer */
.rally-footer {
    background: var(--rally-black);
    padding: 2rem 0;
    border-top: 4px solid var(--rally-yellow);
    text-align: center;
}

.rally-footer p {
    color: var(--rally-gray);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rally-title {
        font-size: 2.5rem;
    }
    
    .rally-subtitle {
        font-size: 1.5rem;
    }
    
    .rally-features {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .devlog-entry {
        padding: 1.5rem;
    }
}
