* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    color: #e0e0e0;
}

.container {
    display: flex;
    height: 100vh;
    background-color: #1a1a1a;
    position: relative;
}

.controls {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background-color: rgba(42, 42, 42, 0.7);
    padding: 20px;
    overflow-y: auto;
    border-left: 2px solid #3a3a3a;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.controls.hidden {
    transform: translateX(280px);
}

.controls h1 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #4a9eff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #4a9eff;
    padding-bottom: 10px;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slider-group label {
    font-size: 13px;
    color: #b0b0b0;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.slider-group label span {
    color: #4a9eff;
    font-weight: bold;
    min-width: 35px;
    text-align: right;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #3a3a3a;
    outline: none;
    transition: background 0.2s;
}

.slider:hover {
    background: #454545;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider::-webkit-slider-thumb:hover {
    background: #6bb3ff;
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb:hover {
    background: #6bb3ff;
    transform: scale(1.1);
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button {
    padding: 12px 20px;
    font-size: 14px;
    background-color: #4a9eff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #6bb3ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

#saveBtn {
    background-color: #3a8a3a;
}

#saveBtn:hover {
    background-color: #4aa94a;
}

#mapCanvas {
    flex: 1;
    background-color: #000000;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    width: 100%;
    height: 100vh;
}

/* Toggle button */
.toggle-btn {
    position: fixed;
    right: 290px;
    top: 20px;
    width: 40px;
    height: 40px;
    background-color: #4a9eff;
    border: none;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background-color: #6bb3ff;
    transform: translateX(-3px);
}

.toggle-btn.hidden-panel {
    right: 10px;
}

.toggle-btn::before {
    content: '\203A';
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.toggle-btn.hidden-panel::before {
    content: '\2039';
}

/* Scrollbar styling for controls panel */
.controls::-webkit-scrollbar {
    width: 8px;
}

.controls::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.controls::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

.controls::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

/* Checkbox styling */
.checkbox-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #3a3a3a;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #b0b0b0;
    font-weight: 500;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background-color: #3a3a3a;
    border: 2px solid #4a4a4a;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    background-color: #454545;
    border-color: #5a5a5a;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #4a9eff;
    border-color: #4a9eff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}