:root {
    --bg-dark-base: #121417;
    --modal-bg: #1c2026;
    --input-bg: #13161a;
    --accent-red: #e63946;
    --accent-red-hover: #c82333;
    --text-primary: #ffffff;
    --text-muted: #a0aab8;
    --border-color: rgba(255, 255, 255, 0.12);
}

/* Body Styles */
body {
    background-color: var(--bg-dark-base);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    padding-top: 90px;
}

.tracking-widest { letter-spacing: 2px; }
.tracking-wide   { letter-spacing: 1px; }

/* --- EFEITO GLASS NA NAVBAR --- */
.navbar-glass {
    background-color: rgba(18, 20, 23, 0.65) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease-in-out;
}

.navbar-glass .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: color 0.2s ease, transform 0.2s ease;
}

.navbar-glass .nav-link:hover {
    color: var(--accent-red) !important;
    transform: translateY(-1px);
}

/* --- BOTÕES ACCENT --- */
.btn-danger {
    background-color: var(--accent-red);
    border: none;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: var(--accent-red-hover);
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.4);
    transform: scale(1.02);
}

/* --- LOGO ANIMATIONS --- */
.brand-hover {
    transition: transform 0.3s ease;
}

.brand-hover:hover {
    transform: scale(1.03);
}

.brand-text-white {
    transition: color 0.3s ease;
}

.brand-text-white::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #ffffff;
    transition: width 0.3s ease-in-out;
}

.brand-hover:hover .brand-text-white::after {
    width: 100%;
}

.brand-text-red {
    color: var(--accent-red);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.brand-hover:hover .brand-text-red {
    color: #ff4d5a;
    text-shadow: 0 0 10px rgba(230, 57, 70, 0.7);
}

/* --- MODAL STYLES --- */
.modal-dark-panel {
    background-color: var(--modal-bg) !important;
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.form-control-dark {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.form-control-dark:focus {
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 0 0.25rem rgba(230, 57, 70, 0.25) !important;
    outline: none;
}

.form-control-dark::placeholder {
    color: var(--text-muted);
}

.form-control-dark option {
    background-color: var(--modal-bg);
    color: var(--text-primary);
}

input[type="date"].form-control-dark::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.transition-3d {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
    width: 66%;
    height: 340px;
    left: 17%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.coverflow-card.active {
    transform: translateX(0) scale(1) translateZ(0);
    opacity: 1;
    z-index: 3;
    filter: brightness(1.05);
    box-shadow: 0 25px 50px -12px rgba(220, 53, 69, 0.3), 0 0 40px rgba(0, 0, 0, 0.9);
}

.coverflow-card.left {
    transform: translateX(-35%) scale(0.85) rotateY(18deg) translateZ(-80px);
    opacity: 0.55;
    z-index: 1;
    filter: brightness(0.55) blur(0.5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.coverflow-card.right {
    transform: translateX(35%) scale(0.85) rotateY(-18deg) translateZ(-80px);
    opacity: 0.55;
    z-index: 1;
    filter: brightness(0.55) blur(0.5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.indicator-pill {
    width: 32px;
    height: 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.4s ease;
}

.indicator-pill.active {
    width: 48px;
    background: #dc3545;
    box-shadow: 0 0 12px rgba(220, 53, 69, 0.8);
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .coverflow-wrapper {
        height: 320px !important;
    }

    .transition-3d {
        width: 84%;
        height: 280px;
        left: 8%;
    }

    .coverflow-card.left {
        transform: translateX(-18%) scale(0.85) rotateY(12deg) translateZ(-40px);
        opacity: 0.35;
    }

    .coverflow-card.right {
        transform: translateX(18%) scale(0.85) rotateY(-12deg) translateZ(-40px);
        opacity: 0.35;
    }

    .glass-arrow {
        padding: 0.5rem 0.75rem !important;
    }
}

/* --- PROGRESSIVE SCROLL ANIMATION --- */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.30s; }
.delay-3 { transition-delay: 0.45s; }


/* Red clock */
input[type="date"].form-control-dark::-webkit-calendar-picker-indicator,
input[type="time"].form-control-dark::-webkit-calendar-picker-indicator {
    filter: invert(30%) sepia(85%) saturate(3500%) hue-rotate(345deg) brightness(95%) contrast(100%);
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

input[type="date"].form-control-dark::-webkit-calendar-picker-indicator:hover,
input[type="time"].form-control-dark::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* --- CAR --- */
.race-track-container {
    height: 14px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.race-car-anim {
    animation: f1CarPulse 8.5s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
    will-change: left, opacity;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.f1-car-svg {
    background: transparent !important;
    display: block;
    position: relative;
    z-index: 2;
}

.f1-glow {
    filter: drop-shadow(0 0 4px rgba(230, 57, 70, 0.95));
}

/* Line Tail */
.f1-laser-trail {
    position: absolute;
    right: 80%;
    top: 50%;
    transform: translateY(-50%);
    width: 480px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(230, 57, 70, 0.15) 20%,
        rgba(230, 57, 70, 0.75) 65%,
        rgba(255, 255, 255, 0.95) 100%
    );
    border-radius: 2px;
    filter: drop-shadow(0 0 4px rgba(230, 57, 70, 0.85));
    z-index: 1;
}

@keyframes f1CarPulse {
    0% {
        left: -170px;
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    88% {
        opacity: 1;
    }
    100% {
        left: calc(100% + 30px);
        opacity: 0;
    }
}
