/* ============================================
   CCTV Partner — Mobile Responsive Stylesheet
   Sadece responsive kurallar. Mevcut style.css'i bozmaz.
   ============================================ */

/* ===== HAMBURGER BUTTON ===== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    z-index: 200;
}

/* ===== MOBILE NAV DRAWER ===== */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 150;
    backdrop-filter: blur(4px);
}
.mobile-nav-overlay.open { display: block; }

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: #0f172a;
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 200;
    transition: right 0.3s ease;
    padding: 70px 20px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mobile-nav-drawer.open { right: 0; }

.mobile-nav-drawer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-main);
    border-radius: 10px;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.2s;
    text-decoration: none;
}
.mobile-nav-drawer a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--accent);
}
.mobile-nav-drawer .nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 8px 0;
}
.mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== SIDEBAR MOBILE STRIP ===== */
/* Mobilde sidebar, yatay kaydırılabilir şerit olacak */

/* ===== TABLET: 768px ===== */
@media (max-width: 768px) {
    /* --- Header --- */
    .hamburger-btn { display: block; }
    .nav-links { display: none !important; }
    .nav-container {
        height: 56px;
        min-height: 56px;
    }
    /* Mobilde sadece kredi rozeti + hamburger göster, Panelim/Çıkış drawer'da */
    .auth-links .btn { display: none !important; }
    .auth-links { gap: 6px; }
    .auth-links a[href="/login"],
    .auth-links a[href="/register"] { display: none !important; }

    /* --- User Sidebar → Horizontal Strip --- */
    .sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding: 12px 10px !important;
    }
    .sidebar .user-info { display: none !important; }
    .sidebar .sidebar-nav {
        flex-direction: row !important;
        gap: 6px !important;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
    }
    .sidebar .sidebar-nav::-webkit-scrollbar { display: none; }
    .sidebar .sidebar-nav a {
        white-space: nowrap;
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
        border-radius: 20px !important;
        min-width: max-content;
    }
    .sidebar .sidebar-nav a i { width: auto !important; margin-right: 4px; }
    .sidebar .sidebar-nav hr,
    .sidebar .sidebar-nav div[style*="height: 1px"] { display: none !important; }

    /* --- Dashboard Wrapper → Vertical --- */
    .dashboard-wrapper {
        flex-direction: column !important;
        min-height: auto !important;
    }

    /* --- Dashboard Content --- */
    .dashboard-content {
        padding: 20px 15px !important;
        grid-template-columns: 1fr !important;
    }

    /* --- Stats Grid --- */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* --- Dashboard Row2 (Kupon + Sunucu Durumu) --- */
    .dashboard-content > div > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* --- Generator / Video 2-column → 1-column --- */
    .generator-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 20px 15px !important;
    }

    /* --- Dashboard Row2 (Kupon + Sunucu Durumu) --- */
    .dashboard-row2 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* --- Premium Cards padding --- */
    .brand-premium-card {
        padding: 20px !important;
    }
    .generator-form {
        padding: 20px !important;
    }

    /* --- Quick Start grid --- */
    .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* --- Auth cards --- */
    .auth-card {
        padding: 30px 20px !important;
        margin: 0 10px;
    }

    /* --- Gallery grid --- */
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* --- Footer --- */
    .footer-container {
        flex-direction: column;
        gap: 25px;
    }

    /* --- Index / Landing Prompt --- */
    .prompt-container {
        margin: 30px auto 20px auto !important;
        padding: 0 15px !important;
    }
    .prompt-box {
        border-radius: 20px !important;
        padding: 8px 8px 8px 16px !important;
        flex-wrap: wrap;
    }
    .prompt-input {
        font-size: 0.95rem !important;
        min-width: 0;
    }
    .prompt-btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Index gallery section --- */
    .landing-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* --- Pricing grid --- */
    .pricing-grid,
    div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    /* --- Admin Tables → horizontal scroll --- */
    .admin-table-wrapper,
    div[style*="overflow-x: auto"],
    .brand-premium-card > table,
    .brand-premium-card > div > table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table { min-width: 600px; }

    /* --- Monitor modal --- */
    #logDetailModal > div {
        max-width: 95vw !important;
        border-radius: 12px !important;
    }
    #logDetailModal [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* --- Profile Page --- */
    .profile-wrapper {
        flex-direction: column !important;
    }
    .profile-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding: 12px 10px !important;
    }
    .profile-content {
        padding: 20px 15px !important;
    }
    .profile-card {
        padding: 20px !important;
    }

    /* --- Buy Credits (credit packages grid) --- */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(300px"],
    .buy-credits-bottom-grid {
        grid-template-columns: 1fr !important;
    }

    /* --- Public Gallery masonry → single column --- */
    .public-gallery-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto !important;
    }
    .pg-item { min-height: 200px; }

    /* --- General typography --- */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }

    /* Headings inside dashboard content */
    .dashboard-content h1 { font-size: 1.4rem !important; }

    /* Padding tweaks for cards */
    .brand-premium-card[style*="padding: 25px 30px"] {
        padding: 18px 15px !important;
    }

    /* Status monitor grid */
    .status-monitor-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== PHONE: 480px ===== */
@media (max-width: 480px) {
    .nav-container { padding: 0 10px; }
    .logo { font-size: 1.1rem; }
    .logo i { display: none; }
    
    /* Auth links — hide text on very small screens */
    .auth-links .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Sidebar nav items - compact */
    .sidebar .sidebar-nav a {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }

    /* Dashboard content */
    .dashboard-content {
        padding: 15px 10px !important;
    }

    /* Generator form */
    .generator-form { padding: 15px !important; }
    .generator-form h1 { font-size: 1.2rem !important; }

    /* Stats card icon box */
    .stats-grid .brand-premium-card > div[style*="width: 70px"] {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.3rem !important;
    }

    /* Gallery items */
    .gallery-item-premium {
        border-radius: 12px !important;
    }
    .gallery-item-premium div[style*="padding: 20px"] {
        padding: 15px !important;
    }

    /* Monitor / Admin tables */
    table { min-width: 500px; font-size: 0.8rem; }
    table td, table th { padding: 8px 10px !important; }

    /* Index hero */
    .prompt-container h1 { font-size: 1.6rem !important; }

    /* Buy credits page */
    .credit-packages-grid {
        grid-template-columns: 1fr !important;
    }
}
