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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    overflow: hidden;
}

/* Toolbar */
#toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    z-index: 100;
}

#toolbar button {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
}

#toolbar button:hover {
    background: #f3f4f6;
}

#toolbar button:active {
    background: #e5e7eb;
}

#toolbar button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

#help-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: white;
    color: #3b82f6;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.15s ease;
    margin-left: auto;
}

#help-link:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

#toolbar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Shape toggle group */
#shape-toggle {
    display: flex;
    gap: 0;
}

#shape-toggle button {
    border-radius: 0;
}

#shape-toggle button:first-child {
    border-radius: 6px 0 0 6px;
}

#shape-toggle button:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

/* Opacity control */
#opacity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

#opacity-control label {
    font-size: 14px;
    color: #6b7280;
}

#opacity-slider {
    width: 120px;
    cursor: pointer;
}

/* Map container */
#map {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Custom cursor for drawing mode */
.drawing-mode {
    cursor: crosshair !important;
}

.drawing-mode .maplibregl-canvas {
    cursor: crosshair !important;
}

/* Overlay dragging cursor */
.dragging-overlay {
    cursor: grabbing !important;
}

.dragging-overlay .maplibregl-canvas {
    cursor: grabbing !important;
}
