/**
 * Адаптивная верстка для всех разрешений
 * Контент центрируется и ограничивается по ширине как на 1920x1080
 */

/* Основной контейнер для всех страниц */
body {
    min-width: 320px;
    overflow-x: hidden;
}

/* Для больших экранов (>1920px) - центрируем контент */
@media (min-width: 1921px) {
    /* Главная страница */
    body > .content,
    body > header,
    body > main,
    body > section {
        max-width: 1920px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Страницы с сайдбаром */
    body:has(.sidebar) {
        display: flex;
        justify-content: center;
    }
    
    body:has(.sidebar) > * {
        max-width: 1920px;
    }
    
    .sidebar {
        position: fixed;
        left: max(0px, calc((100vw - 1920px) / 2));
    }
    
    .main-content {
        margin-left: 280px;
        max-width: calc(1920px - 280px);
    }
}

/* Средние экраны (1024px - 1440px) */
@media (max-width: 1440px) {
    .box-container {
        width: 90% !important;
        max-width: 900px !important;
    }
    
    .flex-containers {
        width: 90% !important;
        max-width: 1000px !important;
    }
    
    .nav-container {
        max-width: 1000px !important;
    }
    
    .faq-section {
        max-width: 1000px !important;
    }
}

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 20px;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    /* Главная страница на планшетах */
    .box-container {
        width: 95% !important;
        padding: 20px !important;
    }
    
    .flex-containers {
        width: 95% !important;
    }
    
    .flex-container {
        width: 95% !important;
    }
    
    .title-container {
        margin-top: 100px !important;
    }
    
    .secondv {
        max-width: 250px !important;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .header {
        padding: 10px 15px;
    }
    
    /* Футер на мобильных */
    footer {
        width: 95% !important;
        padding: 15px !important;
    }
    
    .footer-container {
        flex-direction: column !important;
        gap: 15px;
        text-align: center !important;
    }
    
    .footer-logo,
    .footer-copyright,
    .footer-social {
        text-align: center !important;
        width: 100%;
    }
    
    /* Карточки релизов в одну колонку */
    .releases-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Уменьшаем размеры элементов */
    h1 {
        font-size: 24px !important;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    .btn, button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .header {
        padding: 8px 10px;
    }
    
    h1 {
        font-size: 20px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
}

/* Главная страница (index.html) - исправление для всех разрешений */

/* Футер - правильное центрирование для всех разрешений */
footer,
#footer {
    position: fixed !important;
    bottom: 500px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 80% !important;
    max-width: 1100px !important;
    margin: 0 !important;
    /* Убираем влияние масштабирования */
    will-change: transform;
}

.footer-container {
    max-width: 100% !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Контейнеры с фиксированной шириной */
.box-container {
    width: 90% !important;
    max-width: 1300px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.flex-containers {
    width: 90% !important;
    max-width: 1500px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.model-container {
    display: none !important; /* Скрываем на маленьких экранах */
}

/* Для экранов меньше 1920px */
@media (max-width: 1920px) {
    .box-container {
        width: 85% !important;
        margin-right: auto !important;
    }
    
    .flex-containers {
        width: 85% !important;
    }
}

/* Для экранов меньше 1600px */
@media (max-width: 1600px) {
    footer {
        width: 85% !important;
        max-width: 1000px !important;
    }
    
    .box-container {
        width: 90% !important;
        max-width: 1100px !important;
    }
    
    .flex-containers {
        width: 90% !important;
        max-width: 1200px !important;
    }
    
    .title-container {
        margin-top: 150px !important;
    }
    
    .secondv {
        max-width: 350px !important;
    }
}

/* Для больших экранов (>1920px) */
@media (min-width: 1921px) {
    .hero-section,
    .features-section,
    .cta-section,
    .music,
    .whywe,
    .whywep {
        max-width: 1920px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .model-container {
        display: flex !important;
    }
}

/* Страница авторизации */
.auth-container,
.register-container {
    max-width: 500px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .auth-container,
    .register-container {
        max-width: 100%;
        padding: 20px;
    }
}

/* Плеер */
.glass-player {
    max-width: 1920px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .glass-player {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }
}

/* Модальные окна */
.modal-content {
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        margin: 20px auto;
    }
}

/* Таблицы */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Формы */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        width: 100% !important;
    }
}

/* Навигация */
@media (max-width: 768px) {
    .nav-item {
        padding: 12px 15px;
    }
}

/* Уведомления */
@media (max-width: 768px) {
    .notification {
        max-width: 95%;
        margin: 10px auto;
    }
}
