body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
}

:root {
    --bg: #f2f2f2;
    --panel-bg: #ffffff;
    --text: #222;
    --border: #cccccc;
    --shadow: rgba(0,0,0,0.15);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --panel-bg: #1f1f1f;
        --text: #eee;
        --border: #333;
        --shadow: rgba(0,0,0,0.5);
    }
}

/* Top bar */
#topBar {
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}

/* Map */
#map {
    position: absolute;
    top: 80px;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Side panel */
#sidePanel {
    position: absolute;
    right: 10px;
    top: 90px;
    width: 280px;
    height: calc(100vh - 110px);
    overflow-y: auto;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--shadow);
    padding: 15px;
    z-index: 9999;
}

#sidePanel.collapsed {
    height: 45px;
    overflow: hidden;
}

#sidePanel h5 {
    margin: 0 0 10px 0;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

/* Crime list */
#crimeList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#crimeList li {
    padding: 10px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    cursor: pointer;
}

#crimeList li:hover {
    background: #ffffff35;
}

/* Time slider */
.timeline-box {
    display: flex;
    flex-direction: column;
    width: 240px;
}

#timeSlider {
    width: 100%;
}

#timeSliderLabels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    margin-top: 4px;
}

/* MOBILE STYLES */
@media (max-width: 768px) {
    #topBar {
        flex-direction: column;
        gap: 10px;
        padding-bottom: 15px;
    }

    .filters-wrapper {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    #map {
        top: 260px !important;
    }

    #sidePanel {
        width: 100%;
        right: 0;
        left: 0;
        bottom: 0;
        top: auto;
        border-radius: 12px 12px 0 0;
        height: 40vh;
        z-index: 99999;
    }

    .timeline-box {
        width: 100%;
    }
}
