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

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

#map {
    width: 100vw;
    height: 100vh;
}

/* Move Leaflet attribution above the bottom panel */
.leaflet-bottom {
    bottom: 100px !important;
}

/* Search Control */
.search-control {
    position: absolute;
    top: 10px;
    left: 60px;
    z-index: 1000;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-control input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 250px;
    outline: none;
}

.search-control input:focus {
    border-color: #4CAF50;
}

.search-control button {
    padding: 8px 12px;
    background: white;
    color: white;
    border: 1px solid lightgray;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.search-control button:hover {
    background: lightgray;
}

.settings-btn {
    display: none;
}

/* Settings Panel */
.settings-panel {
    position: absolute;
    top: 60px;
    left: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.settings-panel.hidden {
    display: none;
}

.settings-panel label {
    font-weight: 500;
    color: #333;
}

.settings-panel select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.settings-panel select:focus {
    outline: none;
    border-color: #4CAF50;
}

.settings-panel span {
    color: #666;
}

/* Selector Control */
.selector-control {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.selector-control label {
    font-weight: 500;
    color: #333;
}

.selector-control select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.selector-control select:focus {
    outline: none;
    border-color: #4CAF50;
}

.selector-control span {
    color: #666;
}

/* Info Panel */
.info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    max-height: 60vh;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.info-panel.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
}

.close-btn:hover {
    color: #333;
}

#info-content h3 {
    margin-bottom: 12px;
    color: #333;
    padding-right: 20px;
}

.laureate-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.laureate-info:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.laureate-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.laureate-details {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.laureate-details p {
    margin: 4px 0;
}

.prize-item {
    margin: 8px 0;
    padding-left: 12px;
    border-left: 3px solid #4CAF50;
}

.prize-item strong {
    color: #2c3e50;
}

.prize-link {
    display: inline-block;
    margin-top: 4px;
    color: #2196F3;
    text-decoration: none;
    font-size: 13px;
}

.prize-link:hover {
    text-decoration: underline;
}

.distance {
    font-weight: 600;
    color: #FF5722;
    margin-top: 8px;
}

/* Instructions */
.instructions {
    position: absolute;
    top: 70px;
    right: 10px;
    z-index: 1000;
    background: white;
    /*color: white;*/
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    max-width: 250px;
    text-align: left;
    animation: fadeIn 0.5s ease;
    transition: all 0.3s ease;
}

.instructions strong {
    color: black;
}

#instructions-full {
    text-align: left;
    line-height: 1.6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
    border-radius: 6px;
    padding: 8px;
}

.leaflet-popup-content {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* Hide close button on all popups */
.leaflet-popup-close-button {
    display: none !important;
}

/* Click Location Panel */
.click-location-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100px;
    z-index: 2000;
    background: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.click-location-panel.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

#click-location-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Ensure click location popup is always on top */
.click-location-popup {
    z-index: 1000 !important;
}

/* Click marker pulse animation */
.click-marker-pulse {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.click-marker-core {
    width: 16px;
    height: 16px;
    background-color: #2196F3;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.6);
    position: relative;
    z-index: 2;
}

.click-marker-pulse::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(33, 150, 243, 0.4);
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
    z-index: 1;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-control {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .search-control input {
        width: 100%;
        flex: 1;
    }

    /* Show settings button on mobile */
    .settings-btn {
        display: block !important;
    }

    /* Hide desktop selector on mobile */
    .selector-control {
        display: none !important;
    }

    .instructions {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 12px;
    }

    .info-panel {
        left: 10px;
        right: 10px;
        bottom: 80px;
        max-width: none;
        max-height: 50vh;
    }

    /* Hide Leaflet zoom controls on mobile */
    .leaflet-control-zoom {
        display: none !important;
    }
}
