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

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

#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

.leaflet-container {
    background: #f5f5f5;
}

/* District polygon hover animations */
.leaflet-interactive {
    transition: fill 0.3s ease, fill-opacity 0.3s ease, transform 0.2s ease;
    transform-origin: center center;
    transform-box: fill-box;
}

.leaflet-interactive.hover-lift {
    transform: scale(1.03);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.overlay {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 10000;
    text-align: center;
    pointer-events: none;
}

.overlay-top {
    top: 20px;
}

.top-panel {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

.score-display {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 8px;
}

.score-display strong {
    color: #333;
}

.high-score {
    margin-left: 16px;
    color: #777;
}

h1 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* Dark mode toggle button */
.dark-mode-btn {
    margin-left: 16px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-mode-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode-btn .icon-dark {
    display: none;
}

/* Dark mode styles */
body.dark-mode .leaflet-container {
    background: #1a1a2e;
}

body.dark-mode .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9);
}

body.dark-mode .top-panel {
    background: rgba(30, 30, 46, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark-mode .score-display {
    color: #aaa;
}

body.dark-mode .score-display strong {
    color: #eee;
}

body.dark-mode .high-score {
    color: #888;
}

body.dark-mode h1 {
    color: #eee;
}

body.dark-mode .dark-mode-btn {
    border-color: #555;
    color: #eee;
}

body.dark-mode .dark-mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .dark-mode-btn .icon-light {
    display: none;
}

body.dark-mode .dark-mode-btn .icon-dark {
    display: inline;
}

