body {
    margin: 0;
    padding: 0;
}

/* set color variables */
:root {
    --orange: #fb8500;
    --red: #952127;
    --blue: #1da0e2;
    --yellow: #ffff00;
    --purple: #dc00ff;
    --green: #168f0f;
    --white: #ffffff;
    --black: #000000;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

/* Winner modal styles */
.modal {
    position: fixed;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    width: min(520px, 90%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 14px;
    border: none;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

#modal-title {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
}

#modal-body {
    margin: 0;
    font-size: 1rem;
}

#resolution {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    border-radius: 5%;
    background-color: aliceblue;
    border: none;
    color: #333;
    padding: 10px 20px;
    font-size: 0.75em;
    width: 100px;
}

/* play again button */
#play-again {
    position: relative;
    margin: 0 auto;
    /* right: 60%; */
    z-index: 1;
    display: none;
}

/* Controls panel (floating upper-left) */
#controls {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    align-items: stretch;
}

/* layout for each control row */
.control-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* small label on control rows */
.control-label {
    font-size: 0.85rem;
    color: #222;
    margin-left: 4px;
    flex: 1;
}

/* numeric value display */
.control-value {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    color: #222;
}


/* range slider styling */
#resolution-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, #bbb, #ddd);
    outline: none;
}

#resolution-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #666;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* adjust previously defined .switch sizing to fit panel */
.switch {
    display: inline-block;
    width: 52px;
    height: 28px;
    position: relative;
}



/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 6px;
    bottom: 0;
    background-color: var(--red);
    /* #fb8500; */
    -webkit-transition: .4s;
    transition: .4s;
}

/* Keep existing slider styles but adjust transform distance to new width */
.slider:before {
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
}

input:checked+.slider:before {
    transform: translateX(24px);
}


input:checked+.slider {
    background-color: var(--blue)
        /* #023047; */
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--blue);
    /* #023047; */
}

input:checked+.slider:before {
    -webkit-transform: translateX(56px);
    -ms-transform: translateX(56px);
    transform: translateX(56px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

#submit {
    position: absolute;
    top: 60px;
    left: 10px;
    z-index: 1;
    border-radius: 5%;
    background-color: rgb(22, 138, 15);
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 0.75em;
    width: 100px;
}

.mapboxgl-popup {
    max-width: 400px;
    font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
    padding-bottom: 20px;
}

.mapboxgl-popup,
img {
    max-width: 100%;
}

.mapboxgl-popup-content {
    border-radius: 10px;
}

.mapboxgl-popup-content img {
    background-color: rgba(255, 255, 255, 1);
}

.mapboxgl-popup-content a {
    line-height: 2em;
    color: #0b2a3f;
}

.mapboxgl-popup-content h2,
p {
    margin-bottom: 5px;
}

/* Styles for blue popup */
.mapboxgl-popup-content {
    color: #0b2a3f;
    background: #FFF;
}

.mapboxgl-popup-tip {
    border-top-color: #FFF;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
    border-top-color: #FFF;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
    border-bottom-color: #FFF;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    border-right-color: #FFF;
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    border-left-color: #FFF;
}

.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip {
    border-bottom-color: #FFF;
}

.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
    border-bottom-color: #FFF;
}

.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip {
    border-top-color: #FFF;
}

.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
    border-top-color: #FFF;
}