/* static/css/style.css */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    padding: 0 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== ШАПКА С КНОПКАМИ ВНУТРИ ===== */
.header-banner {
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 0 0 30px 30px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 16px;
}

/* ========================================= */
/* ===== НАВИГАЦИЯ — ВНУТРИ ШАПКИ ===== */
/* ========================================= */

.nav-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 50px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    min-width: 200px;
}

.nav-tab {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 28px;
    border-radius: 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
}

.nav-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

.nav-tab:active {
    transform: scale(0.96);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* ========================================= */
/* ===== БАННЕРЫ ===== */
/* ========================================= */

.banners {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 30px 0 30px;
}

.banner-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border: 2px solid;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    font-size: 14px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.banner-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

.banner-btn:active {
    opacity: 0.7;
    transform: scale(0.98);
}

.banner-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================= */
/* ===== КОНТЕНТ ===== */
/* ========================================= */

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================= */
/* ===== MUSIC ===== */
/* ========================================= */

.content-section h2 {
    font-size: 2rem;
    margin: 30px 0 25px;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.track-card {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 14px;
    transition: all 0.3s ease;
    align-items: flex-start;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-left: 4px solid;
}

.track-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.track-cover {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-info h3 {
    font-size: 1.1rem;
    margin-bottom: 2px;
    word-break: break-word;
}

.track-info p {
    opacity: 0.7;
    font-size: 0.85rem;
    word-break: break-word;
}

.track-info .description {
    font-size: 0.8rem;
    margin: 4px 0 8px;
    opacity: 0.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== АУДИО ПЛЕЕР ===== */
.audio-wrapper {
    width: 100%;
    margin: 6px 0;
}

.audio-wrapper audio {
    width: 100%;
    display: block;
    border-radius: 8px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
}

.audio-wrapper audio::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0 4px;
}

.audio-wrapper audio::-webkit-media-controls-play-button {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    margin: 0 4px;
}

.audio-wrapper audio::-webkit-media-controls-current-time-display,
.audio-wrapper audio::-webkit-media-controls-time-remaining-display {
    font-size: 11px;
    padding: 0 2px;
    color: rgba(255, 255, 255, 0.8);
}

.audio-wrapper audio::-webkit-media-controls-timeline {
    min-height: 4px;
    margin: 0 4px;
    padding: 0 2px;
}

.audio-wrapper audio::-webkit-media-controls-volume-slider {
    min-width: 50px;
    padding: 0 2px;
}

.audio-wrapper audio::-webkit-media-controls-mute-button {
    margin: 0 2px;
}

.audio-wrapper audio::-moz-media-controls-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.audio-wrapper audio::-moz-media-controls-playbutton {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.audio-wrapper audio::-moz-media-controls-timeline {
    min-height: 4px;
}

.audio-wrapper audio::-moz-media-controls-volume-slider {
    min-width: 50px;
}

/* ===== ДЕЙСТВИЯ ===== */
.track-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.plays {
    font-size: 0.8rem;
    opacity: 0.5;
    display: inline-block;
}

.download-btn {
    font-size: 0.8rem;
    text-decoration: none;
    opacity: 0.4;
    transition: all 0.25s ease;
    cursor: pointer;
    display: inline-block;
    line-height: 1;
    touch-action: manipulation;
}

.download-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.download-btn:active {
    transform: scale(0.9);
    opacity: 0.6;
}

/* ===== ПУСТЫЕ СООБЩЕНИЯ — ПО ЦЕНТРУ ===== */
.empty-message {
    text-align: center;
    opacity: 0.5;
    padding: 40px 0;
    font-size: 1.1rem;
    width: 100%;
}

/* ========================================= */
/* ===== VIDEO ===== */
/* ========================================= */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.video-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 4px solid;
    padding: 12px;
}

.video-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.video-info {
    padding: 12px 4px 4px;
}

.video-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    word-break: break-word;
}

.video-info .description {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===== ФУТЕР ===== */
footer {
    text-align: center;
    padding: 25px 0 15px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.5;
    font-size: 0.9rem;
}

/* ========================================= */
/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
/* ========================================= */

@media (max-width: 768px) {
    body {
        padding: 0 12px;
    }
    
    .header-banner {
        height: 220px;
        border-radius: 0 0 20px 20px;
    }
    
    .nav-tabs {
        min-width: 160px;
        bottom: -18px;
        padding: 3px;
    }
    
    .nav-tab {
        padding: 8px 18px;
        font-size: 12px;
    }
    
    .banners {
        margin: 24px 0 24px;
    }
    
    .content-section h2 {
        font-size: 1.6rem;
        margin: 20px 0 20px;
    }
    
    .track-card {
        padding: 14px;
        gap: 12px;
    }
    
    .track-cover {
        width: 65px;
        height: 65px;
    }
    
    .track-info h3 {
        font-size: 1rem;
    }
    
    .audio-wrapper audio {
        height: 38px;
    }
    
    .video-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0 8px;
    }
    
    .header-banner {
        height: 160px;
        border-radius: 0 0 16px 16px;
        padding-bottom: 10px;
    }
    
    .nav-tabs {
        min-width: 140px;
        bottom: -14px;
        padding: 3px;
        gap: 4px;
    }
    
    .nav-tab {
        padding: 6px 14px;
        font-size: 11px;
        letter-spacing: 0.3px;
    }
    
    .banners {
        gap: 6px;
        margin: 18px 0 16px;
    }
    
    .banner-btn {
        padding: 6px 12px;
        font-size: 11px;
        gap: 5px;
        min-height: 38px;
        width: 100%;
        justify-content: center;
    }
    
    .banner-btn img {
        width: 20px;
        height: 20px;
    }
    
    .content-section h2 {
        font-size: 1.2rem;
        margin: 12px 0 12px;
    }
    
    .track-list {
        gap: 10px;
    }
    
    .track-card {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border-radius: 10px;
        gap: 8px;
    }
    
    .track-cover {
        width: 100%;
        height: 120px;
        border-radius: 8px;
        object-fit: cover;
    }
    
    .track-info {
        text-align: left;
    }
    
    .track-info h3 {
        font-size: 0.9rem;
    }
    
    .track-info p {
        font-size: 0.75rem;
    }
    
    .track-info .description {
        font-size: 0.7rem;
        margin: 2px 0 4px;
    }
    
    .audio-wrapper {
        margin: 4px 0;
    }
    
    .audio-wrapper audio {
        height: 44px;
    }
    
    .audio-wrapper audio::-webkit-media-controls-play-button {
        transform: scale(1.15);
        margin: 0 6px;
    }
    
    .audio-wrapper audio::-webkit-media-controls-panel {
        min-height: 44px;
        padding: 0 6px;
    }
    
    .audio-wrapper audio::-webkit-media-controls-timeline {
        min-height: 5px;
        padding: 0 4px;
        margin: 0 4px;
        display: block !important;
    }
    
    .audio-wrapper audio::-webkit-media-controls-volume-slider {
        min-width: 55px;
        padding: 0 4px;
        display: flex !important;
    }
    
    .audio-wrapper audio::-webkit-media-controls-mute-button {
        display: flex !important;
        margin: 0 4px;
    }
    
    .audio-wrapper audio::-webkit-media-controls-current-time-display,
    .audio-wrapper audio::-webkit-media-controls-time-remaining-display {
        font-size: 10px;
        padding: 0 3px;
        display: inline-block !important;
    }
    
    .audio-wrapper audio::-moz-media-controls-panel {
        min-height: 44px;
        padding: 0 6px;
    }
    
    .audio-wrapper audio::-moz-media-controls-timeline {
        min-height: 5px;
        display: block !important;
    }
    
    .audio-wrapper audio::-moz-media-controls-volume-slider {
        min-width: 55px;
        display: flex !important;
    }
    
    .track-actions {
        gap: 14px;
        margin-top: 3px;
    }
    
    .plays {
        font-size: 0.7rem;
    }
    
    .download-btn {
        font-size: 0.7rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .video-card {
        padding: 10px;
        border-radius: 10px;
    }
    
    .video-info h3 {
        font-size: 0.85rem;
    }
    
    .video-info .description {
        font-size: 0.7rem;
    }
    
    .video-actions .plays {
        font-size: 0.7rem;
    }
    
    .empty-message {
        font-size: 0.9rem;
        padding: 30px 0;
    }
    
    footer {
        padding: 16px 0 10px;
        margin-top: 24px;
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    .header-banner {
        height: 130px;
    }
    
    .nav-tabs {
        min-width: 120px;
        bottom: -12px;
        padding: 2px;
        gap: 3px;
    }
    
    .nav-tab {
        padding: 5px 10px;
        font-size: 10px;
        letter-spacing: 0.2px;
    }
    
    .track-card {
        padding: 8px;
        gap: 6px;
    }
    
    .track-cover {
        height: 100px;
    }
    
    .track-info h3 {
        font-size: 0.8rem;
    }
    
    .audio-wrapper audio {
        height: 38px;
    }
    
    .audio-wrapper audio::-webkit-media-controls-panel {
        min-height: 38px;
        padding: 0 4px;
    }
    
    .audio-wrapper audio::-webkit-media-controls-volume-slider {
        min-width: 40px;
    }
    
    .audio-wrapper audio::-webkit-media-controls-current-time-display,
    .audio-wrapper audio::-webkit-media-controls-time-remaining-display {
        font-size: 9px;
    }
    
    .track-actions {
        gap: 10px;
    }
    
    .plays {
        font-size: 0.6rem;
    }
    
    .download-btn {
        font-size: 0.6rem;
    }
}

/* ========================================= */
/* ===== УЛУЧШЕНИЯ ДЛЯ СЕНСОРНЫХ ЭКРАНОВ ===== */
/* ========================================= */

@media (hover: none) {
    .track-card:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .video-card:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .banner-btn:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .download-btn:hover {
        transform: none;
        opacity: 0.4;
    }
    
    .nav-tab:hover {
        background: none;
        color: rgba(255, 255, 255, 0.6);
    }
    
    .nav-tab.active:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }
}

/* ===== ТЁМНАЯ ТЕМА ДЛЯ ПЛЕЕРА ===== */
@media (prefers-color-scheme: dark) {
    .audio-wrapper audio {
        filter: brightness(0.9);
    }
}

/* ========================================= */
/* ===== УЛУЧШЕННАЯ ТИПОГРАФИКА ===== */
/* ========================================= */

.track-info h3,
.video-info h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.track-info p:first-of-type {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
