/* ===== ULTRA-MODERN COMPARISON TOOL WITH PROPER SIDE-BY-SIDE MAPS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(100, 210, 255, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(100, 210, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(100, 210, 255, 0); }
}

body {
    background: radial-gradient(circle at top left, #f8f9fa, #e9ecef);
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: #212529;
    overflow: hidden;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #495057;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
}

.header h2 {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #3a86ff, #8338ec);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Back Button */
.back-btn {
    background: linear-gradient(135deg, #3a86ff, #8338ec);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(58, 134, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.back-btn:hover::before {
    left: 100%;
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(58, 134, 255, 0.4);
}

.back-btn:active {
    transform: translateY(1px);
}

/* Year Selectors */
.year-selectors {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 5;
}

.map-selector {
    width: 250px;
    position: relative;
}

.map-selector::before {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 14px;
}

select {
    width: 100%;
    padding: 15px 25px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    appearance: none;
    font-size: 16px;
    color: #495057;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 3px rgba(58, 134, 255, 0.3),
        0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Main Map Display Area */
.map-display {
    flex: 1;
    display: flex;
    position: relative;
    padding: 25px;
    background: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

.initial-view {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 25px;
}

.map-wrapper {
    flex: 1;
    min-width: 0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.map-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3a86ff, #8338ec);
}

.map-wrapper:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.map {
    height: 100%;
    width: 100%;
    border-radius: 12px;
}

/* Compare Button Overlay - Centered */
.compare-btn-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    animation: float 4s ease-in-out infinite;
}

.compare-btn {
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 10px 25px rgba(255, 0, 110, 0.3),
        0 0 0 0 rgba(100, 210, 255, 0.7);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.compare-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: all 0.5s ease;
}

.compare-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 15px 35px rgba(255, 0, 110, 0.4),
        0 0 0 10px rgba(100, 210, 255, 0);
    animation: pulse 1.5s infinite;
}

.compare-btn:hover::before {
    left: 100%;
}

.compare-btn:active {
    transform: scale(0.95);
}

/* Composite Overlay */
.composite-view {
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    bottom: 25px;
    display: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeIn 0.6s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.composite-title {
    text-align: center;
    padding: 18px;
    background: linear-gradient(90deg, #3a86ff, #8338ec);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.return-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff006e, #ff5e62);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(255, 0, 110, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.return-btn:hover {
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 12px 25px rgba(255, 0, 110, 0.4);
}

.return-btn:active {
    transform: translateY(1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
        padding: 14px 6px 14px 6px;
        font-size: 1rem;
    }
    .header h2 {
        font-size: 1.1rem;
        padding: 0;
        margin: 0;
        text-align: center;
        width: 100%;
    }
    .header > div {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    .back-btn {
        padding: 6px 8px;
        font-size: 0.88rem;
        border-radius: 16px;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        word-break: break-word;
        text-align: center;
    }
    .language-switcher {
        padding: 2px 6px;
        gap: 4px;
        min-width: 0;
        width: auto;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .year-selectors {
        gap: 8px;
        padding: 8px 4px;
        font-size: 0.95rem;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .map-selector {
        width: 100%;
        min-width: 0;
    }
    select {
        padding: 7px 4px;
        font-size: 12px;
        border-radius: 8px;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        text-align: center;
        white-space: normal;
        word-break: break-word;
    }
    select option {
        font-size: 12px;
        white-space: normal;
        word-break: break-word;
        text-align: center;
    }
    .compare-btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 18px;
        gap: 6px;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .compare-btn-container-inline {
        margin: 0;
        padding: 0;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .initial-view {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        height: 100%;
    }
    .map-wrapper {
        min-width: 0;
        height: 50vh;
        max-height: 50vh;
    }
    .map-selector::before {
        display: none !important;
    }
    .composite-view {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        padding: 0;
    }
    .return-btn {
        position: static;
        display: block;
        margin: 16px auto 8px auto;
        width: 90vw;
        max-width: 340px;
        font-size: 1rem;
        padding: 10px 0;
        border-radius: 18px;
        text-align: center;
        z-index: 10;
    }
    .leaflet-control-zoom {
       display: none !important;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s infinite;
}

/* Language Switcher Styles */
.language-switcher {
  display: flex;
  gap: 6px;
  box-shadow: 0 2px 12px rgba(58,134,255,0.13);
  border-radius: 22px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.97);
  align-items: center;
  z-index: 3000;
  min-width: 140px;
  width: 140px;
  max-width: 140px;
  justify-content: space-between;
}
.lang-btn {
  border: none;
  outline: none;
  border-radius: 16px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 15px;
  background: transparent;
  color: #2c3e50;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: none;
  position: relative;
  min-width: 0;
  width: auto;
  text-align: center;
  box-sizing: border-box;
}
.lang-btn.active {
  background: linear-gradient(90deg, #3a86ff, #8338ec);
  color: #fff;
  box-shadow: 0 2px 8px rgba(58,134,255,0.18);
}
.lang-btn:not(.active):hover {
  background: rgba(58,134,255,0.08);
  color: #3a86ff;
}
.leaflet-interactive:focus {
    outline: none;
}
/* block interaction with popup content */
.leaflet-popup-content {
    -webkit-user-select: none;
    -moz-user-select: none;   
    -ms-user-select: none;    
    user-select: none;       
}

.leaflet-popup-close-button {
    pointer-events: auto !important;
}