/* FunCove - Racing/Speed Theme */
:root {
    --speed-red: #ff2d55;
    --speed-orange: #ff9500;
    --speed-yellow: #ffcc00;
    --speed-blue: #007aff;
    --speed-dark: #1c1c1e;
    --speed-gray: #2c2c2e;
    --speed-light: #f2f2f7;
    --text-primary: #ffffff;
    --text-dim: #98989d;
    --gradient-speed: linear-gradient(135deg, var(--speed-red), var(--speed-orange), var(--speed-yellow));
    --gradient-track: linear-gradient(180deg, var(--speed-dark), var(--speed-gray));
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--speed-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Racing Stripe Navigation */
.nav-wrapper {
    background: var(--gradient-track);
    border-bottom: 3px solid var(--speed-red);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(255, 45, 85, 0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--speed-red) 20%, 
        var(--speed-orange) 40%,
        var(--speed-yellow) 60%,
        transparent 100%);
    opacity: 0.3;
    z-index: -1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 45px;
    filter: drop-shadow(0 2px 8px rgba(255, 45, 85, 0.5));
}

.nav-links {
    display: flex;
    gap: 5px;
    list-style: none;
    align-items: center;
}

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
    display: none; /* shown via media query */
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    align-items: center;
}

.nav-toggle .hamburger {
    width: 28px;
    height: 2px;
    background: white;
    display: block;
    position: relative;
}
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 28px;
    height: 2px;
    background: white;
}
.nav-toggle .hamburger::before { top: -8px; }
.nav-toggle .hamburger::after { top: 8px; }

/* Mobile navigation overlay */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(12,12,14,0.95), rgba(12,12,14,0.98));
    transform: translateY(-6%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms ease, transform 260ms ease;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-inner {
    width: 100%;
    max-width: 420px;
    padding: 40px 28px;
    text-align: center;
}

.mobile-nav-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-nav-item {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 8px;
    transition: background 0.18s ease, color 0.18s ease;
}
.mobile-nav-item:hover {
    background: rgba(255,45,85,0.08);
    color: var(--speed-red);
}

/* prevent page scroll when mobile nav open */
.no-scroll {
    overflow: hidden !important;
}

.nav-item {
    padding: 10px 18px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: var(--gradient-speed);
    transition: transform 0.3s ease;
}

.nav-item:hover {
    color: var(--speed-red);
    background: rgba(255, 45, 85, 0.1);
}

.nav-item:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-item.active {
    background: rgba(255, 45, 85, 0.15);
    color: var(--speed-red);
}

.nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* Speed Lines Hero: background image + readable overlay */
.hero-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* hero background image */
    background-image: url('../img/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* subtle fallback color while image loads */
    background-color: var(--speed-gray);
}

/* moving speed lines (behind overlay but above image) */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 50px,
        rgba(255, 45, 85, 0.07) 50px,
        rgba(255, 45, 85, 0.07) 52px
    );
    animation: speedLines 3s linear infinite;
    z-index: 0;
}

/* darkened overlay to make hero text readable */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6,6,8,0.42), rgba(6,6,8,0.6));
    backdrop-filter: blur(3px) saturate(120%);
    mix-blend-mode: normal;
    z-index: 1;
}

/* On small screens avoid fixed background behavior and reduce padding */
@media (max-width: 768px) {
    .hero-section {
        padding: 70px 0;
        min-height: 56vh;
        background-attachment: scroll;
    }

    /* show mobile toggle and hide normal nav links */
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
    }

    /* reduce nav padding for small screens */
    .nav-content {
        padding: 12px 16px;
    }
}

@keyframes speedLines {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2; /* above overlay */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--gradient-speed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-dim);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-block;
    padding: 15px 40px;
    background: var(--gradient-speed);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 45, 85, 0.4);
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: '→';
    position: absolute;
    right: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 45, 85, 0.6);
    padding-right: 50px;
}

.hero-cta:hover::before {
    opacity: 1;
    right: 25px;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: var(--speed-dark);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--speed-red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-text {
    font-size: 1.1rem;
    color: var(--text-dim);
    line-height: 1.8;
}

/* Track Features Grid */
.features-section {
    padding: 80px 0;
    background: var(--speed-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.feature-track {
    background: var(--speed-dark);
    padding: 35px 25px;
    border-radius: 12px;
    border-left: 4px solid var(--speed-red);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 45, 85, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-track:hover::before {
    left: 100%;
}

.feature-track:hover {
    transform: translateX(5px);
    border-left-color: var(--speed-orange);
    box-shadow: -5px 0 20px rgba(255, 45, 85, 0.3);
}

.feature-track h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--speed-red);
    font-weight: 700;
}

.feature-track p {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.6;
}

/* Game Section */
.game-section {
    padding: 80px 0;
    background: var(--speed-dark);
}

.game-container {
    margin-top: 40px;
}

.game-card {
    background: var(--speed-gray);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--speed-red);
    box-shadow: 0 8px 30px rgba(255, 45, 85, 0.2);
    margin-bottom: 30px;
}

.game-header {
    padding: 25px;
    background: var(--gradient-speed);
    text-align: center;
}

.game-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.game-frame-wrapper {
    position: relative;
    /* 16:9 aspect ratio fallback for older browsers */
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: var(--speed-dark);
    /* constrain width and center */
    max-width: 900px;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    overflow: hidden;
    /* modern browsers: explicit aspect-ratio */
    aspect-ratio: 16 / 9;
}

.game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: var(--speed-dark);
    display: block;
}

/* Reviews Section */
.reviews-section {
    padding: 80px 0;
    background: var(--speed-gray);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.review-card {
    background: var(--speed-dark);
    padding: 30px;
    border-radius: 12px;
    border-top: 3px solid var(--speed-red);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 45, 85, 0.3);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.review-author {
    font-weight: 700;
    color: var(--speed-red);
    font-size: 1.1rem;
}

.review-text {
    color: var(--text-dim);
    font-style: italic;
    line-height: 1.7;
}

/* Pit Stop Footer */
.footer-wrapper {
    background: var(--speed-dark);
    border-top: 3px solid var(--speed-red);
    padding: 60px 0 20px;
    position: relative;
}

.footer-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-speed);
}

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

.footer-section {
    padding: 20px;
    background: var(--speed-gray);
    border-radius: 8px;
    border-left: 3px solid var(--speed-red);
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--speed-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    color: var(--text-dim);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--speed-red);
    transform: translateX(5px);
}

.footer-disclaimer-box {
    background: var(--speed-gray);
    padding: 25px;
    border-radius: 10px;
    border: 2px solid var(--speed-red);
    margin-bottom: 30px;
    text-align: center;
}

.footer-disclaimer-box h4 {
    color: var(--speed-red);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.footer-disclaimer-box p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid var(--speed-gray);
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Contact Page */
.contact-section {
    padding: 80px 0;
    background: var(--speed-dark);
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.contact-method {
    background: var(--speed-gray);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--speed-red);
    text-align: center;
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 45, 85, 0.3);
}

.contact-method h3 {
    color: var(--speed-red);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.contact-method p {
    color: var(--text-dim);
}

.contact-form {
    max-width: 600px;
    margin: 40px auto;
    background: var(--speed-gray);
    padding: 40px;
    border-radius: 12px;
    border-top: 3px solid var(--speed-red);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--speed-red);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--speed-dark);
    border: 2px solid var(--speed-gray);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--speed-red);
    box-shadow: 0 0 10px rgba(255, 45, 85, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-speed);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 45, 85, 0.4);
}

/* Legal Pages */
.legal-header {
    padding: 80px 0 40px;
    background: var(--speed-gray);
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--speed-red);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-intro {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 700px;
    margin: 0 auto;
}

.legal-content {
    padding: 60px 0;
    background: var(--speed-dark);
}

.legal-doc {
    max-width: 900px;
    margin: 0 auto;
    background: var(--speed-gray);
    padding: 50px;
    border-radius: 12px;
    border-left: 5px solid var(--speed-red);
}

.legal-doc h2 {
    color: var(--speed-red);
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
}

.legal-doc h2:first-child {
    margin-top: 0;
}

.legal-doc p {
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 15px;
}

.legal-doc ul,
.legal-doc ol {
    color: var(--text-dim);
    margin-left: 25px;
    margin-bottom: 15px;
    line-height: 1.8;
}

.legal-notice {
    background: rgba(255, 45, 85, 0.1);
    border-left: 4px solid var(--speed-red);
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
}

.legal-notice h2,
.legal-notice h3 {
    color: var(--speed-red);
    margin-top: 0;
}

.legal-footer-text {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid var(--speed-dark);
    font-size: 0.95rem;
}

.legal-footer-text p {
    color: var(--text-dim);
    margin-bottom: 8px;
}

/* Age Verification Modal */
.age-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.age-modal-content {
    background: var(--speed-gray);
    margin: 10% auto;
    padding: 40px;
    border: 3px solid var(--speed-red);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 50px rgba(255, 45, 85, 0.5);
}

.age-modal-content h2 {
    color: var(--speed-red);
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
}

.age-modal-content p {
    color: var(--text-dim);
    margin-bottom: 30px;
    line-height: 1.7;
    font-size: 1.05rem;
}

.age-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.age-btn {
    padding: 12px 35px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.age-btn.confirm {
    background: var(--gradient-speed);
    color: white;
}

.age-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 45, 85, 0.5);
}

.age-btn.decline {
    background: transparent;
    border: 2px solid var(--speed-red);
    color: var(--speed-red);
}

.age-btn.decline:hover {
    background: var(--speed-red);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .nav-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-doc {
        padding: 30px 20px;
    }
    
    .age-modal-content {
        margin: 20% auto;
        padding: 30px 20px;
    }
    
    .age-buttons {
        flex-direction: column;
    }
    
    .age-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .logo-img {
        height: 35px;
    }
}