/* ═══════════════════════════════════════════════
   TARAFTARBOX — TAM MOBİL UYUM + BOTTOM NAV
   ═══════════════════════════════════════════════ */

/* ── Yardımcı Sınıflar ── */
.desktop-only { display: flex !important; }
.mobile-only  { display: none !important; }

/* ── Navbar Scroll Efekti ── */
.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
    border-bottom-color: rgba(0,255,136,0.15);
}

/* ── Mobil Arama Kutusu ── */
.mobile-search-bar {
    display: none;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.2s ease;
}
.mobile-search-bar.show { display: block; }
.mobile-search-bar form {
    display: flex;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    padding: 0 0.5rem;
}
.mobile-search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.65rem 0.5rem;
    font-size: 0.9rem;
    outline: none;
}
.mobile-search-bar button {
    background: none;
    border: none;
    color: var(--neon-green);
    padding: 0.6rem;
    cursor: pointer;
    font-size: 1rem;
}
.mobile-search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-search-btn:hover { color: var(--neon-green); background: rgba(0,255,136,0.08); }

@keyframes slideDown {
    from { opacity:0; transform:translateY(-8px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ══════════════════════════════════════
   MOBİL BOTTOM NAVİGASYON BAR
   ══════════════════════════════════════ */
.mobile-bottom-nav {
    display: none; /* masaüstünde gizli */
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 6px 0 max(10px, env(safe-area-inset-bottom));
    display: none;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 500;
    transition: all 0.25s ease;
    position: relative;
}
.bottom-nav-item i { font-size: 1.2rem; }
.bottom-nav-item.active { color: var(--neon-green); }
.bottom-nav-item.active i { filter: drop-shadow(0 0 6px var(--neon-green)); }

/* Canlı maç ikonu */
.bottom-nav-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bottom-live-dot {
    position: absolute;
    top: -2px; right: -4px;
    width: 7px; height: 7px;
    background: var(--neon-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
.live-glow { filter: drop-shadow(0 0 8px var(--neon-green)); }
.live-glow .bottom-live-dot { background: var(--neon-green); }

/* Ortadaki FAB (Kupon Oluştur) */
.bottom-nav-center { color: var(--text-muted); }
.bottom-nav-fab {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--neon-green), #00cc6a);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-top: -18px;
    box-shadow: 0 0 20px rgba(0,255,136,0.5), 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}
.bottom-nav-fab i { color: #000; font-size: 1.1rem; font-weight: 900; }
.bottom-nav-center:active .bottom-nav-fab {
    transform: scale(0.92);
    box-shadow: 0 0 12px rgba(0,255,136,0.3);
}

/* Avatar */
.bottom-nav-avatar img {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    object-fit: cover;
}
.bottom-nav-item.active .bottom-nav-avatar img {
    border-color: var(--neon-green);
    box-shadow: 0 0 8px rgba(0,255,136,0.4);
}

/* Footer mobilde gizle */
.desktop-footer { display: block; }

/* ══════════════════════════════════════
   RESPONSİVE KURALLAR
   ══════════════════════════════════════ */

/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {
    .navbar-menu { display: none; }
    .mobile-menu-btn { display: flex !important; }

    /* Navbar menü açılınca */
    .navbar-menu.show {
        display: flex;
        position: fixed;
        top: 64px; left: 0; right: 0;
        flex-direction: column;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 0;
        z-index: 999;
        animation: slideDown 0.2s ease;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    .navbar-menu.show .nav-link {
        padding: 1rem 1.5rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.03);
        font-size: 1rem;
    }
    .navbar-menu.show .nav-link.active {
        background: rgba(0,255,136,0.06);
    }

    .search-box { display: none !important; }
    .desktop-only { display: none !important; }
    .mobile-only  { display: flex !important; }
}

/* ── Mobil (≤ 768px) ── */
@media (max-width: 768px) {
    /* Bottom nav göster */
    .mobile-bottom-nav {
        display: grid !important;
    }

    /* İçerik alta kaymasın diye padding */
    .main-content {
        margin-top: 64px;
        padding-bottom: 80px; /* bottom nav yüksekliği */
    }

    /* Footer'ı gizle */
    .desktop-footer { display: none; }

    /* Genel container paddingi */
    .container { padding: 0 0.75rem; }

    /* Grid düzeltmeleri */
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-5 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }

    /* Section padding küçült */
    .section { padding: 1rem 0.75rem; }

    /* Card padding küçült */
    .card-body { padding: 0.9rem; }

    /* Kupon listesi */
    .coupon-show-grid { grid-template-columns: 1fr; }

    /* Admin tablolar scroll */
    .admin-table-wrap { overflow-x: auto; }
    .admin-table { min-width: 600px; }

    /* Hero slider */
    .hero-slider { height: 220px !important; }
    .slide-title { font-size: 1.2rem !important; }
    .slide-content { padding: 1rem !important; }

    /* Maç kartları */
    .match-grid { grid-template-columns: 1fr !important; }

    /* Picks tablosu mobil */
    .picks-table-head, .pick-row-item {
        grid-template-columns: 2fr 1fr 0.7fr 0.5fr !important;
    }
    .hide-sm { display: none !important; }

    /* Film grid */
    .movie-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 0.5rem !important; }

    /* Kupon oluşturma formu */
    .coupon-form-grid { grid-template-columns: 1fr !important; }
    .pick-inputs { flex-wrap: wrap; }
    .pick-inputs .form-control { min-width: 0; }

    /* Stats bar küçült */
    .stats-bar-ticker { font-size: 0.75rem; }

    /* Section header */
    .section-header { flex-wrap: wrap; gap: 0.5rem; }
    .section-title { font-size: 1.1rem; }

    /* Profil */
    .profile-grid { grid-template-columns: 1fr !important; }

    /* Auth sayfaları */
    .auth-container { margin: 1rem auto; }
    .auth-card { padding: 1.5rem; border-radius: var(--radius); }
}

/* ── Küçük Mobil (≤ 480px) ── */
@media (max-width: 480px) {
    .movie-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-2 { grid-template-columns: 1fr; }
    .cdc-stats-row { grid-template-columns: repeat(2, 1fr) !important; }
    .form-grid-2 { grid-template-columns: 1fr !important; }

    /* Navbar brand küçük */
    .brand-text { font-size: 1.1rem; }
    .brand-icon { font-size: 1.2rem; }
}

/* ── iOS Safe Area ── */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    .main-content {
        padding-bottom: max(80px, calc(60px + env(safe-area-inset-bottom)));
    }
}
