/* css/style.css */

:root {
    --primary: #2a9d8f;
    --secondary: #219ebc;
    --danger: #e76f51;
    --warning: #f4a261;
    --success: #4CAF50;
    --light: #f8f9fa;
    --dark-text: #1d3557;

    --glass-bg: rgba(255, 255, 255, 0.22);
    --glass-bg-strong: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 20px 60px rgba(29, 53, 87, 0.08);

    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;

    --transition: all 0.35s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif !important;
    background:
        radial-gradient(at 0% 0%, rgba(42, 157, 143, 0.25) 0px, transparent 55%),
        radial-gradient(at 100% 0%, rgba(33, 158, 188, 0.25) 0px, transparent 55%),
        radial-gradient(at 50% 100%, rgba(187, 222, 251, 0.35) 0px, transparent 55%),
        #eef2f6 !important;
    background-attachment: fixed;
    color: var(--dark-text) !important;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   GENEL ORTAK STİLLER
   ============================================ */

.glass-panel {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow);
}

.section-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--dark-text);
}

.text-soft {
    color: rgba(29, 53, 87, 0.72);
}

.btn {
    border-radius: 14px !important;
    font-weight: 600 !important;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary)) !important;
    border: none !important;
    box-shadow: 0 10px 24px rgba(33, 158, 188, 0.18);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(33, 158, 188, 0.24);
}

.btn-outline-secondary:hover,
.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* ============================================
   ANA DASHBOARD STİLLERİ
   ============================================ */

.header {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header h1,
.header h2,
.header h3,
.header h4,
.header h5,
.header h6 {
    color: var(--dark-text);
}

.stat-card {
    background: rgba(255, 255, 255, 0.42) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    padding: 25px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 12px 35px rgba(29, 53, 87, 0.08);
}

.stat-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.6) !important;
}

.filter-bar,
.col-lg-4 > div {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(30px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(210%) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 22px !important;
    padding: 20px !important;
    box-shadow: var(--glass-shadow);
}

.filter-bar {
    position: relative;
}

.filter-bar .form-select,
.filter-bar .form-control {
    border-radius: 14px !important;
    border: 1px solid rgba(33, 158, 188, 0.12) !important;
    min-height: 46px;
    box-shadow: none !important;
}

.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
    border-color: rgba(33, 158, 188, 0.4) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 158, 188, 0.12) !important;
}

.map-container {
    background: rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

#map {
    border-radius: 16px;
    border: 1px solid rgba(42, 157, 143, 0.15);
    min-height: 520px;
    overflow: hidden;
}

.lake-card {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-left: 5px solid var(--secondary) !important;
    padding: 28px;
    margin-bottom: 18px;
    transition: var(--transition);
    box-shadow: 0 12px 30px rgba(29, 53, 87, 0.06);
}

.lake-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(29, 53, 87, 0.11);
    background: rgba(255, 255, 255, 0.58) !important;
}

.lake-card h5 {
    font-weight: 800;
    margin-bottom: 14px;
    font-size: 1.15rem;
}

.lake-card h6 {
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    opacity: 0.85;
}

.lake-card p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.lake-card > div {
    margin-bottom: 10px;
}

.lake-card > div:last-child {
    margin-bottom: 0;
}

.lake-card .text-muted {
    margin-top: 8px;
    font-size: 0.9rem;
}

.modal-content {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(35px) saturate(180%);
    -webkit-backdrop-filter: blur(35px) saturate(180%);
    border-radius: 30px !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 28px 70px rgba(29, 53, 87, 0.18);
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.nav-tabs {
    border-bottom: 1px solid rgba(29, 53, 87, 0.08) !important;
}

.nav-tabs .nav-link {
    border: none !important;
    border-radius: 14px !important;
    color: var(--dark-text) !important;
    transition: var(--transition);
}

.nav-tabs .nav-link.active {
    background: rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 8px 18px rgba(29, 53, 87, 0.08);
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */

.dashboard-side-card,
.dashboard-bottom-card,
.lakes-panel-card {
    padding: 28px 32px !important;
}

.dashboard-bottom-card {
    background: rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(42, 157, 143, 0.2) !important;
    box-shadow: 0 8px 32px rgba(33, 158, 188, 0.1);
}

.dashboard-bottom-card h3 {
    padding-left: 4px;
    margin-bottom: 24px !important;
}

.dashboard-bottom-card > .row {
    margin-bottom: 24px !important;
}

.dashboard-bottom-card > div[id] {
    margin-bottom: 20px !important;
}

.dashboard-bottom-card > div[id]:last-child {
    margin-bottom: 0 !important;
}

.lakes-panel-card {
    display: flex;
    flex-direction: column;
}

.lakes-panel-card h3 {
    padding-left: 4px;
    margin-bottom: 20px;
}

.climate-chart-card {
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 22px;
    padding: 28px 32px;
    box-shadow: 0 10px 26px rgba(29, 53, 87, 0.06);
}

.footer {
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
}

/* ============================================
   STATUS / RISK
   ============================================ */

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.risk-low {
    background-color: #22c55e !important;
    color: #166534 !important;
}

.risk-moderate {
    background-color: #f8f65e !important;
    color: #854d0e !important;
}

.risk-high {
    background-color: #fb923c !important;
    color: #9a3412 !important;
}

.risk-critical {
    background-color: #ef4444 !important;
    color: #991b1b !important;
}

.badge.risk-low,
.badge.risk-moderate,
.badge.risk-high,
.badge.risk-critical {
    border-radius: 999px !important;
    font-weight: 700;
}

/* ============================================
   HARİTA / POPUP
   ============================================ */

.map-popup {
    min-width: 220px;
}

.map-popup h5 {
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--dark-text);
}

.map-popup p {
    margin-bottom: 6px;
    color: #334155;
}

.leaflet-popup-content-wrapper {
    border-radius: 18px !important;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18) !important;
}

.leaflet-popup-content {
    margin: 16px !important;
}

.custom-marker div:hover {
    transform: scale(1.12);
}

/* ============================================
   MAP LEGEND - INFO LEGEND
   ============================================ */

.info.legend {
    background: rgba(255, 255, 255, 0.96) !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15) !important;
    border: 1px solid rgba(42, 157, 143, 0.15) !important;
    color: var(--dark-text) !important;
    line-height: 1.5;
}

.info.legend h4,
.info.legend strong {
    color: var(--dark-text) !important;
    margin: 0 0 8px 0 !important;
    font-weight: 800;
    font-size: 1rem;
}

.info.legend div,
.info.legend span,
.info.legend label {
    color: var(--dark-text) !important;
    font-weight: 500;
}

.info.legend i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.info.legend br {
    line-height: 1.8;
}

/* ============================================
   WELCOME SCREEN
   ============================================ */

#welcome-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(238, 242, 246, 0.4), rgba(226, 240, 245, 0.35));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1.2s ease, visibility 1.2s;
    overflow: hidden;
    padding: 28px;
}

#welcome-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/waterdrop.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
    z-index: -3;
}

#welcome-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)),
        radial-gradient(circle at top left, rgba(42, 157, 143, 0.12), transparent 35%),
        radial-gradient(circle at bottom right, rgba(33, 158, 188, 0.12), transparent 35%);
    z-index: -2;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(210%);
    -webkit-backdrop-filter: blur(55px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 40px;
    max-width: 1800px;
    width: 90%;
    padding: 60px !important;
    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.28),
        inset 0 2px 10px rgba(255, 255, 255, 0.32),
        inset 0 -1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUpWelcome 1.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.34),
        rgba(255, 255, 255, 0.08),
        transparent
    );
    border-radius: 40px;
    pointer-events: none;
}

.welcome-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 39px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

@keyframes fadeInUpWelcome {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-card h1 {
    font-size: 4.8rem !important;
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1.05;
    margin-bottom: 18px;
    color: #0f172a;
    text-shadow: 0 2px 14px rgba(255, 255, 255, 0.28);
    position: relative;
    z-index: 2;
}

.welcome-card h5 {
    font-size: 1.9rem !important;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 42px;
    color: #1e293b;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.22);
    position: relative;
    z-index: 2;
}

.welcome-card p,
.welcome-card li {
    color: #1e293b;
    text-shadow: 0 1px 10px rgba(255, 255, 255, 0.16);
    position: relative;
    z-index: 2;
}

.purpose-box {
    background: rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-left: 12px solid var(--primary) !important;
    padding: 25px !important;
    margin-bottom: 42px !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 18px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
}

.purpose-box h6 {
    font-size: 1.5rem !important;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f172a;
}

.purpose-box p {
    font-size: 1.22rem !important;
    line-height: 1.8;
    color: #1e293b;
}

.purpose-box ul {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.purpose-box ul li {
    font-size: 1.12rem !important;
    margin-bottom: 12px;
}

#start-btn {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    padding: 18px 54px !important;
    border-radius: 18px !important;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

#start-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 20px 40px rgba(42, 157, 143, 0.3);
}

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

/* ============================================
   FORM / SEARCH / LIST
   ============================================ */

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
select,
textarea {
    border-radius: 14px !important;
}

#lakeCards {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 6px;
}

#lakeCards::-webkit-scrollbar {
    width: 8px;
}

#lakeCards::-webkit-scrollbar-thumb {
    background: rgba(33, 158, 188, 0.35);
    border-radius: 999px;
}

#lakeCards::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================
   COMPARISON PANEL
   ============================================ */

.comparison-panel {
    padding: 24px 28px !important;
}

.comparison-controls {
    margin-bottom: 24px !important;
}

#comparisonSummary {
    margin-top: 20px !important;
    margin-bottom: 24px !important;
    padding: 0 !important;
}

#comparisonChart {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    min-height: 300px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.fade-up {
    animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .welcome-card {
        padding: 60px !important;
    }

    .welcome-card h1 {
        font-size: 4rem !important;
    }

    .welcome-card h5 {
        font-size: 1.55rem !important;
    }
}

@media (max-width: 992px) {
    .header {
        position: relative;
    }

    #map {
        min-height: 420px;
    }

    .welcome-card {
        width: 95%;
        padding: 42px !important;
        border-radius: 28px;
    }

    .welcome-card::before {
        border-radius: 28px;
    }

    .welcome-card::after {
        border-radius: 27px;
    }

    .welcome-card h1 {
        font-size: 3rem !important;
        line-height: 1.1;
        letter-spacing: -2px;
    }

    .welcome-card h5 {
        font-size: 1.25rem !important;
        margin-bottom: 28px;
    }

    .purpose-box {
        padding: 28px !important;
        border-radius: 22px;
    }

    .purpose-box h6 {
        font-size: 1.35rem !important;
    }

    .purpose-box p {
        font-size: 1.02rem !important;
        line-height: 1.7;
    }

    .purpose-box ul li {
        font-size: 1rem !important;
    }

    #start-btn {
        width: 100%;
        padding: 16px 24px !important;
        font-size: 1.05rem !important;
    }

    #lakeCards {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .comparison-panel {
        padding: 20px !important;
    }
}

@media (max-width: 576px) {
    body {
        background-attachment: scroll;
    }

    .filter-bar,
    .col-lg-4 > div,
    .map-container,
    .stat-card,
    .climate-chart-card {
        border-radius: 18px !important;
    }

    .welcome-card {
        padding: 28px 22px !important;
    }

    .welcome-card h1 {
        font-size: 2.2rem !important;
        letter-spacing: -1px;
    }

    .welcome-card h5 {
        font-size: 1rem !important;
    }

    .purpose-box {
        padding: 20px !important;
    }

    .purpose-box h6 {
        font-size: 1.1rem !important;
    }

    .purpose-box p,
    .purpose-box ul li {
        font-size: 0.95rem !important;
    }

    #map {
        min-height: 320px;
    }

    .lake-card {
        padding: 14px;
    }

    .comparison-panel {
        padding: 16px !important;
    }
}

/* ============================================
   TIME SLIDER
   ============================================ */

/* ============================================
   TIME SLIDER
   ============================================ */

.time-control-bar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(30px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(210%) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 22px !important;
    padding: 20px !important;
    box-shadow: var(--glass-shadow);
}

.timeline-range-wrapper {
    min-width: 280px;
    position: relative;
}

.dual-range-slider {
    position: relative;
    width: 100%;
    height: 28px;
    display: flex;
    align-items: center;
}

.dual-range-slider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 2px rgba(29, 53, 87, 0.08);
    z-index: 1;
}

.dual-range-slider input[type="range"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 28px;
    margin: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
    z-index: 2;
}

.dual-range-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
    border: none;
}

.dual-range-slider input[type="range"]::-moz-range-track {
    height: 6px;
    background: transparent;
    border: none;
}

.dual-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
    cursor: pointer;
    pointer-events: auto;
    margin-top: -4px;
    position: relative;
    z-index: 3;
}

.dual-range-slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 3;
}

.dual-range-slider input[type="range"]:focus {
    outline: none;
    box-shadow: none;
}

#startYearSlider {
    z-index: 3;
}

#endYearSlider {
    z-index: 4;
}

.timeline-year-badge {
    min-width: 190px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(33, 158, 188, 0.12);
    font-weight: 600;
    color: var(--dark-text);
    text-align: center;
    white-space: nowrap;
}

.year-ticks {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.78rem;
    color: rgba(29, 53, 87, 0.72);
}

.year-ticks span {
    flex: 1 1 0;
    text-align: center;
}

@media (max-width: 768px) {
    .time-control-bar {
        align-items: stretch !important;
    }

    .timeline-year-badge {
        width: 100%;
        min-width: unset;
        white-space: normal;
    }

    .timeline-range-wrapper {
        width: 100%;
    }

    .year-ticks {
        font-size: 0.7rem;
        gap: 4px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .year-ticks span {
        min-width: 34px;
    }
}

#langSwitcher {
    border-radius: 12px;
    font-weight: 600;
    box-shadow: none !important;
}


/* ============================================
   RESPONSIVE ENHANCEMENTS
   Desktop görünümünü bozmadan
   ============================================ */

/* ---------- Tablet ve altı ---------- */
@media (max-width: 1199.98px) {
    .container-fluid.px-5 {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .dashboard-side-card,
    .dashboard-bottom-card,
    .lakes-panel-card,
    .map-container {
        padding: 22px !important;
    }

    .welcome-card {
        width: 94%;
    }

    .map-section-height,
    .lakes-panel-height,
    .side-panel-height {
        height: auto !important;
        min-height: unset !important;
    }

    .chart-wrapper {
        min-height: 280px;
    }

    #comparisonChart {
        min-height: 280px;
    }

    .scrollable-lakes {
        max-height: none !important;
    }
}

/* ---------- Tablet ---------- */
@media (max-width: 991.98px) {
    .header {
        position: relative;
        top: auto;
    }

    .container-fluid.px-5 {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .map-container {
        position: static !important;
        top: auto !important;
    }

    #map {
        min-height: 420px !important;
        height: 420px !important;
    }

    .scrollable-lakes {
        overflow-y: visible !important;
        overflow-x: visible !important;
        padding-right: 0 !important;
    }

    #lakeCards {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }

    .dashboard-side-card,
    .dashboard-bottom-card,
    .lakes-panel-card {
        margin-bottom: 0;
    }

    .comparison-controls .row > [class*="col-"] {
        margin-bottom: 6px;
    }

    .comparison-controls .d-grid .btn {
        min-height: 46px;
    }
}

/* ---------- Mobil ---------- */
@media (max-width: 767.98px) {
    .container-fluid.px-5 {
        padding-left: 14px !important;
        padding-right: 14px !important;
        margin-top: 18px !important;
    }

    .container.mt-3.mb-3 {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .header {
        padding: 10px 0;
    }

    .header h1 {
        font-size: 1.55rem !important;
        line-height: 1.15;
    }

    .header p {
        font-size: 0.92rem !important;
        line-height: 1.45;
    }

    .header .badge {
        font-size: 0.72rem;
    }

    .header .btn {
        width: 100%;
        min-height: 44px;
    }

    .filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .filter-bar .form-select,
    .filter-bar .form-control,
    .filter-bar .btn {
        width: 100% !important;
    }

    .filter-bar .ms-auto {
        margin-left: 0 !important;
    }

    .time-control-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .timeline-range-wrapper,
    .timeline-year-badge,
    #playTimelineBtn,
    #resetTimelineBtn {
        width: 100% !important;
        min-width: unset !important;
    }

    #playTimelineBtn,
    #resetTimelineBtn {
        min-height: 44px;
    }

    .year-ticks {
        font-size: 0.68rem !important;
        gap: 4px !important;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 2px;
    }

    .year-ticks span {
        min-width: 34px;
    }

    .dashboard-side-card,
    .dashboard-bottom-card,
    .lakes-panel-card,
    .map-container,
    .climate-chart-card,
    .stat-card {
        padding: 16px !important;
        border-radius: 18px !important;
    }

    .dashboard-side-card h3,
    .dashboard-bottom-card h3,
    .lakes-panel-card h3,
    #topShrinkingTitle,
    #comparisonTitle,
    #riskDistributionTitle {
        font-size: 1.2rem !important;
        line-height: 1.25 !important;
        margin-bottom: 16px !important;
    }

    #map {
        min-height: 320px !important;
        height: 320px !important;
    }

    .lake-card {
        padding: 16px !important;
        border-radius: 16px !important;
    }

    .lake-card h5 {
        font-size: 1rem !important;
    }

    .lake-card .btn {
        min-height: 42px;
    }

    .map-popup {
        min-width: 180px;
    }

    .map-popup h5 {
        font-size: 1rem;
    }

    .map-popup p {
        font-size: 0.9rem;
    }

    .info.legend {
        font-size: 0.8rem !important;
        padding: 10px 12px !important;
        max-width: 190px;
    }

    .comparison-controls .row {
        row-gap: 10px;
    }

    .comparison-controls label {
        font-size: 0.9rem;
    }

    .comparison-controls .form-select,
    .comparison-controls .btn {
        min-height: 44px;
    }

    .comparison-card {
        padding: 14px !important;
    }

    #comparisonSummary {
        margin-top: 14px !important;
        margin-bottom: 18px !important;
    }

    #comparisonChart,
    #riskDonutChart,
    #topShrinkingChart {
        height: 280px !important;
        min-height: 280px !important;
    }

    #areaChart,
    #precipChart,
    #tempChart,
    #evapChart,
    #multiAxisChart,
    #monthlyPrecipChart,
    #waterBalanceChart {
        height: 300px !important;
        min-height: 300px !important;
    }

    .modal-dialog.modal-xl,
    .modal-dialog.modal-dialog-centered {
        margin: 10px !important;
    }

    .modal-content {
        border-radius: 20px !important;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 14px 16px !important;
    }

    .modal-title {
        font-size: 1rem !important;
        line-height: 1.3;
    }

    .nav-tabs {
        gap: 6px;
    }

    .nav-tabs .nav-link {
        font-size: 0.85rem !important;
        padding: 8px 10px !important;
    }

    .climate-chart-card h5,
    .climate-chart-card h6 {
        font-size: 1rem !important;
        line-height: 1.35;
    }

    .table {
        font-size: 0.92rem;
    }

    .footer {
        padding: 28px 0 !important;
    }

    .footer p {
        font-size: 0.82rem !important;
        line-height: 1.5;
    }
}

/* ---------- Küçük mobil ---------- */
@media (max-width: 575.98px) {
    .container-fluid.px-5 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .welcome-card {
        width: 100%;
    }

    .dashboard-side-card,
    .dashboard-bottom-card,
    .lakes-panel-card,
    .map-container {
        padding: 14px !important;
    }

    #map {
        min-height: 280px !important;
        height: 280px !important;
    }

    #comparisonChart,
    #riskDonutChart,
    #topShrinkingChart {
        height: 250px !important;
        min-height: 250px !important;
    }

    #areaChart,
    #precipChart,
    #tempChart,
    #evapChart,
    #multiAxisChart,
    #monthlyPrecipChart,
    #waterBalanceChart {
        height: 260px !important;
        min-height: 260px !important;
    }

    .timeline-year-badge {
        font-size: 0.9rem;
        padding: 9px 12px;
    }

    .lake-card .row.text-center > div {
        padding-left: 6px;
        padding-right: 6px;
    }

    .input-group-text,
    .form-control,
    .form-select {
        font-size: 0.92rem !important;
    }
}


/* ============================================
   MOBILE LAKES PANEL SCROLL FIX
   ============================================ */

@media (max-width: 991.98px) {
    .lakes-panel-card {
        height: 75vh !important;
        min-height: 520px;
    }

    .scrollable-lakes {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 6px !important;
    }

    #lakeCards {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 767.98px) {
    .lakes-panel-card {
        height: 68vh !important;
        min-height: 420px;
    }

    .scrollable-lakes {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 575.98px) {
    .lakes-panel-card {
        height: 62vh !important;
        min-height: 360px;
    }
}


/* ============================================
   MOBILE WELCOME SCREEN SIZE FIX
   ============================================ */

@media (max-width: 767.98px) {
    #welcome-screen {
        padding: 14px !important;
        align-items: flex-start !important;
        overflow-y: auto;
    }

    .welcome-content {
        width: 100%;
        display: flex;
        justify-content: center;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .welcome-card {
        width: 100% !important;
        max-width: 520px !important;
        padding: 22px 18px !important;
        border-radius: 22px !important;
        margin: 0 auto !important;
    }

    .welcome-card h1 {
        font-size: 1.9rem !important;
        line-height: 1.15 !important;
        letter-spacing: -1px !important;
        margin-bottom: 10px !important;
    }

    .welcome-card h5 {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
        margin-bottom: 18px !important;
    }

    .purpose-box {
        padding: 16px !important;
        margin-bottom: 20px !important;
        border-radius: 18px !important;
        border-left-width: 8px !important;
    }

    .purpose-box h6 {
        font-size: 1rem !important;
        margin-bottom: 12px !important;
    }

    .purpose-box p {
        font-size: 0.92rem !important;
        line-height: 1.55 !important;
        margin-bottom: 10px !important;
    }

    .purpose-box ul {
        padding-left: 1rem !important;
    }

    .purpose-box ul li {
        font-size: 0.9rem !important;
        line-height: 1.45 !important;
        margin-bottom: 8px !important;
    }

    #langSwitcher {
        max-width: 96px !important;
        font-size: 0.9rem !important;
        min-height: 38px !important;
    }

    #start-btn {
        width: 100% !important;
        padding: 13px 18px !important;
        font-size: 0.95rem !important;
        letter-spacing: 0.4px !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 575.98px) {
    #welcome-screen {
        padding: 10px !important;
    }

    .welcome-content {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .welcome-card {
        padding: 18px 14px !important;
        border-radius: 18px !important;
    }

    .welcome-card h1 {
        font-size: 1.55rem !important;
        line-height: 1.15 !important;
    }

    .welcome-card h5 {
        font-size: 0.88rem !important;
        margin-bottom: 14px !important;
    }

    .purpose-box {
        padding: 14px !important;
        margin-bottom: 16px !important;
    }

    .purpose-box h6 {
        font-size: 0.95rem !important;
    }

    .purpose-box p,
    .purpose-box ul li {
        font-size: 0.85rem !important;
        line-height: 1.45 !important;
    }

    #start-btn {
        padding: 12px 14px !important;
        font-size: 0.9rem !important;
    }
}

.lake-help-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(33, 158, 188, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--dark-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.lake-help-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.95);
    color: var(--secondary);
    box-shadow: 0 8px 18px rgba(29, 53, 87, 0.08);
}

.lake-help-btn i {
    font-size: 0.9rem;
}


.timeline-help-btn {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(33, 158, 188, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--dark-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    padding: 0;
}

.timeline-help-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.95);
    color: var(--secondary);
    box-shadow: 0 8px 18px rgba(29, 53, 87, 0.08);
}

.timeline-help-btn i {
    font-size: 0.85rem;
}