/* =========================================
   MACBOOK И НЕБОЛЬШИЕ ЭКРАНЫ (до 1440px)
   ========================================= */
@media (max-width: 1440px) {
    .editorial-nav { padding: 1.5rem 3rem; }
    .bg-word-left { font-size: 15vh; height: 30%; }
    .bg-word-right { font-size: 35vw; }
    .shop-container { max-width: 1200px; }
    .verif-container { max-width: 1100px; gap: 2rem; }
    .dossier-wrapper { max-width: 1000px; }
    .cyber-name { font-size: 2.5rem; }
    .cyber-value { font-size: 3.5rem; }
}

/* =========================================
   ПЛАНШЕТЫ И IPAD (до 1024px)
   ========================================= */
@media (max-width: 1024px) {
    .editorial-nav { padding: 1.5rem 2rem; }
    .nav-right { gap: 1.5rem; }
    .nav-menu { gap: 1.5rem; }
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .verif-title { font-size: 4rem; }
    .discord-profile-container { padding: 0 1rem; }
    .mafia-grid { grid-template-columns: 1fr; gap: 2rem; }
    .leaderboard-grid { grid-template-columns: 1fr; gap: 2rem; }
    .verif-container { grid-template-columns: 1fr; gap: 3rem; }
    .top-left { top: 15%; left: 2rem; }
    .bottom-left { bottom: 2rem; left: 2rem; }
    .mid-left { left: 2rem; }
    .mid-right { right: 5%; }
    .bottom-right { bottom: 2rem; right: 2rem; }
    
    /* Центрируем всплывающий профиль на планшетах и мобильных (до 1024px) */
    .discord-profile-popup {
        position: fixed;
        top: 50%; left: 50%;
        right: auto;
        transform: translate(-50%, -50%) !important;
        width: 90%; max-width: 320px; z-index: 9999;
    }
    .discord-profile-popup.hidden { transform: translate(-50%, -40%) !important; }
}

/* =========================================
   МОБИЛЬНЫЕ ТЕЛЕФОНЫ (до 768px)
   ========================================= */
@media (max-width: 768px) {
    /* Добавляем отступ для тела, чтобы контент не уезжал под фиксированный навбар */
    body {
        padding-top: 6rem;
    }

    /* Навигация и Бургер-меню */
    .editorial-nav { padding: 1rem 1.5rem; }
    
    .logo { z-index: 200; position: relative; }
    
    .burger-menu { display: block; } /* Показываем иконку меню */

    /* Прячем правую часть меню в выезжающую шторку */
    .nav-right {
        position: fixed;
        top: 0; right: -100%;
        width: 100%; height: 100vh;
        background: rgba(var(--bg-rgb), 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 150;
    }

    .nav-right.active { right: 0; }

    /* Центрируем ссылки меню */
    .nav-menu {
        flex-direction: column;
        font-size: 1.5rem;
        gap: 2rem;
        text-align: center;
    }

    /* Кнопка входа и профиль */
    .nav-auth-container { flex-direction: column; gap: 1rem; }
    .nav-profile { margin-left: 0; flex-direction: column; gap: 15px; }
    .nav-mini-avatar { width: 80px; height: 80px; }
    .nav-mini-name { font-size: 1.5rem; margin-top: 5px; }
    
    /* Выпадающее меню профиля (теперь встроено в колонку) */
    .profile-dropdown {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        margin-top: 0.5rem;
        min-width: 100%;
        align-items: center;
    }
    .dropdown-item { font-size: 1rem; padding: 0.8rem; }
    
    /* 3D модель и плавающие элементы (Главный сайт) */
    .bg-word-left { font-size: 12vh; }
    .bg-word-right {
        display: none;
    }
    .center-exhibit { width: 100%; height: 50vh; top: 45%; }
    .top-left { top: 5%; left: 1.5rem; }
    .mid-right, .fine-print { display: none; }
    .mid-left { top: auto; bottom: 16rem; left: 1.5rem; }
    .bottom-left { bottom: 7rem; left: 1.5rem; right: auto; }
    .bottom-right { bottom: 7rem; right: 1.5rem; }
    .cyber-join-btn { width: fit-content; padding: 0.8rem 1.5rem; font-size: 0.85rem; gap: 1rem; }
    
    /* Секция верификации */
    .verification-section { padding: 2rem 1.5rem 3rem; }
    .verif-title { font-size: 3rem; }
    
    /* Секция мафии */
    .mafia-section { padding: 2rem 1.5rem 3rem; }
    .mafia-title { font-size: 2.5rem; }
    .mafia-card { padding: 1.5rem; }
    
    /* Секция рейтинга */
    .leaderboard-title { font-size: 1.8rem; }
    .rank-panel { padding: 1rem; }
    .panel-title { font-size: 1.2rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; }
    .rank-item { padding: 0.8rem 0.5rem; }
    .rank-pos { width: 35px; font-size: 1.2rem; }
    .rank-avatar { width: 30px; height: 30px; }
    .rank-user { gap: 0.5rem; }
    .rank-name { font-size: 0.85rem; }
    .rank-val { font-size: 1rem; }
    .vc-panel { padding: 1.5rem; }
    .vc-item { padding: 1rem; }
    
    /* Прелоадер на телефонах */
    
    /* Секция профиля (Discord-like) */
    .cyber-dossier-section { padding: 2rem 1.5rem 3rem; height: auto; min-height: 100vh; }
    .giant-bg { font-size: 22vw; }
    .dp-full-banner { height: 140px; }
    .dp-full-avatar-wrapper { top: 90px; width: 100px; height: 100px; border-width: 6px; }
    .dp-full-body { padding: 50px 16px 16px 16px; }
    .dp-full-display-name { font-size: 1.6rem; }
    .dp-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .dp-subs-grid { grid-template-columns: 1fr; gap: 8px; }
    
    /* Секция магазина */
    .cyber-shop-section { padding: 2rem 1.5rem 3rem; }
    .shop-title { font-size: 2.2rem; }
    .shop-grid { grid-template-columns: 1fr; }
    .coin-banner { flex-direction: column; padding: 2rem 1.5rem; text-align: center; gap: 2rem; }
    .case-banner-img { margin-right: 0; transform: translateY(0); width: 120px; }
    .banner-coin-icon { margin-right: 0; width: 60px; }
    .case-banner-actions { flex-direction: column; width: 100%; }
    .case-divider { width: 100%; height: 1px; margin: 1rem 0; }
    
    /* Лайв-дропы */
    .live-drops-ticker-wrapper { height: 60px; margin-top: 0; padding: 0; }
    .live-drop-item { height: 45px; padding: 5px 12px 5px 5px; margin: 0 10px; }
    .live-drop-avatar { width: 35px; height: 35px; margin-right: 8px; }
    .live-drop-user { font-size: 0.6rem; }
    .live-drop-reward { font-size: 0.75rem; }
    .live-drop-reward-img { width: 16px; height: 16px; }
    .coin-action { align-items: center; }
    .shop-contact { flex-direction: column; }
    .modal-content { max-width: 90%; }
    .modal-header { padding: 1.5rem; }
    .modal-body { padding: 1.5rem; }
    .admin-contact-box { flex-direction: column; gap: 1rem; text-align: center; }

    /* Секция правил */
    .rules-section { padding: 3rem 1.5rem 3rem !important; overflow-x: hidden; }
    .rules-container { width: 100% !important; max-width: 100% !important; margin: 0 auto !important; }
    .rules-title { font-size: 4rem; }
    .rule-category { font-size: 1.2rem; padding: 0.8rem 1rem; }
    .rule-box { padding: 1rem; }
    .rule-meta { flex-direction: column; gap: 0.8rem; }
    .rule-meta-item { justify-content: flex-start; }
    .rules-note-box { padding: 1.5rem; }
    .term-item { flex-direction: column; gap: 0.5rem; }

    /* Секция кейсов */
    .cases-section { padding: 8rem 1.5rem 3rem; }
    .cases-title { font-size: 2.2rem; }
    .drop-table-grid { grid-template-columns: 1fr; }
    .roulette-wrapper { padding: 1.5rem 0; }
    .roulette-item { width: 100px; height: 120px; }
    .roulette-item img { width: 48px; height: 48px; }
    .open-case-area { flex-direction: column; gap: 1.2rem; text-align: center; }
    .multi-open-selector { width: 100%; justify-content: center; }
    .multi-btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
    .roulettes-container.count-10 { grid-template-columns: 1fr; }
    .result-card { padding: 2rem 1.5rem; max-width: 95%; }
    .result-card.multi-mode { padding: 1.5rem 1rem; }
    .multi-result-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .history-item { flex-direction: column; text-align: center; gap: 1rem; }
    .history-item-meta { align-items: center; }
}

/* =========================================
   МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 480px, iPhone 7/SE)
   ========================================= */
@media (max-width: 480px) {
    .editorial-nav { padding: 0.8rem 1rem; }
    .logo { font-size: 1.2rem; }
    
    .nav-menu { font-size: 1.2rem; gap: 1.5rem; }
    .nav-mini-avatar { width: 60px; height: 60px; }
    .cyber-login-btn { padding: 0.6rem 1rem; font-size: 0.8rem; }
    
    .bg-word-left { font-size: 8vh; }
    .cyber-join-btn { padding: 0.7rem 1.2rem; font-size: 0.8rem; }
    
    .verif-title { font-size: 2.2rem; }
    .mafia-title { font-size: 2rem; }
    
    .rank-panel { padding: 0.8rem; }
    .rank-item { padding: 0.6rem 0.4rem; }
    .rank-pos { width: 25px; font-size: 1rem; }
    .rank-avatar { width: 25px; height: 25px; }
    .rank-name { font-size: 0.75rem; }
    .rank-val { font-size: 0.85rem; }
    
    .dp-full-display-name { font-size: 1.3rem; }
    .dp-stats-grid { grid-template-columns: repeat(2, 1fr); }
    
    .shop-title { font-size: 1.8rem; }
    .coin-banner { padding: 1.5rem 1rem; }
    .case-banner-img { width: 100px; }
    
    .rules-title { font-size: 3rem; }
    .rule-category { font-size: 1.1rem; }
    .rule-meta-value { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
    
    .cases-title { font-size: 1.8rem; }
    .roulette-item { width: 80px; height: 100px; }
    .roulette-item img { width: 40px; height: 40px; }
    .roulette-item span { font-size: 0.7rem; }
    .result-card { padding: 1.5rem; }
}

/* =========================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 375px)
   ========================================= */
@media (max-width: 375px) {
    .editorial-nav { padding: 0.6rem 0.8rem; }
    .verif-title { font-size: 1.8rem; }
    .mafia-title { font-size: 1.6rem; }
    .cyber-dossier-section { padding: 1.5rem 1rem 2rem; }
    .dp-stats-grid { grid-template-columns: 1fr; }
    .shop-title, .cases-title { font-size: 1.5rem; }
    .rules-title { font-size: 2.5rem; }
    .coin-banner { padding: 1rem 0.5rem; }
}
