:root {
    --uber-black: #000000;
    --uber-gray-900: #121212;
    --uber-gray-800: #1f1f1f;
    --uber-gray-700: #333333;
    --uber-white: #ffffff;
    --uber-muted: #afafaf;

    --accent-red: #ff3e3e;
    --accent-yellow: #ffc043;
    --accent-green: #05d3a0;

    --shadow-deep: 0 30px 60px rgba(0, 0, 0, 0.6);
    --radius-premium: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--uber-black);
    color: var(--uber-white);
    overflow: hidden;
    height: 100vh;
}

/* --- Premium Header --- */
.top-bar {
    height: 80px;
    background: var(--uber-black);
    border-bottom: 1px solid var(--uber-gray-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1100;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

.top-nav-filters {
    display: flex;
    background: var(--uber-gray-900);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--uber-gray-800);
}

.nav-filter-item {
    padding: 8px 24px;
    border-right: 1px solid var(--uber-gray-800);
    display: flex;
    flex-direction: column;
}

.nav-filter-item:last-child {
    border-right: none;
}

.nav-filter-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--uber-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.nav-filter-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--uber-white);
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
}

/* --- Layout Grid --- */
.main-grid {
    display: flex;
    height: calc(100vh - 80px);
}

.sidebar {
    width: 320px;
    background: var(--uber-black);
    border-right: 1px solid var(--uber-gray-800);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    overflow-y: auto;
}

.sidebar-group h4 {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--uber-muted);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.main-content {
    flex: 1;
    position: relative;
    background: var(--uber-black);
}

/* --- Floating Map UI --- */
.map-view-container {
    position: absolute;
    inset: 0;
    z-index: 10;
}

#map {
    width: 100%;
    height: 100%;
}

.map-tabs-float {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background: var(--uber-white);
    padding: 4px;
    border-radius: 4px;
    box-shadow: var(--shadow-deep);
    z-index: 1000;
}

.tab-btn-float {
    padding: 12px 28px;
    background: transparent;
    border: none;
    color: #444;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    border-radius: 2px;
}

.tab-btn-float.active {
    background: var(--uber-black);
    color: var(--uber-white);
}

.floating-card {
    position: absolute;
    background: var(--uber-white);
    color: var(--uber-black);
    padding: 32px;
    width: 360px;
    border-radius: 4px;
    box-shadow: var(--shadow-deep);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.legend-card {
    bottom: 32px;
    left: 32px;
    width: 240px;
    padding: 24px;
}

.incident-card {
    top: 32px;
    right: 32px;
}

/* --- Feed Items --- */
.tab-content {
    padding: 60px 80px;
    height: 100%;
    overflow-y: auto;
    display: none;
}

.tab-content.active {
    display: block;
}

.feed-item {
    background: var(--uber-gray-900);
    border: 1px solid var(--uber-gray-800);
    padding: 40px;
    margin-bottom: 24px;
    border-radius: 4px;
}

.surge-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent-red);
    color: white;
    font-weight: 900;
    font-size: 11px;
    border-radius: 4px;
    margin-right: 12px;
}

/* Stats */
.stat-mini {
    margin-bottom: 24px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--uber-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
}

@keyframes pulse-critical {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 20px 10px rgba(255, 59, 48, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

.surge-marker {
    background: #222;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 11px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.surge-marker.high {
    background: #ff3b30;
    border-color: rgba(255, 255, 255, 0.3);
    animation: pulse-critical 2s infinite;
}

.surge-marker.medium {
    background: #ff9500;
    color: white;
}

.surge-marker.low {
    background: #34c759;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
}

.modal-content {
    background: var(--uber-black);
    width: 480px;
    margin: 10% auto;
    padding: 40px;
    border: 1px solid var(--uber-gray-800);
}

.btn-primary {
    background: var(--uber-white);
    color: var(--uber-black);
    padding: 16px;
    border: none;
    font-weight: 900;
    cursor: pointer;
    width: 100%;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--uber-gray-700);
}