/* Reset en basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f0f1a;
    color: #fff;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth transitions globally */
*, *::before, *::after {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    animation: appFadeIn 0.6s ease forwards;
    animation-delay: 0.1s;
}

@keyframes appFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== */
/* Welcome Modal Styles */
/* ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

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

.modal-content {
    background: linear-gradient(145deg, #1e1e2e 0%, #16162a 100%);
    border-radius: 24px;
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(255, 255, 255, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(1) translateY(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.9) translateY(20px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(79, 172, 254, 0.4);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 32px rgba(79, 172, 254, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 12px 40px rgba(79, 172, 254, 0.5); }
}

.modal-icon svg {
    width: 36px;
    height: 36px;
    color: #fff;
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #a8c0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.modal-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-features .feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.modal-features .feature:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.modal-features .feature svg {
    width: 20px;
    height: 20px;
    color: #4facfe;
    flex-shrink: 0;
}

.modal-features .feature span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.modal-tip {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 28px;
    padding: 12px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79, 172, 254, 0.45);
}

.modal-btn:hover::before {
    opacity: 1;
}

.modal-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.3);
}

.modal-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.modal-btn:hover svg {
    transform: translateX(4px);
}

.modal-remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease;
}

.modal-remember:hover {
    color: rgba(255, 255, 255, 0.6);
}

.modal-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4facfe;
    cursor: pointer;
}

/* Header */
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(22, 33, 62, 0.95) 0%, rgba(15, 15, 26, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 1000;
}

#header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

#current-date-display {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

/* Map Container */
#map-container {
    flex: 1;
    position: relative;
    min-height: 0;
    overflow: visible;
}

#map {
    width: 100%;
    height: 100%;
    background: #e8e8e8;
}

/* Map Layer Selector - Dropdown */
#layer-selector {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
}

#layer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    color: #333;
}

#layer-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

#layer-toggle:hover {
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

#layer-toggle:hover svg {
    transform: rotate(15deg);
}

#layer-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#layer-dropdown {
    display: none;
    position: absolute;
    top: 48px;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    overflow: hidden;
    min-width: 160px;
}

#layer-dropdown.open {
    display: block;
    animation: dropdownSlide 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.layer-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
}

.layer-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
}

.layer-btn:hover {
    background: rgba(79, 172, 254, 0.08);
}

.layer-btn:hover::before {
    height: 60%;
}

.layer-btn.active {
    background: rgba(79, 172, 254, 0.12);
    color: #4facfe;
    font-weight: 600;
}

.layer-btn.active::before {
    height: 70%;
}

.layer-btn .layer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.layer-btn:hover .layer-icon,
.layer-btn.active .layer-icon {
    background: rgba(79, 172, 254, 0.2);
}

.layer-btn .layer-icon svg {
    width: 16px;
    height: 16px;
}

.layer-btn .layer-name {
    flex: 1;
    font-weight: 500;
}

.layer-group-label {
    padding: 8px 16px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(0,0,0,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.layer-group-label:not(:first-child) {
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-top: 4px;
    padding-top: 12px;
}

/* Loading Indicator */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(22, 33, 62, 0.95);
    padding: 24px 32px;
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

#loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #4facfe;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Time Control - Overlay over map */
#time-control {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(22, 33, 62, 0.95) 0%, rgba(15, 15, 26, 0.98) 100%);
    padding: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#time-control.collapsed {
    transform: translateY(calc(100% - 8px));
}

/* Toggle button - handle bar at top of time control */
#time-control-toggle {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: rgba(22, 33, 62, 0.9);
    border: 1px solid rgba(255,255,255,0.15);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s ease;
    z-index: 1001;
}

#time-control-toggle::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
    transition: all 0.3s ease;
}

#time-control-toggle:hover {
    background: rgba(40, 55, 90, 0.95);
    color: #fff;
}

#time-control-toggle:hover::before {
    background: rgba(79, 172, 254, 0.8);
    width: 30px;
}

#time-control-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 2px;
    opacity: 0;
}

#time-control-inner {
    padding: 10px 16px 12px;
    transition: all 0.3s ease;
}

#time-control.collapsed #time-control-inner {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

/* Mode Toggle - Floating pill above time control */
#mode-toggle {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 32px;
    display: flex;
    gap: 3px;
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1002;
}

.mode-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

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

.mode-btn.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(79, 172, 254, 0.4);
    animation: modeActivate 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modeActivate {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#slider-labels {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

#slider-date-label {
    font-size: 0.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

#slider-date-label.changing {
    animation: labelPop 0.3s ease-out;
}

@keyframes labelPop {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

#slider-time-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    transition: all 0.3s ease;
}

#slider-container {
    padding: 0 8px;
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#time-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    position: relative;
}

#time-slider::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, 
        rgba(79, 172, 254, 0.3) 0%, 
        rgba(0, 242, 254, 0.3) 100%);
    border-radius: 6px;
    height: 6px;
}

#time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.5), 0 0 0 3px rgba(255,255,255,0.1);
    transition: all 0.2s ease;
    margin-top: -8px;
}

#time-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.6), 0 0 0 4px rgba(255,255,255,0.15);
}

#time-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

#time-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.5);
}

#time-slider::-moz-range-track {
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    height: 6px;
}

/* Day Buttons */
#day-buttons {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#day-buttons::-webkit-scrollbar {
    display: none;
}

.day-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.day-btn:hover {
    background: rgba(79, 172, 254, 0.15);
    border-color: rgba(79, 172, 254, 0.3);
    color: #fff;
    border-color: rgba(79, 172, 254, 0.4);
}

.day-btn.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* Weather Marker Styles */
.weather-marker {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 3px 5px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 1;
    transform-origin: center bottom;
}

.weather-marker.updating {
    animation: markerPulse 0.4s ease-out;
}

@keyframes markerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.weather-marker.fade-out {
    opacity: 0;
    transform: scale(0.5) translateY(10px);
}

.weather-marker.fade-in {
    animation: markerPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes markerPopIn {
    0% { opacity: 0; transform: scale(0.3) translateY(20px); }
    60% { opacity: 1; transform: scale(1.1) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.weather-marker:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 1000 !important;
}

.weather-marker .city-name {
    font-size: 0.5rem;
    color: #555;
    text-align: center;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.weather-marker .weather-icon {
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
    transition: transform 0.3s ease;
}

.weather-marker:hover .weather-icon {
    transform: scale(1.1);
}

.weather-marker .temperature {
    font-size: 0.6rem;
    font-weight: 700;
    color: #333;
    transition: all 0.3s ease;
}

/* Temperature colors */
.temp-freezing { color: #2980b9; }
.temp-cold { color: #3498db; }
.temp-cool { color: #1abc9c; }
.temp-mild { color: #27ae60; }
.temp-warm { color: #f39c12; }
.temp-hot { color: #e67e22; }
.temp-very-hot { color: #e74c3c; }

/* Popup styles */
.leaflet-popup-content-wrapper {
    background: rgba(22, 33, 62, 0.98);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.leaflet-popup-tip {
    background: rgba(22, 33, 62, 0.98);
}

.leaflet-popup-content {
    margin: 14px 18px;
}

.popup-content {
    text-align: center;
}

.popup-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #4facfe;
}

.popup-content .popup-icon {
    font-size: 2.5rem;
    margin: 8px 0;
}

.popup-content .popup-temp {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.popup-content .popup-details {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    #header {
        padding: 10px 16px;
    }
    
    #header h1 {
        font-size: 1.1rem;
    }
    
    #current-date-display {
        font-size: 0.85rem;
    }
    
    /* Time control moet absoluut blijven op mobiel */
    #time-control {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    #time-control-inner {
        padding: 8px 12px 10px;
    }
    
    
    #time-control-toggle {
        top: -18px;
        width: 50px;
        height: 18px;
    }
    
    #mode-toggle {
        margin-bottom: 28px;
    }
    
    #slider-labels {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    #slider-date-label {
        font-size: 0.85rem;
    }
    
    #slider-time-label {
        font-size: 0.8rem;
    }
    
    .day-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .weather-marker .city-name {
        font-size: 0.5rem;
    }
    
    .weather-marker .weather-icon {
        font-size: 1.4rem;
    }
    
    .weather-marker .temperature {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    #header h1 {
        font-size: 1rem;
    }
    
    #time-control-inner {
        padding: 6px 10px 8px;
    }
    
    #mode-toggle {
        margin-bottom: 24px;
        border-radius: 12px;
    }
    
    .mode-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    #slider-container {
        margin-bottom: 8px;
    }
    
    #time-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .day-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* Park4Night Controls */
#p4n-controls {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateX(-100px);
    z-index: 1000;
    display: flex;
    gap: 8px;
    align-items: center;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#p4n-controls.visible {
    opacity: 1;
    pointer-events: auto;
}

@keyframes controlsSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#p4n-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 14px;
    color: #333;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

#p4n-search-btn .btn-text-short {
    display: none;
    opacity: 0;
}

#p4n-search-btn.compact .btn-text-full {
    animation: textFadeOut 0.8s ease forwards;
}

#p4n-search-btn.compact .btn-text-short {
    display: inline;
    animation: textFadeIn 0.8s ease forwards;
    animation-delay: 0.4s;
}

@keyframes textFadeOut {
    0% {
        opacity: 1;
        transform: translateX(0);
        max-width: 200px;
    }
    50% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 0;
        transform: translateX(-10px);
        max-width: 0;
        display: none;
    }
}

@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

#p4n-search-btn:hover {
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

#p4n-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#p4n-search-btn .icon {
    display: flex;
    align-items: center;
    color: #2ecc71;
}

#p4n-search-btn .icon svg {
    width: 18px;
    height: 18px;
}

#p4n-search-btn .icon svg.spin {
    animation: spin 1s linear infinite;
    color: #333;
}

#p4n-search-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

#p4n-clear-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    transition: all 0.25s ease;
}

#p4n-clear-btn svg {
    width: 16px;
    height: 16px;
}

#p4n-clear-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

#p4n-clear-btn:active {
    transform: scale(1);
}

#p4n-clear-btn.visible {
    display: flex;
    animation: btnPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes btnPopIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Park4Night Markers */
.p4n-marker {
    background: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    border: 2px solid #2ecc71;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.p4n-marker:hover {
    transform: scale(1.2);
}

.p4n-marker img {
    width: 16px;
    height: 16px;
}

/* Park4Night Popup */
.p4n-popup .leaflet-popup-content-wrapper {
    background: #fff;
    color: #333;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    max-width: 320px;
}

.p4n-popup .leaflet-popup-content {
    margin: 0;
    width: 300px !important;
}

.p4n-popup .leaflet-popup-tip {
    background: #fff;
}

.p4n-popup-content {
    display: flex;
    flex-direction: column;
}

/* Photo carousel - swipeable */
.p4n-photo-carousel {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.p4n-photo-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.p4n-photo-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.p4n-photo-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p4n-photo-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.p4n-photo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.p4n-photo-dot.active {
    background: #fff;
}

.p4n-photo-counter {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
}

.p4n-popup-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #eee;
}

.p4n-popup-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
    font-size: 2.5rem;
}

.p4n-popup-image.no-image img {
    width: 60px;
    height: 60px;
    filter: brightness(0) invert(1);
}

.p4n-popup-body {
    padding: 12px;
}

.p4n-popup-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
}

.p4n-popup-location {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 6px;
}

.p4n-popup-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.p4n-popup-stars {
    color: #f39c12;
    font-size: 0.9rem;
}

.p4n-popup-rating-value {
    font-weight: 600;
    color: #333;
}

.p4n-popup-reviews {
    color: #888;
    font-size: 0.8rem;
}

.p4n-popup-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.p4n-popup-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #2ecc71;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.p4n-popup-link:hover {
    background: #27ae60;
}

/* Prijs info */
.p4n-popup-price {
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: 500;
    margin-top: 8px;
}

/* Reviews sectie - horizontaal scrollbaar */
.p4n-reviews-section {
    margin: 8px 0;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.p4n-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.75rem;
    color: #666;
}

.p4n-reviews-hint {
    color: #999;
    font-size: 0.65rem;
}

.p4n-reviews-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.p4n-reviews-scroll::-webkit-scrollbar {
    height: 3px;
}

.p4n-reviews-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.p4n-reviews-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.p4n-review-card {
    flex-shrink: 0;
    width: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    scroll-snap-align: start;
}

.p4n-review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.p4n-review-user {
    font-size: 0.7rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.p4n-review-stars {
    color: #f39c12;
    font-size: 0.7rem;
}

.p4n-review-text {
    font-size: 0.7rem;
    color: #555;
    line-height: 1.3;
    margin: 0 0 6px 0;
    max-height: 50px;
    overflow-y: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.p4n-review-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.p4n-review-date {
    font-size: 0.6rem;
    color: #999;
}

.p4n-translate-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.p4n-translate-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.p4n-translate-btn.translated {
    background: #f39c12;
    border-color: #f39c12;
    color: #fff;
}

/* Park4Night Filter Button */
#p4n-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: all 0.2s ease;
}

#p4n-filter-btn svg {
    width: 14px;
    height: 14px;
}

#p4n-filter-btn:hover {
    background: #fff;
}

#p4n-filter-btn.active {
    background: #f39c12;
    color: #fff;
}

.filter-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    font-size: 0.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Park4Night Filter Panel */
#p4n-filter-panel {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    width: 280px;
    max-height: 350px;
    overflow: hidden;
}

#p4n-filter-panel.hidden {
    display: none;
}

.p4n-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #2ecc71;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
}

.p4n-filter-header button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.p4n-filter-header button svg {
    width: 16px;
    height: 16px;
}

.p4n-filter-actions {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.p4n-filter-actions button {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}

.p4n-filter-actions button:hover {
    background: #f5f5f5;
}

.p4n-filter-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
}

.p4n-filter-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.p4n-filter-list label:hover {
    background: #f8f8f8;
}

.p4n-filter-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2ecc71;
}

.p4n-filter-list img {
    flex-shrink: 0;
}

/* Responsive Park4Night */
@media (max-width: 768px) {
    #p4n-controls {
        top: 40px;
        transform: translateX(-50%) translateX(-85px);
    }
    
    #p4n-search-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .p4n-popup .leaflet-popup-content {
        width: 260px !important;
    }
    
    .p4n-popup-image,
    .p4n-photo-carousel {
        height: 100px;
    }
    
    #p4n-filter-panel {
        width: 260px;
        top: 70px;
    }
}
