/* ============================================================
   MeteoFace — Uydu Analiz Merkezi  |  satellite.css
   Geliştiren: Anıl GÜMÜŞ
   ============================================================ */

:root {
    --accent:       #f1c40f;
    --accent-dim:   rgba(241, 196, 15, 0.15);
    --accent-glow:  rgba(241, 196, 15, 0.3);
    --bg:           #0b0e17;
    --surface:      rgba(11, 14, 23, 0.88);
    --surface-2:    rgba(255, 255, 255, 0.05);
    --border:       rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --text:         #ffffff;
    --text-muted:   rgba(255, 255, 255, 0.45);
    --cyan:         #00e5ff;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    18px;
    --blur:         blur(14px) saturate(180%);
    --transition:   0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
}

/* ── MAP ── */
#map {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ── TOP BAR ── */
.topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
}

/* Üst satır: logo + arama + home */
.topbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    height: 56px;
}

/* Alt satır: katman pilleri */
.layer-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 14px 10px;
    border-top: 1px solid var(--border);
}

.layer-nav::-webkit-scrollbar { display: none; }

/* Sol grup */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text);
}

.brand-module {
    font-size: 10px;
    font-weight: 600;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sağ grup */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── ICON BUTTON ── */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--border-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

/* ── KATMAN PİLLERİ ── */
.pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.pill i { font-size: 11px; }

.pill:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border-color: var(--border-hover);
}

.pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 16px var(--accent-glow);
}

/* ── ARAMA ── */
.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrap i {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}

#city-search {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 8px 12px 8px 30px;
    width: 180px;
    outline: none;
    transition: var(--transition);
}

#city-search:focus {
    border-color: var(--accent);
    background: rgba(241,196,15,0.05);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

#city-search::placeholder { color: var(--text-muted); }

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    overflow: hidden;
    z-index: 100;
    display: none;
}

.search-results.visible { display: block; }

.search-result-item {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface-2); color: var(--accent); }


/* ── LIVE DOT ── */
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
    animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ── LEGEND PANELİ ── */
.legend-panel {
    position: absolute;
    bottom: 130px;
    left: 14px;
    z-index: 10;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    padding: 12px 14px;
    min-width: 170px;
    display: none; /* JS ile gösterilir */
}

.legend-panel.visible { display: block; }

.legend-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text);
    margin-bottom: 6px;
}

.legend-row:last-child { margin-bottom: 0; }

.swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.15);
}

/* ── ZAMAN KONTROL PANELİ ── */
.time-panel {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: min(560px, calc(100vw - 28px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    padding: 14px 18px 16px;
}

.time-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.time-info {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.time-info i { color: var(--accent); font-size: 12px; }

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Play butonu */
.play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #000;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.play-btn:active { transform: scale(0.95); }

/* Slider alanı */
.slider-track-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #000;
    box-shadow: 0 0 8px var(--accent-glow);
    cursor: pointer;
    transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); }
input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #000;
    cursor: pointer;
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0 2px;
}

/* ── LOADER ── */
.sat-loader {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.sat-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.loader-ring {
    width: 44px;
    height: 44px;
    border: 3px solid var(--surface-2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── MOBİL ── */
@media (max-width: 768px) {
    .brand-module { display: none; }
    #city-search { width: 130px; }
    .legend-panel { bottom: 180px; }
    .time-panel { bottom: 16px; border-radius: var(--radius-md); padding: 12px 14px 14px; }
}

@media (max-width: 420px) {
    .brand-name { font-size: 12px; }
    .pill { padding: 6px 11px; font-size: 11px; }
    #city-search { width: 110px; }
}

/* =============================================
   SAĞ DİKEY MENÜ (STYLE DOCK)
============================================= */
.style-dock {
    position: absolute;
    right: 14px;
    /* Üst bar (logo satırı + katman pilleri satırı) toplam ~98px yüksekliğinde;
       menü bu iki satırın altına, 8px boşlukla başlıyor ki katman pillerinin
       üstünü kapatmasın. */
    top: 106px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(11, 14, 23, 0.88);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.style-dock .style-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.style-dock .style-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.style-dock .style-btn.active {
    background: rgba(241, 196, 15, 0.15);
    border-color: #f1c40f;
    color: #f1c40f;
}

.style-dock .flag-img {
    width: 20px;
    height: auto;
    border-radius: 2px;
    display: block;
}

@media (max-width: 768px) {
    .style-dock {
        right: 8px;
        top: 102px;
        gap: 4px;
        padding: 4px;
    }
    .style-dock .style-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    .style-dock .flag-img {
        width: 17px;
    }
}