/**
 * Pulsrad - Tam Kapsamlı Mobil & Responsive Tasarım Sistemi
 * Standart: pulsrad-standards SKILL (Tüm cihazlarda %100 uyum, sıfır yatay taşma)
 * Breakpoints: 1200px, 992px, 768px, 480px, 360px
 */

/* --------------------------------------------------------------------------
   1. GENEL SIFIR TAŞMA & ESNEK KAPSAYICI STANDARTLARI
   -------------------------------------------------------------------------- */
html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

/* Tabloların mobilde ekrandan taşmasını kesin olarak önleyen kapsayıcı */
.table-responsive,
.table-wrap,
[style*="overflow-x: auto"] {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* --------------------------------------------------------------------------
   2. MOBİL ALT GEZİNME BARI (MOBILE BOTTOM NAVIGATION)
   Standart: pulsrad-standards SKILL
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
    display: none; /* Masaüstünde gizli */
}

@media (max-width: 768px) {
    body {
        padding-bottom: 72px !important; /* Alt barın içeriği örtmesini önler */
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(10, 15, 29, 0.95);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid rgba(0, 255, 136, 0.2);
        z-index: 9999;
        align-items: center;
        justify-content: space-around;
        padding: 0 0.5rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        color: #94a3b8;
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.2px;
        padding: 0.35rem 0.6rem;
        border-radius: 8px;
        transition: all 0.2s ease;
        flex: 1;
        max-width: 75px;
    }

    .mobile-bottom-nav-item svg {
        width: 20px;
        height: 20px;
        transition: transform 0.2s ease;
    }

    .mobile-bottom-nav-item.active,
    .mobile-bottom-nav-item:hover {
        color: #00ff88;
    }

    .mobile-bottom-nav-item.active svg {
        transform: translateY(-2px);
        stroke: #00ff88;
    }
}

/* --------------------------------------------------------------------------
   3. GENEL NAVBAR & MOBİL MENÜ ÇEKMECESİ (DRAWER)
   -------------------------------------------------------------------------- */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    color: var(--text-primary, #ffffff);
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 15, 29, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 136, 0.25);
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 9998;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
    animation: drawerSlideDown 0.25s ease-out forwards;
}

.mobile-nav-drawer.active {
    display: flex;
}

@keyframes drawerSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   4. EKRAN BOYUTLARINA GÖRE GELİŞMİŞ MEDIA QUERIES
   -------------------------------------------------------------------------- */

/* TABLET & KÜÇÜK DİZÜSTÜ (<= 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.25rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .auth-layout,
    .split-auth-layout {
        flex-direction: column !important;
    }

    .auth-visual-column {
        display: none !important; /* Mobilde ve dar ekranda sol dev afişi gizle, formu öne çıkar */
    }

    .auth-form-column {
        width: 100% !important;
        max-width: 540px !important;
        margin: 0 auto;
        padding: 1.5rem !important;
    }
}

/* TABLET (<= 992px) */
@media (max-width: 992px) {
    .nav-menu {
        display: none !important; /* Masaüstü menüsünü gizle, drawer menüye devret */
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-actions .btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2.5rem 1.5rem !important;
    }

    .pricing-grid {
        grid-template-columns: 1fr !important;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Terminal sayfa başlığı */
    .terminal-topbar {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .terminal-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* STANDART MOBİL CİHAZLAR (<= 768px) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    /* Kullanıcı Paneli Header Barı */
    .user-navbar-container {
        padding: 0.65rem 1rem !important;
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
    }

    .user-nav-left {
        width: 100% !important;
        justify-content: space-between !important;
        gap: 0.75rem !important;
    }

    .user-nav-links {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.25rem;
        gap: 0.35rem !important;
        -webkit-overflow-scrolling: touch;
    }

    .user-nav-links::-webkit-scrollbar {
        display: none;
    }

    .user-nav-item a {
        padding: 0.4rem 0.85rem !important;
        font-size: 0.8rem !important;
    }

    .user-nav-right {
        width: 100% !important;
        justify-content: space-between !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 0.5rem;
    }

    .user-info-text {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.78rem !important;
    }

    /* Borsa Sekmeleri (Tabs) */
    .exchange-tabs-nav,
    .chain-tabs-nav {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding: 0.5rem 0.25rem 0.75rem 0.25rem !important;
        gap: 0.6rem !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .exchange-tabs-nav::-webkit-scrollbar,
    .chain-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .exchange-tab-btn,
    .chain-tab-btn {
        flex: 0 0 auto !important;
        padding: 0.65rem 1.15rem !important;
        font-size: 0.85rem !important;
    }

    /* Canlı Kart Akışı Gridleri */
    .realtime-cards-grid,
    .whale-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* İstatistik kutuları */
    .stat-box-container,
    .terminal-summary-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* Tablolar ve Taşmalar */
    .table-radar {
        min-width: 680px; /* Tablo içeriği sıkışıp metinler üst üste binmesin, pürüzsüz yatay kaysın */
    }

    .table-radar th,
    .table-radar td {
        padding: 0.75rem 0.85rem !important;
        font-size: 0.82rem !important;
    }

    /* Radar Hero Başlıkları */
    h1 {
        font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
    }

    h2 {
        font-size: clamp(1.4rem, 5vw, 1.8rem) !important;
    }

    /* Kilit Katmanı (Paywall Overlay) Mobilde Ölçekleme */
    [style*="position: absolute; inset: 0"] {
        padding: 1rem !important;
    }

    [style*="position: absolute; inset: 0"] h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.35rem !important;
    }

    [style*="position: absolute; inset: 0"] p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
    }

    [style*="position: absolute; inset: 0"] .btn {
        padding: 0.55rem 1.1rem !important;
        font-size: 0.82rem !important;
    }

    /* Footer Mobil */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: left;
    }

    .footer-bottom {
        flex-direction: column !important;
        gap: 1.25rem !important;
        align-items: flex-start !important;
    }

    .footer-bottom-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* KÜÇÜK MOBİL EKRANLAR (<= 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    /* İstatistik kartları tek kolona */
    .stat-box-container,
    .terminal-summary-stats {
        grid-template-columns: 1fr !important;
    }

    /* Butonlar mobilde tam genişlik veya esnek */
    .hero-actions .btn,
    .contact-grid .btn-block {
        width: 100% !important;
    }

    .auth-form-center-box {
        padding: 1.25rem 0.5rem !important;
    }

    /* Modal pencereler */
    .forgot-modal-box {
        width: 94% !important;
        padding: 1.5rem !important;
    }

    .user-plan-badge {
        font-size: 0.68rem !important;
        padding: 0.25rem 0.6rem !important;
    }

    .btn-upgrade-plan {
        font-size: 0.68rem !important;
        padding: 0.25rem 0.55rem !important;
    }

    .btn-logout {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.75rem !important;
    }

    /* Akordeon Sıkça Sorulan Sorular */
    .radar-accordion-title {
        font-size: 0.95rem !important;
    }

    .radar-accordion-num {
        font-size: 0.85rem !important;
        margin-right: 0.35rem !important;
    }

    /* Paket tablosu */
    .pricing-toggle-wrap {
        gap: 0.5rem !important;
    }

    .pricing-toggle-btn {
        padding: 0.45rem 0.85rem !important;
        font-size: 0.82rem !important;
    }
}

/* --------------------------------------------------------------------------
   5. YASAL SAYFALAR (TERMS, AGREEMENT, PRIVACY) DÜZENİ
   Kart yok, rozet yok, solda sticky menü, ferah editoryal okuma alanı.
   -------------------------------------------------------------------------- */
.legal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: start;
}

.legal-content {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: 1rem;
}

.legal-content h1 {
    font-size: clamp(2.2rem, 3.8vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.legal-content h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: -0.01em;
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
}

.legal-content p {
    margin-bottom: 1.25rem;
}

.legal-content ul, .legal-content ol {
    margin: 0.75rem 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-content li {
    padding-left: 0.25rem;
}

.legal-notice-box {
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid #f59e0b;
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.75rem 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.legal-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.legal-nav-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.2s ease;
}

.legal-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.legal-nav-link.active {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.08);
    border-left-color: #00ff88;
    font-weight: 700;
}

.legal-nav-link.active .legal-nav-bullet {
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

@media (max-width: 992px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .legal-sidebar {
        position: static !important;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1.5rem;
        margin-bottom: 1rem;
    }

    .legal-sidebar nav {
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }

    .legal-nav-link {
        border-left: none !important;
        border-bottom: 2px solid transparent;
        border-radius: 6px;
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }

    .legal-nav-link.active {
        border-bottom-color: #00ff88;
    }
}


