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

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

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay p {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: #4a90d9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Info panel */
.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    padding: 20px;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.info-panel.hidden {
    transform: translateX(320px);
    opacity: 0;
    pointer-events: none;
}

.info-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-close:hover {
    background: #f0f0f0;
    color: #333;
}

.info-panel h3 {
    margin-bottom: 15px;
    color: #1a1a2e;
    font-size: 1.3rem;
    padding-right: 20px;
}

.info-content p {
    margin-bottom: 8px;
    color: #444;
    font-size: 0.95rem;
}

.info-content strong {
    color: #222;
}

/* Leaflet overrides - river styling handled in JS */
.france-river {
    stroke: #2563eb;
    stroke-width: 2;
    stroke-opacity: 0.8;
    fill: none;
}

.france-river:hover {
    stroke: #1d4ed8;
    stroke-width: 3;
    stroke-opacity: 1;
}

/* River labels */
.river-label {
    font-size: 11px;
    font-weight: 600;
    color: #1e40af;
    text-shadow: 1px 1px 1px white, -1px -1px 1px white, 1px -1px 1px white, -1px 1px 1px white;
    pointer-events: none;
}

/* Error display */
.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: center;
    z-index: 1000;
    color: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
    .info-panel {
        top: auto;
        bottom: 0;
        right: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 40vh;
        overflow-y: auto;
    }

    .info-panel.hidden {
        transform: translateY(100%);
    }
}
