:root {
    --primary-color: #2563eb; /* Strong Blue */
    --secondary-color: #3b82f6; /* Lighter Blue */
    --accent-color: #10b981; /* Green */
    --text-color: #1e293b; /* Dark Slate for Text on Light BG */
    --map-line-color: rgba(0, 0, 0, 0.06); /* Very subtle grid lines */
    --map-bg-color: #f8fafc; /* Very Light Gray/White Background */
    --building-color: #cbd5e1; /* Light Slate for buildings */
    --building-side: #94a3b8; /* Darker side for 3D effect */
    --traffic-color: #ef4444; /* Red for traffic */
    --traffic-color-2: #f59e0b; /* Amber */
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--map-bg-color);
    font-family: 'UKIJTor', sans-serif;
}

.splash-screen {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    overflow: hidden;
    z-index: 1;
}

/* =========================================
   Map Background & Animation
   ========================================= */
.map-background {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    background-color: var(--map-bg-color);
    /* Perspective transform to give 3D navigation feel */
    transform: perspective(1200px) rotateX(35deg) scale(1.4); /* More tilt for drama */
    transform-origin: center center;
    transition: all 1s ease;
}

.zoom-out-map {
    transform: perspective(1200px) rotateX(0deg) scale(1);
    opacity: 0;
}

.map-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    /* Create a grid pattern using CSS gradients - Light Mode Style */
    background-image: 
        linear-gradient(var(--map-line-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--map-line-color) 1px, transparent 1px);
    background-size: 60px 60px; /* Larger blocks */
    animation: moveMap 25s linear infinite;
}

/* Major roads (thicker lines) */
.map-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0,0,0,0.08) 4px, transparent 4px),
        linear-gradient(90deg, rgba(0,0,0,0.08) 4px, transparent 4px);
    background-size: 240px 240px; /* Every 4 blocks */
}

@keyframes moveMap {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(60px) translateX(60px); }
}

/* =========================================
   Traffic Lines Animation
   ========================================= */
.traffic-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.traffic-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--traffic-color), transparent);
    opacity: 0.6;
    border-radius: 2px;
}

/* Vertical Traffic */
.line-1 {
    width: 4px;
    height: 200px;
    top: -200px;
    left: 45%;
    background: linear-gradient(to bottom, transparent, var(--traffic-color), transparent);
    animation: trafficFlowV 6s linear infinite;
}

/* Horizontal Traffic */
.line-2 {
    width: 300px;
    height: 4px;
    top: 35%;
    left: -300px;
    background: linear-gradient(to right, transparent, var(--traffic-color-2), transparent);
    animation: trafficFlowH 8s linear infinite 2s;
}

.line-3 {
    width: 4px;
    height: 150px;
    top: -150px;
    left: 65%;
    background: linear-gradient(to bottom, transparent, #3b82f6, transparent); /* Blue traffic */
    animation: trafficFlowV 5s linear infinite 1s;
}

@keyframes trafficFlowV {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(120vh); opacity: 0; }
}

@keyframes trafficFlowH {
    0% { transform: translateX(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateX(120vw); opacity: 0; }
}

/* =========================================
   3D Buildings
   ========================================= */
.buildings-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform-style: preserve-3d;
    z-index: 2;
}

.building {
    position: absolute;
    width: 40px;
    height: 40px;
    transform-style: preserve-3d;
    animation: popUpBuilding 1s ease-out forwards;
    opacity: 0;
}

.b-1 { top: 40%; left: 25%; animation-delay: 0.5s; }
.b-2 { top: 60%; left: 70%; width: 30px; height: 30px; animation-delay: 0.8s; }
.b-3 { top: 25%; left: 65%; width: 50px; height: 50px; animation-delay: 1.2s; }

/* Building faces */
.roof {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    transform: translateZ(40px); /* Height of building */
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.side {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40px; /* Height */
    background: var(--building-side);
    transform-origin: bottom;
}

.side-1 { transform: rotateX(-90deg) translateZ(20px); height: 40px; background: #cbd5e1; } /* Front/Back */
.side-2 { transform: rotateY(90deg) rotateX(-90deg) translateZ(20px); width: 40px; height: 40px; background: #94a3b8; } /* Right */

@keyframes popUpBuilding {
    from { transform: translateZ(-50px) scale(0); opacity: 0; }
    to { transform: translateZ(0) scale(1); opacity: 1; }
}

/* =========================================
   Route & Navigation
   ========================================= */
.map-routes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.route-svg {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    overflow: visible;
    transform: rotate(-5deg);
}

.route-path {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 15, 10;
    animation: dash 20s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
}

.route-path-shadow {
    fill: none;
    stroke: rgba(0,0,0,0.1);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: translate(2px, 4px); /* Offset shadow */
}

/* Car Icon */
.route-car {
    filter: drop-shadow(0 4px 6px rgba(37, 99, 235, 0.4));
    fill: var(--primary-color);
    transform-origin: center;
}

@keyframes dash {
    to { stroke-dashoffset: -1000; }
}

/* =========================================
   Clouds Layer
   ========================================= */
.clouds-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4; /* Above map, below UI */
    perspective: 500px;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    filter: blur(8px);
    opacity: 0.8;
}

.cloud::after, .cloud::before {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-1 {
    width: 100px; height: 40px;
    top: 15%; left: -20%;
    animation: floatCloud 25s linear infinite;
}
.cloud-1::after { width: 40px; height: 40px; top: -20px; left: 15px; }
.cloud-1::before { width: 30px; height: 30px; top: -10px; left: 45px; }

.cloud-2 {
    width: 140px; height: 50px;
    top: 40%; left: -40%;
    animation: floatCloud 35s linear infinite 5s;
    opacity: 0.5;
}
.cloud-2::after { width: 60px; height: 60px; top: -30px; left: 25px; }

.cloud-3 {
    width: 80px; height: 30px;
    top: 10%; left: -10%;
    animation: floatCloud 40s linear infinite 15s;
    opacity: 0.4;
}

@keyframes floatCloud {
    0% { transform: translateX(0); }
    100% { transform: translateX(150vw); }
}

/* =========================================
   Overlay Gradient (Fog/Fade)
   ========================================= */
.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Create a vignette effect with white edges */
    background: radial-gradient(circle at center, transparent 40%, rgba(255,255,255,0.8) 80%, #fff 100%);
    pointer-events: none;
    z-index: 5;
}

/* =========================================
   Content Styles (UI)
   ========================================= */
.splash-content {
    text-align: center;
    z-index: 10;
    padding: 0 20px;
    width: 100%;
    max-width: 480px;
    position: relative;
}

/* Logo / Icon Styles */
.logo-wrapper {
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* 3D tilt for the logo */
    transform-style: preserve-3d;
}

.map-icon {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pin-head {
    width: 70px;
    height: 70px;
    /* Use Primary Color Gradient for Pin in Light Mode */
    background: linear-gradient(135deg, var(--primary-color) 0%, #60a5fa 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: relative;
    box-shadow: -5px 5px 15px rgba(37, 99, 235, 0.4); /* Colored shadow */
    z-index: 12;
    border: 3px solid #ffffff;
}

.pin-hole {
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.pin-shadow {
    width: 40px;
    height: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    filter: blur(4px);
    animation: shadowPulse 2s infinite ease-in-out;
    z-index: 10;
}

/* Navigation Arrow */
.direction-arrow {
    position: absolute;
    bottom: -25px;
    width: 0; 
    height: 0; 
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 18px solid var(--accent-color);
    animation: bounceArrow 1.5s infinite;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.4));
    z-index: 13;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.radar-scan {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, 0.1);
    background: conic-gradient(from 0deg, transparent 0%, rgba(37, 99, 235, 0.15) 100%);
    animation: spinRadar 3s linear infinite;
    mask-image: radial-gradient(circle, transparent 40%, black 70%);
    -webkit-mask-image: radial-gradient(circle, transparent 40%, black 70%);
    z-index: 9;
}

@keyframes spinRadar {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    top: 0;
    left: 0;
    animation: pulseRing 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
    z-index: 9;
}

@keyframes shadowPulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(0.8); opacity: 0.4; }
}

@keyframes pulseRing {
    0% { transform: scale(0.5); opacity: 0; }
    50% { opacity: 0.2; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Radar Wave Effect */
.radar-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 40%, rgba(37, 99, 235, 0.2) 100%);
    border: 1px solid rgba(37, 99, 235, 0.3);
    opacity: 0;
    z-index: 1;
    animation: radarWave 3s infinite ease-out;
}

.radar-wave.delay-1 {
    animation-delay: 1.5s;
}

@keyframes radarWave {
    0% { width: 0; height: 0; opacity: 0.8; border-width: 5px; }
    100% { width: 300px; height: 300px; opacity: 0; border-width: 0; }
}

/* Floating Particles */
.particles-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(37, 99, 235, 0.4);
    border-radius: 50%;
    filter: blur(1px);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    20% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100% { transform: translateY(-120px) translateX(40px); opacity: 0; }
}

/* Typography */
.app-name {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    /* Strong white outline for readability on map */
    text-shadow: 
        3px 3px 0 #fff,
        -3px -3px 0 #fff,
        3px -3px 0 #fff,
        -3px 3px 0 #fff,
        0 0 10px rgba(255,255,255,0.8);
    letter-spacing: 1px;
    color: var(--primary-color);
    position: relative;
    z-index: 15;
}

.app-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #475569; /* Slate 600 */
    position: relative;
    z-index: 15;
}

.app-desc {
    font-size: 1rem;
    color: #64748b; /* Slate 500 */
    margin-bottom: 70px;
    line-height: 1.6;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 15;
}

/* Action Button */
.action-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 20; /* Ensure clickable */
}

.start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: #ffffff;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25); /* Softer shadow */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 60px;
    width: 240px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.start-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
    border-color: rgba(37, 99, 235, 0.3);
}

.start-btn:active {
    transform: scale(0.98);
}

.btn-text {
    flex-grow: 1;
    text-align: center;
    padding-left: 20px;
}

.btn-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color); /* Colored circle */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
    transition: transform 0.3s ease;
    color: white;
}

.start-btn:hover .btn-icon {
    transform: translateX(-5px) scale(1.1); /* Pop effect */
}

.icon-arrow {
    width: 24px;
    height: 24px;
}

/* RTL Specific adjustments */
[dir="rtl"] .start-btn .btn-text {
    padding-left: 0;
    padding-right: 20px;
}

[dir="rtl"] .start-btn .btn-icon {
    margin-right: auto; 
    margin-left: 4px;
}

[dir="rtl"] .start-btn:hover .btn-icon {
    transform: translateX(5px) scale(1.1);
}

[dir="rtl"] .icon-arrow {
    transform: rotate(180deg);
}
