/* --- SECTION 5: CITY PLAYGROUND --- */
#city-playground.full-screen-section {
    padding: 0;
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: block;
}

#city-map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 0;
}

.city-dashboard {
    width: 100%;
    height: 100%;
    position: relative;
    pointer-events: none;
}

.city-sidebar {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 380px;
    /* Slightly wider */
    max-height: calc(100vh - 4rem);
    overflow-y: auto;

    /* Modern Glass Effect */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    /* More rounded */
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;

    pointer-events: auto;
    z-index: 100;
    font-family: 'Inter', sans-serif;
}

.sidebar-header h2 {
    font-size: 1.8rem !important;
    font-weight: 800;
    margin-bottom: 0.5rem !important;
    color: #111;
    letter-spacing: -0.5px;
}

.sidebar-header p {
    font-size: 1rem !important;
    color: #666 !important;
    line-height: 1.5;
}

.slider-group {
    margin-bottom: 1.2rem;
    /* Reduced from 2rem */
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    /* Reduced from 0.8rem */
    font-size: 0.8rem;
    /* Slightly smaller text */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #444;
}

.slider-group label span {
    background: #eee;
    padding: 0px 6px;
    border-radius: 4px;
    color: #000;
    font-size: 0.75rem;
}

.city-filters.panel,
.city-leaderboard.panel {
    box-shadow: none;
    border: none;
    padding: 0;
    background: transparent;
}

.city-filters.panel {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle divider */
    padding-bottom: 1rem;
}

/* Search Box */
.search-wrapper {
    margin-bottom: 2rem;
    position: relative;
    z-index: 101;
}

.search-input-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    /* Larger radius */
    padding: 1rem 1.2rem;
    /* Much larger padding */
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Default lift */
}

.search-input-box:focus-within {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.search-input-box svg {
    width: 20px;
    height: 20px;
    stroke: #999;
}

#city-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding-left: 1rem;
    outline: none;
    font-size: 1.1rem;
    /* Larger font */
    font-family: 'Inter', sans-serif;
    color: #333;
    font-weight: 500;
}

#city-search-input::placeholder {
    color: #bbb;
}

#search-clear-btn {
    border: none;
    background: transparent;
    /* No background */
    cursor: pointer;
    color: #999;
    display: none;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    /* Slightly larger text size for the X */
    font-weight: 400;
    margin-left: 5px;
}

#search-clear-btn:hover {
    background: transparent;
    color: #333;
}

/* Results Dropdown */
.search-results-list {
    position: absolute;
    top: calc(100% + 10px);
    /* Gap */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    list-style: none;
    padding: 8px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: none;
}

.search-results-list li {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 8px;
    color: #333;
    transition: background 0.1s;
    font-weight: 500;
}

.search-results-list li:hover {
    background: #f0f2f5;
    color: #111;
}

input[type=range] {
    width: 100%;
    accent-color: #000;
    /* Modern browser support */
    cursor: pointer;
}

.city-leaderboard {
    padding: 0 !important;
}

.leaderboard-header {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 0.8rem;
    padding-left: 4px;
}

/* Leaderboard Cards */
.city-card {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 12px;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.city-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.city-card:last-child {
    margin-bottom: 0;
}

.city-rank {
    font-weight: 800;
    color: #ccc;
    font-size: 0.9rem;
}

.city-rank.top-3 {
    color: #FFD700;
    /* Gold */
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.city-name {
    font-weight: 600;
    font-size: 1rem;
    color: #222;
}

.city-score {
    text-align: right;
    font-family: 'Oswald', sans-serif;
    /* Use the nice number font */
    font-size: 1.2rem;
    font-weight: 500;
    color: #0095f6;
    /* Accent Blue */
    background: rgba(0, 149, 246, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Mapbox Popups */
.mapboxgl-popup {
    font-family: 'Inter', sans-serif;
    z-index: 1000;
    max-width: 250px;
}

.mapboxgl-popup-content {
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: none;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.mapboxgl-popup-close-button {
    display: none;
}

.popup-city {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #000;
}

.popup-score {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 8px;
}

.popup-score strong {
    color: #0095f6;
}

.popup-detail {
    font-size: 0.75rem;
    color: #666;
    margin-top: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.popup-stat {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}