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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

#controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#controls button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#controls button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

#controls button:active {
    transform: scale(0.95);
}

#attribution {
    position: absolute;
    bottom: 5px;
    right: 5px;
    left: 5px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    padding: 5px 10px;
    font-size: 11px;
    color: #333;
    text-align: center;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

#attribution a {
    color: #0066cc;
    text-decoration: none;
}

#attribution a:hover {
    text-decoration: underline;
}

#coords {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 16px;
    color: #333;
    text-align: center;
}

/* Hide MapLibre's default attribution since we have custom one */
.maplibregl-ctrl-attrib {
    display: none !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    #controls {
        top: auto;
        bottom: 40px;
        left: 10px;
    }

    #controls button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    #attribution {
        font-size: 10px;
        padding: 4px 8px;
    }

    #loading {
        padding: 15px 25px;
        font-size: 14px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    #controls button {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    #attribution {
        font-size: 9px;
        padding: 3px 6px;
    }
}

/* Fullscreen styles */
:fullscreen #map {
    width: 100vw;
    height: 100vh;
}

:fullscreen #controls {
    top: 10px;
    left: 10px;
}

:fullscreen #attribution {
    bottom: 5px;
}
