

html, body {
    height: 100%;
    margin: 0;
    background: #f3f6fd;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}
#map {
    height: 100vh;
    width: 100vw;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 8px 32px rgba(60,60,100,0.15);
}
.leaflet-control-geocoder input {
    width: 320px!important;
    height: 36px!important;
    font-size: 18px!important;
    border-radius: 8px!important;
    border: 1px solid #cfd8dc!important;
}
.leaflet-control {
    background: rgba(250, 253, 255, 0.94)!important;
    border-radius: 10px!important;
    box-shadow: 0 2px 6px rgba(60,60,100,0.05)!important;
}
.update-time {
    position: absolute;
    bottom: 22px;
    left: 22px;
    padding: 10px 22px;
    background: rgba(250,250,255,0.97);
    border-radius: 12px;
    font-size: 16px;
    color: #34495e;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(60,60,100,0.06);
    border: 1px solid #cfd8dc;
    z-index: 1000;
}
.leaflet-popup-content h3 {
    color: #34495e;
    margin-bottom: 8px;
}
.alert-popup, .storm-popup, .hurricane-popup {
    font-family: inherit;
    font-size: 1em;
    color: #222b3a;
}
.alert-polygon {
    stroke-dasharray: 5,3;
    filter: drop-shadow(0 2px 2px rgba(52,73,94,0.13));
}
.track-icon {
    filter: drop-shadow(0 2px 4px rgba(52,73,94,0.17));
}
.direction-arrow {
    stroke: #34495e;
    opacity: 0.7;
}
.leaflet-control-layers {
    box-shadow: 0 3px 14px rgba(60,60,100,0.07)!important;
}

/* Custom pretty toggles for layers */
.custom-layer-toggle {
    user-select: none;
    min-width: 0;
    width: auto;
    padding: 0;
}
.pretty-toggle {
    position: relative;
    cursor: pointer;
    min-height: 28px;
    font-size: 15px;
}
.pretty-toggle input[type="checkbox"] {
    display: none;
}
.pretty-toggle .toggle-slider {
    position: relative;
    width: 38px;
    height: 20px;
    background: #dde3f5;
    border-radius: 12px;
    margin-right: 6px;
    transition: background 0.2s;
    display: inline-block;
    vertical-align: middle;
}
.pretty-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: linear-gradient(90deg, #59bfff 0%, #2ecc71 100%);
}
.pretty-toggle .toggle-slider:before {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(60,60,100,0.12);
    transition: left 0.18s cubic-bezier(.4,2.3,.3,1), background 0.2s;
}
.pretty-toggle input[type="checkbox"]:checked + .toggle-slider:before {
    left: 20px;
    background: #eafaf1;
}
.pretty-toggle input[type="checkbox"]:focus + .toggle-slider {
    outline: 2px solid #2980b9;
    outline-offset: 2px;
}

/* Collapsible icon-only button */
.layer-collapse-btn {
    background: none;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 8px;
    user-select: none;
}
.layer-collapse-btn:active, .layer-collapse-btn:focus {
    background: #f5faff;
}
.layer-toggle-content {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: rgba(255,255,255,0.97);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(60,60,100,0.09);
    padding: 15px 14px;
    z-index: 9999;
    flex-direction: column;
    gap: 10px;
    min-width: 170px;
}

@media (max-width: 600px) {
    .leaflet-control-geocoder input { width: 120px!important; font-size: 13px!important; }
    .update-time { font-size: 12px; padding: 6px 10px; bottom: 8px; left: 8px; }
    .custom-layer-toggle { min-width: 0 !important; }
    .pretty-toggle span { font-size: 12px !important; }
    .layer-collapse-btn { font-size: 14px; width: 34px; height: 34px; min-width: 34px; min-height: 34px;}
    .layer-toggle-content { padding: 8px 5px; min-width: 112px !important;}
}