/* Formula Speed Racing Styles */

/* Racing Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;700&display=swap');

/* Global Racing Theme */
:root {
    --racing-red: #dc2626;
    --racing-gold: #eab308;
    --racing-black: #000000;
    --racing-white: #ffffff;
    --speed-gradient: linear-gradient(135deg, #dc2626 0%, #eab308 50%, #dc2626 100%);
    --baghdad-blue: #2563eb;
    --bg-gradient: linear-gradient(135deg, #7f1d1d 0%, #991b1b 25%, #dc2626 50%, #000000 100%);
}

/* Body and Layout */
body {
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--racing-white);
}

/* Racing Typography */
.racing-font {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    letter-spacing: 1px;
}

.speed-font {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
}

/* Hero Section Enhancements */
.hero-title {
    text-shadow: 
        0 0 10px rgba(220, 38, 38, 0.5),
        0 0 20px rgba(220, 38, 38, 0.3),
        0 0 30px rgba(220, 38, 38, 0.2);
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    from {
        text-shadow: 
            0 0 10px rgba(220, 38, 38, 0.5),
            0 0 20px rgba(220, 38, 38, 0.3),
            0 0 30px rgba(220, 38, 38, 0.2);
    }
    to {
        text-shadow: 
            0 0 15px rgba(220, 38, 38, 0.8),
            0 0 25px rgba(220, 38, 38, 0.6),
            0 0 35px rgba(220, 38, 38, 0.4);
    }
}

/* Feature Cards */
.feature-card {
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(220, 38, 38, 0.2);
}

/* Racing Stripes Animation */
.racing-stripes {
    position: relative;
    overflow: hidden;
}

.racing-stripes::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(255, 255, 255, 0.1) 5px,
        rgba(255, 255, 255, 0.1) 10px
    );
    animation: racing-stripes-move 1s linear infinite;
}

@keyframes racing-stripes-move {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Button Enhancements */
button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: scale(0.98);
}

/* Form Styling */
#phoneInputContainer,
#pinInputContainer {
    backdrop-filter: blur(10px);
    border: 2px solid rgba(220, 38, 38, 0.5);
    transition: all 0.3s ease;
}

#phoneInputContainer:focus-within,
#pinInputContainer:focus-within {
    border-color: var(--racing-red);
    box-shadow: 
        0 0 20px rgba(220, 38, 38, 0.3),
        inset 0 0 10px rgba(220, 38, 38, 0.1);
    transform: scale(1.02);
}

.phone-input,
.pin-input {
    background: transparent !important;
    color: #1f2937 !important;
    font-weight: 600;
}

.phone-input::placeholder,
.pin-input::placeholder {
    color: #6b7280;
    font-style: italic;
}

/* Racing Elements Animation */
.racing-elements {
    perspective: 1000px;
}

.racing-elements div {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.racing-elements div:hover {
    transform: rotateY(360deg) scale(1.2);
}

/* Baghdad Landmarks Showcase */
.landmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.landmark-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.landmark-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Speed Lines Background */
.speed-lines-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.speed-lines-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(255, 255, 255, 0.1) 50px,
            rgba(255, 255, 255, 0.1) 52px
        );
    animation: speed-lines-horizontal 3s linear infinite;
}

@keyframes speed-lines-horizontal {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Pulse Animation for CTA */
.pulse {
    animation: pulse-racing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-racing {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

/* Modal Enhancements */
#samePinModal {
    backdrop-filter: blur(10px);
}

#samePinModal .bg-white {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Loading Spinner */
.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .landmarks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .logo-container {
        height: 80px;
        width: 200px;
    }
    
    .racing-font {
        font-size: 2rem;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .feature-card {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .landmark-item {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .feature-card,
    .landmark-item {
        border-width: 2px;
        border-color: var(--racing-red);
    }
    
    button {
        border: 2px solid var(--racing-white);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .racing-stripes,
    .speed-lines-bg,
    .dots-pattern {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}