* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --dark-bg: #0a0e27;
    --darker-bg: #050811;
    --accent-color: #ff6b6b;
    --text-color: #ffffff;
}

body {
    font-family: 'Arial Black', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Фоновое изображение cover */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.4;
}

body.has-cover::before {
    background-image: var(--cover-image);
    opacity: 0.5;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Логотип */
/* Логотип в правом верхнем углу области видео */
.logo-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: inline-block;
    pointer-events: auto;
}

.logo-container img {
    max-height: 80px;
    max-width: 300px;
    filter: drop-shadow(3px 3px 0 #000);
}

/* Основной контент */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    padding: 20px;
    padding-top: 30px;
    overflow: hidden;
    gap: 30px;
    min-height: 0;
    align-items: stretch;
}

/* Плеер */
.player-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    max-width: calc(100% - 430px);
}

.player-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    border: 5px solid var(--primary-color);
}

.player-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    min-height: 0;
    overflow: hidden;
}

.player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
}

/* Оверлей */
.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-overlay.visible {
    opacity: 1;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    height: 100%;
    width: 100%;
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    pointer-events: auto;
}

.control-btn {
    background: rgba(102, 126, 234, 0.9);
    color: #fff;
    border: 3px solid #fff;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Arial Black', Arial, sans-serif;
    text-shadow: 2px 2px 0 #000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.control-btn:hover {
    background: rgba(118, 75, 162, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
}

.control-btn:active {
    transform: translateY(-1px);
}

/* Бокс с информацией о треке */
.track-info-box {
    position: absolute;
    bottom: 50px;
    left: 50px;
    min-width: 300px;
    max-width: 600px;
    border: 3px solid #fff;
    border-radius: 15px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.track-info-box.visible {
    opacity: 1;
    pointer-events: auto;
}

.track-info-artist {
    background: rgba(102, 126, 234, 0.9);
    color: #fff;
    padding: 15px 25px;
    font-size: 22px;
    font-weight: bold;
    text-align: left;
    font-family: 'Arial Black', Arial, sans-serif;
    text-shadow: 2px 2px 0 #000;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.track-info-song {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 15px 25px;
    font-size: 20px;
    font-weight: bold;
    text-align: left;
    font-family: 'Arial Black', Arial, sans-serif;
    text-shadow: 2px 2px 0 #000;
}

/* Категории */
.categories-section {
    width: 400px;
    min-width: 400px;
    max-width: 400px;
    flex-shrink: 0;
    padding: 20px;
    padding-right: 10px; /* Уменьшаем правый padding для скроллбара */
    background: rgba(10, 14, 39, 0.8);
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.section-title {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 3px 3px 0 #000;
    flex-shrink: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    flex: 1;
    min-height: 0;
}

.category-item {
    background: rgba(102, 126, 234, 0.3);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    flex-shrink: 0;
}

.category-item:hover {
    background: rgba(102, 126, 234, 0.5);
    transform: scale(1.05);
}

.category-item.active {
    background: var(--primary-color);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

.category-checkbox {
    display: none;
}

.category-label {
    display: block;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 2px 2px 0 #000;
}

.category-count {
    display: block;
    font-size: 18px;
    margin-top: 10px;
    color: var(--accent-color);
}

/* Футер */
.footer {
    padding: 15px 20px;
    text-align: center;
    background: rgba(5, 8, 17, 0.9);
    border-top: 3px solid var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.footer.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.footer-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: bold;
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-separator {
    margin: 0 15px;
    color: var(--primary-color);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .logo-container {
        top: 10px;
        right: 10px;
    }

    .logo-container img {
        max-height: 60px;
        max-width: 200px;
    }

    .main-content {
        flex-direction: column;
        padding: 15px;
        padding-top: 15px;
        gap: 20px;
        align-items: stretch;
        height: auto;
    }

    .player-section {
        flex: 0 0 auto;
        min-height: 0;
        max-width: 100%;
    }

    .player-wrapper {
        border-width: 3px;
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .player-overlay {
        padding: 20px 15px;
    }

    .control-btn {
        padding: 15px 25px;
        font-size: 18px;
    }

    .categories-section {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        flex-shrink: 1;
        max-height: 300px;
        height: auto;
    }

    .section-title {
        font-size: 24px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .category-item {
        padding: 15px;
    }

    .category-label {
        font-size: 18px;
    }

    .category-count {
        font-size: 14px;
    }

    .footer {
        font-size: 14px;
        padding: 15px;
    }
}

/* Для разрешений выше Full HD */
@media (min-width: 1921px) {
    .container {
        border-left: 1px solid rgba(102, 126, 234, 0.3);
        border-right: 1px solid rgba(102, 126, 234, 0.3);
    }
}

/* Явные стили для десктопа */
@media (min-width: 769px) {
    .main-content {
        flex-direction: row !important;
        align-items: stretch !important;
        padding-top: 30px !important;
    }
    
    .player-section {
        flex: 1;
        max-width: calc(100% - 430px) !important;
        height: 100% !important;
    }
    
    .player-wrapper {
        height: 100% !important;
        aspect-ratio: unset !important;
    }
    
    .categories-section {
        width: 400px !important;
        min-width: 400px !important;
        max-width: 400px !important;
        flex-shrink: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
    }
}

/* Скрытие скроллбара, но сохранение функциональности */
.categories-section::-webkit-scrollbar {
    width: 8px;
}

.categories-section::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    margin: 25px 0;
}

.categories-section::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.categories-section::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

