/* ============================================================
   METEOFACE BASE — Tüm modüllerin ortak tasarım sistemi
   index.html, aviation.html, maritime.html hepsi bunu import eder
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

/* ── Değişkenler ──────────────────────────────────────────────── */
:root {
    /* Renkler */
    --mf-bg: #0b0e17;
    --mf-surface: rgba(11, 14, 23, 0.92);
    --mf-surface2: rgba(255, 255, 255, 0.05);
    --mf-border: rgba(255, 255, 255, 0.10);
    --mf-border-hover: rgba(255, 255, 255, 0.22);
    --mf-text: #ffffff;
    --mf-muted: rgba(255, 255, 255, 0.45);
    --mf-accent: #f1c40f;
    --mf-accent-dim: rgba(241, 196, 15, 0.15);
    --mf-cyan: #00e5ff;
    --mf-safe: #2ecc71;
    --mf-warn: #e67e22;
    --mf-danger: #e74c3c;

    /* Efektler */
    --mf-blur: blur(14px) saturate(180%);
    --mf-radius-sm: 8px;
    --mf-radius-md: 12px;
    --mf-radius-lg: 18px;

    /* Topbar */
    --mf-topbar-h: 56px;

    /* Safe area */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: var(--mf-bg);
    color: var(--mf-text);
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior: none;
    position: fixed;
    /* iOS scroll fix */
}

/* ── TOPBAR ───────────────────────────────────────────────────── */
.mf-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--mf-topbar-h) + var(--safe-top));
    padding-top: var(--safe-top);
    z-index: 900;
    background: var(--mf-surface);
    backdrop-filter: var(--mf-blur);
    -webkit-backdrop-filter: var(--mf-blur);
    border-bottom: 1px solid var(--mf-border);
    display: flex;
    align-items: flex-end;
}

.mf-topbar-inner {
    width: 100%;
    height: var(--mf-topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 10px;
}

.mf-topbar-left,
.mf-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mf-topbar-center {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── MARKA ────────────────────────────────────────────────────── */
.mf-brand {
    display: flex;
    align-items: center;
    gap: 9px;
}

.mf-brand-logo {
    width: 30px;
    height: 30px;
    border-radius: var(--mf-radius-sm);
    object-fit: cover;
    display: block;
}

.mf-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.mf-brand-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--mf-text);
}

.mf-brand-module {
    font-size: 9px;
    font-weight: 700;
    color: var(--mf-cyan);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* ── İKON BUTONU ──────────────────────────────────────────────── */
.mf-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: var(--mf-radius-sm);
    border: 1px solid var(--mf-border);
    background: var(--mf-surface2);
    color: var(--mf-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: border-color .2s, color .2s, background .2s;
    flex-shrink: 0;
}

.mf-icon-btn:hover {
    border-color: var(--mf-border-hover);
    color: var(--mf-text);
    background: rgba(255, 255, 255, .08);
}

/* Renk varyantları */
.mf-icon-btn.accent {
    color: var(--mf-accent);
}

.mf-icon-btn.accent:hover {
    border-color: var(--mf-accent);
}

.mf-icon-btn.cyan {
    color: var(--mf-cyan);
}

.mf-icon-btn.cyan:hover {
    border-color: var(--mf-cyan);
}

.mf-icon-btn.active {
    background: var(--mf-accent);
    border-color: var(--mf-accent);
    color: #000;
}

/* ── TOOLTIP ──────────────────────────────────────────────────── */
.mf-icon-btn[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 7px);
    background: rgba(11, 14, 23, .97);
    border: 1px solid var(--mf-border);
    color: var(--mf-text);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 9999;
}

.mf-icon-btn[data-tip]:hover::after {
    opacity: 1;
}

/* Sağdaki butonlarda tooltip sola açılsın (taşma önlemi) */
.mf-topbar-right .mf-icon-btn[data-tip]::after {
    left: auto;
    right: 0;
    transform: none;
}

/* ── STATUS PİLL ──────────────────────────────────────────────── */
.mf-status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--mf-surface2);
    border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius-sm);
    padding: 6px 11px;
    font-size: 10px;
    font-weight: 700;
    color: var(--mf-muted);
    letter-spacing: .8px;
    white-space: nowrap;
}

.mf-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mf-safe);
    flex-shrink: 0;
    animation: mf-pulse 2s infinite;
}

@keyframes mf-pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(46, 204, 113, .5);
    }

    50% {
        opacity: .7;
        box-shadow: 0 0 0 5px rgba(46, 204, 113, 0);
    }
}

/* ── ARAMA KUTUSU (topbar içi) ────────────────────────────────── */
.mf-search {
    position: relative;
    display: flex;
    align-items: center;
}

.mf-search i,
.mf-search .mf-search-icon {
    position: absolute;
    left: 10px;
    color: var(--mf-accent);
    font-size: 13px;
    pointer-events: none;
}

.mf-search input {
    background: var(--mf-surface2);
    border: 1px solid var(--mf-border);
    border-radius: var(--mf-radius-sm);
    color: var(--mf-text);
    padding: 8px 12px 8px 32px;
    width: 180px;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    transition: border-color .25s, width .25s;
}

.mf-search input:focus {
    border-color: var(--mf-accent);
    width: 210px;
}

.mf-search input::placeholder {
    color: var(--mf-muted);
}

/* ── SPLASH SCREEN ────────────────────────────────────────────── */
.mf-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--mf-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 4vh, 36px);
    overflow: hidden;
    opacity: 1;
    transition: opacity .65s ease;
}

.mf-splash.hidden {
    opacity: 0;
    pointer-events: none;
}

.mf-splash-glow {
    position: absolute;
    width: min(75vw, 650px);
    height: min(75vw, 650px);
    background: radial-gradient(circle, rgba(241, 196, 15, .07) 0%, transparent 70%);
    border-radius: 50%;
    animation: mf-glow-pulse 6s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes mf-glow-pulse {
    from {
        transform: scale(1);
        opacity: .5;
    }

    to {
        transform: scale(1.35);
        opacity: 1;
    }
}

.mf-splash-logo-group {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    animation: mf-rise .7s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes mf-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mf-splash-logo {
    width: clamp(72px, 16vw, 110px);
    height: auto;
    filter: drop-shadow(0 0 18px rgba(241, 196, 15, .22));
    animation: mf-float 4s ease-in-out infinite;
}

@keyframes mf-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.mf-splash-title {
    font-size: clamp(30px, 9vw, 50px);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1;
    margin: 0;
    background: linear-gradient(to bottom, #fff 40%, #555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mf-splash-subtitle {
    font-size: clamp(9px, 2vw, 11px);
    font-weight: 700;
    color: rgba(255, 255, 255, .3);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0;
}

.mf-splash-progress {
    z-index: 10;
    width: clamp(150px, 38vw, 210px);
    display: flex;
    flex-direction: column;
    gap: 7px;
    animation: mf-rise .7s .2s cubic-bezier(.22, 1, .36, 1) both;
}

.mf-splash-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, .08);
    border-radius: 2px;
    overflow: hidden;
}

.mf-splash-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--mf-accent), #f39c12);
    border-radius: 2px;
    transition: width .1s linear;
}

.mf-splash-status {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, .22);
    letter-spacing: 1.5px;
    text-align: center;
    text-transform: uppercase;
}

.mf-splash-version {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, .13);
    letter-spacing: 1px;
    z-index: 10;
}

.mf-splash-footer {
    position: absolute;
    bottom: 18px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, .16);
    letter-spacing: 1px;
    z-index: 10;
}

.mf-splash-footer span {
    color: var(--mf-accent);
}

/* ── YATAY MOD UYARISI ────────────────────────────────────────── */
.mf-landscape-warning {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--mf-bg);
    z-index: 100000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--mf-text);
    text-align: center;
}

.mf-landscape-warning i {
    font-size: 60px;
    margin-bottom: 22px;
    color: var(--mf-accent);
    animation: mf-rotate-phone 2s infinite ease-in-out;
}

.mf-landscape-warning p {
    font-size: 17px;
    font-weight: 600;
    padding: 0 36px;
    line-height: 1.5;
    color: #cfd8dc;
}

@keyframes mf-rotate-phone {
    0% {
        transform: rotate(-90deg);
        opacity: .8;
    }

    50% {
        transform: rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: rotate(-90deg);
        opacity: .8;
    }
}

@media screen and (orientation: landscape) and (max-height: 600px) {
    .mf-landscape-warning {
        display: flex;
    }
}

/* ── LOADER ───────────────────────────────────────────────────── */
.mf-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--mf-text);
    font-weight: 700;
    font-size: 12px;
    display: none;
    background: rgba(0, 0, 0, .82);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 200;
    border: 1px solid rgba(255, 255, 255, .15);
}

/* ── ORTAK ANİMASYONLAR ───────────────────────────────────────── */
@keyframes mf-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes mf-float3 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes mf-rain {
    0% {
        transform: translateY(-5px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(5px);
        opacity: 0;
    }
}

@keyframes mf-snow {
    0% {
        transform: translateY(-5px);
        opacity: 0;
    }

    100% {
        transform: translateY(5px);
        opacity: 1;
    }
}

@keyframes mf-flash {

    0%,
    90%,
    100% {
        opacity: 0;
    }

    92%,
    98% {
        opacity: 1;
    }
}

.anm-sun {
    animation: mf-spin 12s linear infinite;
}

.anm-cloud {
    animation: mf-float3 3s ease-in-out infinite;
}

.anm-drop {
    animation: mf-rain 1s linear infinite;
}

.anm-flake {
    animation: mf-snow 2s linear infinite;
}

.anm-bolt {
    animation: mf-flash 3s infinite;
}

/* ── MOBİL GENEL ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .mf-brand-module {
        display: none;
    }

    .mf-status-pill span {
        display: none;
    }

    .mf-search input {
        width: 120px;
    }

    .mf-search input:focus {
        width: 150px;
    }
}