body {
    margin: 0;
    overflow: hidden;
    background-color: #f7f7f7;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    display: block;
}

/* --- UI STYLES --- */
#menu-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #444;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: #00ff88;
}

#menu-btn:hover {
    background: rgba(50, 50, 50, 1);
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

#menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

#ui-container {
    position: absolute;
    top: 75px;
    left: 20px;
    background: rgba(30, 30, 30, 0.9);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    width: 280px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    transform-origin: top left;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
    z-index: 1000;
}

#ui-container.hidden {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
    visibility: hidden;
    pointer-events: none;
}

h1 {
    font-size: 18px;
    margin: 0 0 15px 0;
    text-align: center;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group {
    margin-bottom: 15px;
}

label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 5px;
    color: #eee;
}

/* Color Picker Style */
input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    background: none;
    padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Round Checkbox Style */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    flex-shrink: 0;
}

input[type="checkbox"]:checked {
    background-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    border-color: #fff;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    color: #003322;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

input[type="checkbox"]:hover {
    transform: scale(1.1);
}

#stats {
    margin-top: 15px;
    font-size: 12px;
    color: #aaa;
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 10px;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    pointer-events: none;
    display: none;
    color: #333;
    font-weight: bold;
}

.color-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* --- MARKER AND INFO BOX STYLES --- */
#markers-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.marker-wrapper {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -16px);
    z-index: 500;
    pointer-events: none;
    transition: transform 0.1s;
}

.marker-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 255, 136, 0.9);
    border: 2px solid white;
    border-radius: 50%;
    color: #003322;
    font-weight: bold;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding-bottom: 3px;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    transition: transform 0.3s, background 0.3s;
}

.marker-btn:hover {
    background: white;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.marker-label {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    pointer-events: auto;
    backdrop-filter: blur(2px);
}

#info-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 300px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#info-card.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

#info-card h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

/* Card body text style */
#info-card p {
    color: #555;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-link {
    display: inline-block;
    background: #0044aa;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-link:hover {
    background: #003388;
}

.close-card {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-card:hover {
    color: #333;
}