/* Map Styles */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: transparent;
}

#map, #cjj-map {
    width: 100%;
    height: 100%;
    background-color: #0b1426; 
}

/* Custom map styles for dark mode */
.leaflet-layer,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
    filter: brightness(80%) contrast(110%); /* Make map even darker to blend into the wall */
}

/* --- Layer Control Panel (Shared from Replay) --- */
.layer-control-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.layer-toggle-btn {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f1f5f9;
    transition: all 0.2s;
}

.layer-toggle-btn:hover {
    background: rgba(40, 40, 40, 1);
    transform: scale(1.05);
}

.layer-toggle-btn.active {
    background: #3b82f6; /* Blue 500 */
    border-color: #60a5fa;
    color: #fff;
}

.glass-panel {
    background: rgba(20, 20, 20, 0.95);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 3px solid #3b82f6;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 12px;
    color: #e2e8f0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 220px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 4px;
    color: #f8fafc;
    letter-spacing: 0.5px;
}

.panel-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

/* Custom Checkboxes */
.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: color 0.2s;
}
.custom-checkbox-label:hover {
    color: #fff;
}

.custom-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 16px;
    width: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.custom-checkbox-label:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.15);
}

.custom-checkbox-label input:checked ~ .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.sub-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 24px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

