/* 1. EN ÜSTTEKİ html, body KISMINI BUNUNLA DEĞİŞTİRİN: */
html {
    margin: 0;
    padding: 0;
    height: -webkit-fill-available;
}

body {
    margin: 0;
    padding: 0;
    padding-top: 70px !important;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: clip !important; /* hidden yerine clip kullanmak fixed menülerin kaymasını %100 önler */
    position: relative;
}


.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(16px, calc((100% - 1150px) / 2));
    height: 62px;
    background: #ffffff;
    border-bottom: 1px solid #e6e9f2;
    box-shadow: 0 2px 14px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 2050 !important;
    overflow: visible !important;
    box-sizing: border-box;
    transform: translateZ(0);
}

/* Sol Kısım: Logoyu Sola İter */
.top-nav .tn-brand {
    flex: 1;
    display: flex; align-items: center; justify-content: flex-start; gap: 8px;
    font-size: 1.05rem; font-weight: 900; color: #0f172a;
    text-decoration: none; white-space: nowrap;
}
.top-nav .tn-brand .tn-logo {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #ff8a3d, #ff6b00);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; box-shadow: 0 4px 10px rgba(255,107,0,.3);
}

/* Orta Kısım: Menüleri Tam Ekrana Göre Ortalar */
.top-nav .tn-links {
    flex: 0 0 auto;
    display: flex; gap: 10px;
}
.top-nav .tn-links a {
    padding: 8px 16px; border-radius: 10px;
    font-size: .85rem; font-weight: 700; color: #475569;
    text-decoration: none; transition: all .18s ease; white-space: nowrap;
}
.top-nav .tn-links a:hover { background: #f1f5f9; color: #0f172a; }
.top-nav .tn-links a.tn-active {
    background: linear-gradient(135deg, #ff8a3d, #ff6b00);
    color: #fff; box-shadow: 0 4px 12px rgba(255,107,0,.25);
}

/* ─────────── PROFİL İKONU + DROPDOWN (MASAÜSTÜ İLE MOBİL BİREBİR AYNI) ─────────── */
.tn-profile {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative !important;
    z-index: 2055 !important;
}

.tn-profile-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px !important;
    padding: 5px 12px 5px 5px !important;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tn-profile-btn:hover,
.tn-profile-btn:active {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.tn-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
    background: linear-gradient(135deg, #1e293b, #0f172a); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem;
    box-shadow: 0 3px 8px rgba(15,23,42,0.2);
}

.tn-uname {
    display: inline-block !important;
    font-size: .84rem;
    font-weight: 800;
    color: #1e293b;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-status {
    display: inline-block !important;
    font-size: .62rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
}
.tn-status.vip {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
}

.tn-caret {
    font-size: 0.7rem;
    color: #64748b;
    margin-left: 2px;
    transition: transform 0.2s ease;
}
.tn-profile.is-open .tn-caret {
    transform: rotate(180deg);
}

.tn-dropdown {
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    top: calc(100% + 10px) !important;
    min-width: 250px;
    background: #ffffff !important;
    border: 1px solid #e6e9f2 !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 44px rgba(15,23,42,.22) !important;
    padding: 8px !important;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 999999 !important;
}
.tn-dropdown.open {
    display: flex !important;
    animation: tnDropFade 0.18s ease-out;
}
@keyframes tnDropFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.tn-dd-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 12px; border-bottom: 1px solid #f0f2f8; margin-bottom: 6px;
}
.tn-dd-head strong { font-size: .9rem; color: #0f172a; }
.tn-dd-badge {
    font-size: .6rem; font-weight: 800; padding: 3px 8px;
    border-radius: 999px; background: #f1f5f9; color: #475569; white-space: nowrap;
}
.tn-dd-badge.vip { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; }

.tn-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    font-size: .85rem; font-weight: 700; color: #334155; text-decoration: none;
    transition: background .15s ease;
}
.tn-dropdown a:hover,
.tn-dropdown a:active { background: #f1f5f9; color: #0f172a; }

.tn-badge {
    margin-left: auto; background: #e11d48; color: #fff;
    font-size: .62rem; font-weight: 800; min-width: 18px; height: 18px;
    border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ─────────── ALT MENÜ (MOBİL) ─────────── */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 64px !important; /* Sabit ve net yükseklik */
    background: #ffffff !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06) !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0 5px !important;
    margin: 0 !important;
    z-index: 9999 !important;
    box-sizing: border-box !important;
    transform: translateZ(0); /* Mobil GPU sabitlemesi */
    -webkit-transform: translateZ(0);
}

/* Mobil ekranın altında boşluk kalmaması için gerçek telefon çentiği varsa ekle, yoksa 0 tut */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }
}

.bn-item {
    color: #6c7a89;
    text-align: center;
    font-size: 0.68rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex: 1;
    height: 64px !important; /* İç elemanların uzamasını engeller */
    opacity: 0.85;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}

.bn-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 3px;
    font-size: 20px;
    line-height: 26px;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.bn-item.active { opacity: 1; }
.bn-item.active .bn-icon { transform: translateY(-2px) scale(1.12); filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.bn-item.active span { color: #f27a24; font-weight: 800; }

.bn-item.bn-center {
    flex: 1.2;
    opacity: 1;
    position: relative;
}

.bn-item.bn-center .bn-icon {
    width: 58px !important;
    height: 58px !important;
    font-size: 28px;
    line-height: 1;
    background: linear-gradient(135deg, #ff8a3d, #ff6b00);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 15px rgba(255,107,0,0.3);
    border: 4px solid #ffffff;
    margin-top: -28px; /* Yukarı taşma mesafesi dengelendi */
    z-index: 100;
    transition: transform .2s;
}
.bn-item.bn-center:active .bn-icon { transform: scale(0.92); }

/* ─────────── RESPONSIVE (Mobil ↔ Masaüstü) ─────────── */
@media (max-width: 767px) {
    .top-nav .tn-links { display: none !important; }
    /* Mobilde de masaüstü gibi kullanıcı adı ve VIP etiketi net görünsün */
    .top-nav .tn-uname {
        display: inline-block !important;
        max-width: 105px;
        font-size: 0.8rem;
    }
    .top-nav .tn-status {
        display: inline-block !important;
    }
    .top-nav .tn-profile-btn {
        padding: 4px 10px 4px 4px !important;
        border-radius: 999px !important;
    }
    .tn-dropdown {
        min-width: 235px;
        max-width: calc(100vw - 24px);
    }
    body { padding-bottom: 92px !important; }
}

@media (min-width: 768px) {
    .bottom-nav { display: none !important; }
    .date-nav { top: 62px; }
}

/* ─────────── MOBİL YAN MENÜ (SIDEBAR) ─────────── */
.ms-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.5);
    z-index: 10000;
    opacity: 0; visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}
.ms-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-sidebar {
    position: fixed; top: 0; left: 0;
    width: 80%; max-width: 320px; height: 100%;
    background: #ffffff;
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.mobile-sidebar.show { transform: translateX(0); }

.ms-header {
    padding: 20px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}
.ms-brand { font-size: 1.3rem; font-weight: 900; color: #0f172a; letter-spacing: -0.5px; }
.ms-brand span { color: #ff6b00; }
.ms-close {
    background: #fff; border: 1px solid #e2e8f0; padding: 6px;
    color: #64748b; cursor: pointer; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.ms-close:hover { background: #f1f5f9; color: #0f172a; }

.ms-profile { display: flex; align-items: center; gap: 12px; }
.ms-p-info { display: flex; flex-direction: column; }
.ms-p-info strong { font-size: 1rem; color: #0f172a; font-weight: 800; line-height: 1.2; }
.ms-p-info span { font-size: 0.75rem; color: #64748b; font-weight: 600; }

.ms-body { padding: 15px 20px; overflow-y: auto; flex: 1; }
.ms-section-title {
    font-size: 0.70rem; font-weight: 800; color: #94a3b8;
    text-transform: uppercase; margin: 24px 0 10px; letter-spacing: 0.5px;
}
.ms-section-title:first-child { margin-top: 5px; }

.ms-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 12px; margin-bottom: 4px;
    font-size: 0.95rem; font-weight: 700; color: #334155; text-decoration: none;
    transition: all 0.2s ease;
}
.ms-link:hover, .ms-link:active { background: #f1f5f9; color: #0f172a; transform: translateX(4px); }

.ms-link.text-danger { color: #e11d48; }
.ms-link.text-danger:hover { background: #fff1f2; color: #be123c; }
.ms-link.text-premium { color: #d97706; }
.ms-link.text-premium:hover { background: #fffbeb; color: #b45309; }

.ms-divider { height: 1px; background: #e2e8f0; margin: 15px 0; }

/* CANLI TV BUTONU (Youtube Tarzı) */
.tn-tv-btn {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    border: 1px solid #f87171;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}
.tn-tv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #f87171, #dc2626);
}
.tn-tv-btn i {
    font-size: 1rem;
}

/* YENİ SADE AVATAR STİLİ */
.tn-profile {
    flex: 0 0 auto !important; /* Artık genişlemesine gerek yok */
}
.tn-profile-btn {
    padding: 2px !important; /* Düğme kenar boşluklarını sildik, tam yuvarlak olacak */
    border: 2px solid transparent !important;
}
.tn-profile-btn:hover {
    border-color: #cbd5e1 !important;
}
.tn-avatar {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
}
.tn-avatar.vip-avatar {
    border: 2px solid #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

/* Eski kaldırılan elemanları CSS ile de gizleyelim (ne olur ne olmaz) */
.tn-uname, .tn-status, .tn-caret {
    display: none !important;
}