* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --waze-blue: #33b5e5;
    --waze-dark: #1e2a38;
    --waze-green: #99cc00;
    --waze-red: #ff4444;
    --waze-orange: #ffbb33;
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --border: #30363d;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
}

.map-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    z-index: 1;
}

.map-tile {
    position: absolute;
    width: 256px;
    height: 256px;
    background-size: 256px 256px;
    image-rendering: pixelated;
    transition: opacity 0.15s ease;
}

.map-tile.loading {
    opacity: 0;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}

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

.menu-btn, .report-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 48px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border);
}

.search-box .search-icon {
    font-size: 16px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    right: 16px;
    top: 80px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.float-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    transition: transform 0.2s, background 0.2s;
}

.float-btn:hover, .float-btn:active {
    transform: scale(1.1);
    background: var(--waze-blue);
}

/* Traffic Indicator */
.traffic-indicator {
    position: fixed;
    left: 16px;
    top: 80px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.traffic-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--waze-green);
    animation: pulse 2s infinite;
}

.traffic-dot.heavy {
    background: var(--waze-red);
}

.traffic-dot.moderate {
    background: var(--waze-orange);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-card);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    max-height: 60vh;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.bottom-sheet.collapsed {
    transform: translateY(calc(100% - 60px));
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 2px;
    margin: 12px auto;
    cursor: pointer;
}

.sheet-content {
    padding: 0 20px 100px;
    overflow-y: auto;
    max-height: calc(60vh - 30px);
}

/* Route Info */
.route-info {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.eta-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.eta-time {
    font-size: 32px;
    font-weight: 700;
    color: var(--waze-green);
}

.eta-distance {
    font-size: 16px;
    color: var(--text-secondary);
}

.route-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.route-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(51, 181, 229, 0.1);
    border-radius: 12px;
    transition: background 0.2s;
}

.route-step:hover {
    background: rgba(51, 181, 229, 0.2);
}

.step-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.step-text {
    flex: 1;
    font-size: 14px;
}

.step-distance {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Alerts */
.alerts-list {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--waze-red);
    animation: slideIn 0.3s ease;
}

.alert-item.warning {
    background: rgba(255, 187, 51, 0.1);
    border-left-color: var(--waze-orange);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-icon {
    font-size: 24px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-location {
    font-size: 12px;
    color: var(--text-secondary);
}

.alert-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Reports Panel */
.reports-panel {
    padding: 16px 0;
}

.reports-panel h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.reports-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 12px;
}

.report-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
}

.report-info {
    flex: 1;
}

.report-type {
    font-size: 14px;
    font-weight: 600;
}

.report-distance {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Navigation Bar */
.navigation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 12px 20px 24px;
    background: linear-gradient(0deg, var(--bg-dark) 30%, transparent 100%);
    z-index: 1001;
}

.nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.2s, background 0.2s;
}

.nav-btn:hover, .nav-btn:active {
    transform: scale(1.1);
}

.nav-btn.active {
    background: var(--waze-blue);
}

/* Route Line SVG */
.route-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.route-path {
    fill: none;
    stroke: var(--waze-blue);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.route-path-alt {
    fill: none;
    stroke: rgba(51, 181, 229, 0.3);
    stroke-width: 14;
    stroke-linecap: round;
}

/* Vehicle Markers */
.vehicle-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 20;
    transition: transform 0.3s ease;
}

.vehicle-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: vehicleBounce 1s ease-in-out infinite;
}

@keyframes vehicleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.vehicle-marker.slow .vehicle-icon {
    animation: vehicleShake 0.5s ease-in-out infinite;
}

@keyframes vehicleShake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Destination Marker */
.destination-marker {
    position: absolute;
    transform: translate(-50%, -100%);
    z-index: 25;
}

.destination-icon {
    font-size: 40px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    animation: destinationPulse 2s ease-in-out infinite;
}

@keyframes destinationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.destination-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: var(--bg-card);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Speed Warning */
.speed-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    padding: 20px 40px;
    background: rgba(255, 68, 68, 0.95);
    border-radius: 16px;
    text-align: center;
    animation: speedWarningPop 0.3s ease;
    display: none;
}

.speed-warning.visible {
    display: block;
}

@keyframes speedWarningPop {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.speed-warning-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.speed-warning-text {
    font-size: 14px;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 480px) {
    .top-bar {
        padding: 10px 12px;
    }
    
    .menu-btn, .report-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .search-box {
        height: 42px;
    }
    
    .eta-time {
        font-size: 26px;
    }
    
    .step-text {
        font-size: 13px;
    }
}
