/* ==========================================================================
   HAVA DURUMU - Ultra-Premium Glassmorphism Dashboard (Apple iOS Aesthetic)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Stealth Minimalist Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

html {
    background-color: #07090e;
    color-scheme: dark;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    background-color: transparent !important;
    color: #fff;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* --------------------------------------------------------------------------
   Arka Plan Canlı Videosu (Full Screen Fixed Across Viewport)
   -------------------------------------------------------------------------- */
.bg-video, #bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
    transition: filter 0.35s cubic-bezier(0.16, 1, 0.3, 1), brightness 0.35s ease;
}

/* Ortam Karartması & Vinyet */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(11, 15, 23, 0.15) 0%, rgba(5, 7, 13, 0.55) 100%);
    z-index: -1;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Üst Portal Menüsü
   -------------------------------------------------------------------------- */
.main-nav {
    position: fixed;
    top: 20px;
    right: 25px;
    z-index: 90;
    transition: filter 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.main-nav ul {
    list-style: none;
}

.main-nav a {
    background: rgba(11, 15, 23, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    text-decoration: none;
    padding: 0.65rem 1.25rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.45);
}

.main-nav a:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
}

/* --------------------------------------------------------------------------
   Sol Panel (Şehir Listesi / Sidebar)
   -------------------------------------------------------------------------- */
header#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(10, 14, 22, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 15px 0 45px rgba(0, 0, 0, 0.65);
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-trigger {
    display: none !important;
}

/* Arama Formu */
.search-form {
    width: 100%;
    margin-bottom: 0.75rem;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Bölge Sekmeleri (Tabs) */
.city-tabs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 0.85rem;
}

.city-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 0.38rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: inherit;
}

.city-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.city-tab-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

/* Şehir Butonları */
.city-selector {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
}

.city-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    text-align: left;
}

.city-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(4px);
}

.city-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(139, 92, 246, 0.9));
    color: white;
    border-color: #60a5fa;
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.45);
}

.city-btn .badge-temp {
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.22rem 0.6rem;
    border-radius: 8px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   ŞEHİRLER HARİCİ TÜM EKRANA DEVRİM NİTELİĞİNDE BLUR (Focus Modu)
   -------------------------------------------------------------------------- */
body:has(#sidebar:hover) #bg-video,
body:has(#sidebar:hover) main,
body:has(#sidebar:hover) .main-nav,
body:has(#sidebar:hover) .main-footer,
body:has(#sidebar:hover) .floating-map-container,
body:has(#sidebar:hover) .map-floating-btn {
    filter: blur(16px) brightness(0.4) !important;
    transform: scale(0.985);
}

#bg-video, main, .main-nav, .main-footer, .floating-map-container, .map-floating-btn {
    transition: filter 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s ease, brightness 0.35s ease, opacity 0.35s ease;
}

/* --------------------------------------------------------------------------
   Ana Hava Durumu Paneli (Glassmorphism & WebGL)
   -------------------------------------------------------------------------- */
main {
    margin-left: 320px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    position: relative;
    z-index: 10;
}

#weatherContainer {
    width: 100%;
    max-width: 860px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-dashboard {
    position: relative;
    border-radius: 34px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(11, 15, 23, 0.42);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 
        0 35px 80px rgba(0, 0, 0, 0.6),
        inset 1px 1px 3px rgba(255, 255, 255, 0.5), 
        inset -1px -1px 4px rgba(255, 255, 255, 0.1); 
    isolation: isolate;
    animation: fadeInDashboard 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes fadeInDashboard {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.12);
    z-index: 1;
    pointer-events: none;
    border-radius: 34px;
}

#glassCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 34px;
    z-index: -1;
    pointer-events: none;
}

.weather-content-scroll {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 2.25rem;
    overflow-y: auto;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* Dashboard İçi Tipografi ve Düzen */
.current-weather {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 1rem;
}

.weather-header h2 {
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.5px;
}

.weather-header p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.temperature {
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    letter-spacing: -2px;
}

.condition {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.condition .emoji {
    font-size: 2.4rem;
}

/* 4'lü Detay Izgarası */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.detail-item {
    background: rgba(11, 15, 23, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1.1rem 0.85rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}

.detail-item:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
}

.detail-item .icon {
    font-size: 1.7rem;
    margin-bottom: 0.35rem;
}

.detail-item .label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.detail-item .value {
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 0.2rem;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

/* Ek Detaylar */
.additional-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    background: rgba(11, 15, 23, 0.5);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    padding: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.additional-item {
    text-align: center;
}

.additional-item .label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.additional-item .value {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin-top: 0.2rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

/* 7 Günlük Tahmin */
.forecast {
    margin-top: 0.5rem;
}

.forecast h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.85rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.2px;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.forecast-card {
    background: rgba(11, 15, 23, 0.55);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 0.85rem 0.45rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.forecast-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
}

.forecast-card .emoji {
    font-size: 1.5rem;
}

.forecast-card strong {
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.forecast-card p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* --------------------------------------------------------------------------
   Harita Butonu & Pop-up Harita Modülü
   -------------------------------------------------------------------------- */
.map-floating-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.75rem 1.4rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.45);
    z-index: 95;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.map-floating-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 35px rgba(139, 92, 246, 0.65);
}

.floating-map-container {
    position: fixed;
    bottom: 85px;
    right: 25px;
    width: 380px;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75);
    z-index: 95;
    background: rgba(11, 15, 23, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: none;
    animation: popUpMap 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popUpMap {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.map-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(11, 15, 23, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
}

.map-close-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.map-close-btn:hover {
    background: #f43f5e;
}

/* --------------------------------------------------------------------------
   Alt Bilgi (Footer)
   -------------------------------------------------------------------------- */
.main-footer {
    position: fixed;
    bottom: 15px;
    left: 340px;
    z-index: 10;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    pointer-events: none;
    transition: filter 0.35s ease, opacity 0.35s ease;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* --------------------------------------------------------------------------
   Duyarlı Tasarım (Responsive)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    header#sidebar {
        transform: translateX(-100%);
    }
    header#sidebar.visible {
        transform: translateX(0);
    }
    main {
        margin-left: 0;
        width: 100%;
        padding: 1.25rem;
    }
    .main-footer {
        left: 20px;
        position: relative;
        text-align: center;
        margin-top: 1rem;
    }
    .floating-map-container {
        width: calc(100% - 30px);
        right: 15px;
        bottom: 80px;
        height: 240px;
    }
    .forecast-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Gelişmiş Şehir Kartları (Modern Glassmorphism)
   -------------------------------------------------------------------------- */
.city-selector {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.city-card-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.city-card-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.city-card-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.88), rgba(139, 92, 246, 0.88));
    border-color: #60a5fa;
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.city-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.city-card-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    font-size: 0.92rem;
    color: #fff;
}

.city-emoji {
    font-size: 1.25rem;
}

.city-temp-badge {
    font-size: 0.95rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.city-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Canlı Arka Plan Seçici Modal
   -------------------------------------------------------------------------- */
.bg-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.bg-picker-content {
    background: rgba(13, 17, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    max-width: 440px;
    width: 100%;
    padding: 1.75rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    animation: popUpMap 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bg-picker-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.bg-opt-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: left;
}

.bg-opt-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(4px);
}

.bg-opt-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.8));
    border-color: #60a5fa;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
