/**
 * Стили для медиатеки и плеера
 */

/* =======================
   Общие стили медиатеки
   ======================= */

.media-library-page {
    min-height: 100vh;
    padding-bottom: 120px; /* Место для фиксированного плеера */
    background: #f8f9fa;
}

.media-header {
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #dee2e6;
}

.media-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.media-nav-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.media-nav-tab {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    background: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.3s;
}

.media-nav-tab:hover {
    background: #f8f9fa;
    color: #007bff;
}

.media-nav-tab.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.media-nav-tab-upload {
    background: #28a745;
    color: #fff !important;
    border-color: #28a745;
}

.media-nav-tab-upload:hover {
    background: #218838;
}

/* =======================
   Фильтры и поиск
   ======================= */

.media-filters {
    margin-bottom: 30px;
}

.search-box {
    margin-bottom: 20px;
}

.search-box .input-group {
    max-width: 600px;
}

.category-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-chip {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: #495057;
    background: #fff;
    border: 1px solid #dee2e6;
    font-size: 14px;
    transition: all 0.3s;
}

.category-chip:hover {
    background: #f8f9fa;
    color: #007bff;
}

.category-chip.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.category-chip i {
    margin-right: 5px;
}

/* =======================
   Сетка медиафайлов
   ======================= */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.media-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.media-card-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
}

.media-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.media-card:hover .media-card-overlay {
    opacity: 1;
}

.btn-play-media {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-play-media:hover {
    transform: scale(1.1);
    background: #007bff;
    color: #fff;
}

.media-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.media-card-info {
    padding: 15px;
}

.media-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.media-title a {
    color: #212529;
    text-decoration: none;
}

.media-title a:hover {
    color: #007bff;
}

.media-artist {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.media-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.media-category-badge i {
    font-size: 0.8rem;
}

.media-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
}

.media-stat i {
    margin-right: 3px;
}

.media-actions {
    display: flex;
    gap: 8px;
}

.btn-media-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8f9fa;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-media-action:hover {
    background: #e9ecef;
    color: #007bff;
}

.btn-media-action.active {
    background: #007bff;
    color: #fff;
}

/* =======================
   Плеер (фиксированный)
   ======================= */

.media-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
}

.media-player.hidden {
    display: none;
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 250px;
}

.track-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}

.track-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-details {
    flex: 1;
}

.track-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 12px;
    opacity: 0.8;
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.btn-player-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-player-control:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.btn-player-control.active {
    background: rgba(255,255,255,0.3);
}

.btn-play-pause {
    width: 50px;
    height: 50px;
    background: #fff;
    color: #1e3c72;
}

.btn-play-pause:hover {
    background: #f8f9fa;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-current,
.time-total {
    font-size: 12px;
    min-width: 40px;
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.1s;
}

.progress-bar-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.player-extra-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-volume {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.volume-slider-container {
    width: 100px;
}

.volume-slider {
    width: 100%;
}

.speed-select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* =======================
   Секции
   ======================= */

.media-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.section-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.section-link:hover {
    text-decoration: underline;
}

/* =======================
   Категории
   ======================= */

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

.category-card {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #212529;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    color: #007bff;
}

.category-card i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

/* Дополнительные стили для совместимости с Bootstrap */
.card.text-center:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.media-library-page .card {
    border: 1px solid #dee2e6;
}

.media-library-page .card:hover {
    border-color: #007bff;
}

/* =======================
   Плейлисты
   ======================= */

.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.playlist-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.playlist-cover {
    position: relative;
    display: block;
    padding-top: 100%;
    background-color: #e9ecef;
}

.playlist-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.playlist-card:hover .playlist-overlay {
    opacity: 1;
}

.playlist-overlay i {
    font-size: 48px;
    color: #fff;
}

.playlist-info {
    padding: 15px;
}

.playlist-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.playlist-info h3 a {
    color: #212529;
    text-decoration: none;
}

.playlist-info h3 a:hover {
    color: #007bff;
}

.playlist-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
}

.playlist-description {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 10px;
}

/* Карточки плейлистов на странице /media/playlists */
.playlist-card-cover {
    background-color: #e9ecef;
}

.playlist-card-overlay {
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.playlist-card:hover .playlist-card-overlay {
    opacity: 1;
}

.playlist-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s ease;
}

.playlist-card:hover .playlist-play-btn {
    transform: scale(1.05);
}

.media-playlists-section .section-title {
    font-weight: 700;
}

/* =======================
   Загрузка
   ======================= */

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #007bff;
    background: #f8f9fa;
}

.upload-icon i {
    font-size: 64px;
    color: #007bff;
    margin-bottom: 20px;
}

.upload-files-list {
    margin-top: 20px;
}

.upload-file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.upload-file-item.invalid {
    border: 1px solid #dc3545;
}

.file-icon i {
    font-size: 32px;
    color: #007bff;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.file-errors {
    font-size: 12px;
    margin-top: 5px;
}

.file-progress {
    width: 100%;
    margin-top: 10px;
}

/* =======================
   Страницы Музыка / Видео
   ======================= */

.media-page-header {
    margin-bottom: 1.5rem;
}

.media-page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.media-page-subtitle {
    margin: 0;
    font-size: 1rem;
}

.media-filters-block .card-body {
    padding: 1.5rem;
}

.media-category-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.media-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
}

.media-category-chips .badge:hover {
    opacity: 0.9;
}

.media-empty-state .card-body {
    padding: 3rem 2rem;
}

.media-empty-icon i {
    font-size: 4rem;
    color: #dee2e6;
}

/* =======================
   Хлебные крошки
   ======================= */

.breadcrumb-sep {
    margin: 0 0.5rem;
    color: #6c757d;
    user-select: none;
}

.page-header.breadcrumb-wrap .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

/* =======================
   Empty state
   ======================= */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* =======================
   Responsive
   ======================= */

@media (max-width: 768px) {
    .media-player {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }
    
    .player-track-info {
        width: 100%;
    }
    
    .player-controls {
        width: 100%;
    }
    
    .player-extra-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* =======================
   Upload Improvements
   ======================= */

/* Category validation */
.form-select.is-invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Progress indicator animation */
#upload-progress-container .card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cover preview styling */
#cover-preview img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

#cover-preview img:hover {
    transform: scale(1.05);
}

/* =======================
   Step-by-Step Upload Flow
   ======================= */

/* Disabled step overlay */
.upload-step-disabled {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.upload-step-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: inherit;
}

.upload-step-disabled.card {
    border-color: #dee2e6 !important;
}

/* Unlock animation */
@keyframes unlockFade {
    0% {
        opacity: 0.6;
        transform: scale(0.98);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.01);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Step badges */
.card-header .badge {
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
}

/* Active step highlight */
#step-1-card {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.15);
    }
}

/* Remove pulse when category selected */
#step-1-card.category-selected {
    animation: none;
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.5);
}

/* Notification styling */
.alert.position-fixed {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =======================
   Media Single View Page (Redesign v2)
   ======================= */

.media-single-page {
    min-height: 100vh;
    background: #0a0e27;
    padding-bottom: 120px;
}

/* Hero section */
.media-hero {
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
}

.media-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    opacity: 0.95;
}

.media-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, transparent 0%, #0a0e27 100%);
}

.media-hero .container {
    position: relative;
    z-index: 1;
}

.media-hero-cover {
    width: 240px;
    height: 240px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.media-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-hero-cover.no-cover,
.media-hero-cover:has(.cover-placeholder-icon) {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.cover-placeholder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 80px;
    color: rgba(255, 255, 255, 0.9);
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.media-hero-cover:hover .cover-overlay {
    opacity: 1;
}

.hero-play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #667eea;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    padding-left: 4px;
}

.hero-play-btn:hover {
    transform: scale(1.1);
}

.media-hero-info {
    color: #fff;
    padding-left: 20px;
}

.media-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.media-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.media-hero-artist {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 16px 0;
    opacity: 0.95;
}

.media-hero-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    opacity: 0.9;
}

.media-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.media-content-wrapper {
    margin-top: 0;
    position: relative;
    z-index: 2;
}

.media-content-wrapper .container {
    margin-top: 40px;
}

/* Glass card effect */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
    color: #fff;
}

.glass-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Player card */
.player-card {
    padding: 0;
    overflow: hidden;
}

/* Full Width Player */
.player-card-fullwidth {
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

.player-waveform {
    position: relative;
    height: 120px;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.player-waveform-fullwidth {
    position: relative;
    height: 160px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

#waveform-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
}

.player-progress-range {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.player-progress-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s;
}

.player-progress-range:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

.player-progress-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-controls-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-time {
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.8);
    min-width: 42px;
}

.player-main-controls {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.control-btn:hover::before {
    width: 100%;
    height: 100%;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn i {
    position: relative;
    z-index: 1;
}

/* Active state for shuffle and repeat */
.control-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 0 16px rgba(102, 126, 234, 0.6);
}

.control-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
}

.control-btn-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.control-btn-play::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.control-btn-play:hover::before {
    width: 120%;
    height: 120%;
}

.control-btn-play:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.7);
}

.control-btn-play:active {
    transform: scale(1.05);
}

.control-btn-play .icon-play {
    padding-left: 4px;
    position: relative;
    z-index: 1;
}

.control-btn-play .icon-pause {
    position: relative;
    z-index: 1;
}

.control-btn-play.playing {
    animation: playingPulse 2s ease-in-out infinite;
}

@keyframes playingPulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }
    50% {
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.8);
    }
}

.player-volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-volume-control .control-btn.muted {
    background: rgba(220, 53, 69, 0.2);
    color: #f5576c;
}

.player-volume-control .control-btn.muted:hover {
    background: rgba(220, 53, 69, 0.3);
}

.volume-slider {
    width: 100px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
}

.volume-slider:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.15) 100%);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(255, 255, 255, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Horizontal Action Buttons */
.action-buttons-horizontal {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.action-btn-horizontal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.action-btn-horizontal:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.action-btn-horizontal:active {
    transform: translateY(0);
}

.action-btn-horizontal i {
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.action-btn-horizontal:hover i {
    transform: scale(1.15);
}

/* Like Button */
.btn-like-h {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

.btn-like-h:hover {
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.5);
    transform: translateY(-3px) scale(1.03);
}

.btn-like-h.active {
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1.05); }
}

/* Save Button */
.btn-save-h {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-save-h:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-save-h.active {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

/* Playlist Button */
.btn-playlist-h {
    background: linear-gradient(135deg, #667eea 0%, #4c63d2 100%);
    border: none;
}

.btn-playlist-h:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Download Button */
.btn-download-h {
    background: linear-gradient(135deg, #48c6ef 0%, #6f86d6 100%);
    border: none;
}

.btn-download-h:hover {
    box-shadow: 0 6px 20px rgba(72, 198, 239, 0.5);
}

/* Share Button */
.btn-share-h {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
}

.btn-share-h:hover {
    box-shadow: 0 6px 20px rgba(168, 237, 234, 0.5);
}

/* Delete Button */
.btn-delete-h {
    background: linear-gradient(135deg, #f5576c 0%, #d32f2f 100%);
    border: none;
}

.btn-delete-h:hover {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

/* Description */
.description-text {
    margin: 0;
    line-height: 1.7;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Premium Profile Card */
.profile-card-premium {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
}

.profile-header-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    opacity: 0.8;
}

.profile-header-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: patternScroll 20s linear infinite;
}

@keyframes patternScroll {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

.profile-content {
    position: relative;
    padding: 32px 24px 24px;
}

.profile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    gap: 16px;
    transition: all 0.3s;
}

.profile-avatar-container {
    position: relative;
    margin-top: -40px;
}

.profile-avatar-premium {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.profile-link:hover .profile-avatar-premium {
    transform: scale(1.08) rotate(3deg);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
}

.profile-online-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: 3px solid #0a0e27;
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.8);
    animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% { box-shadow: 0 0 16px rgba(74, 222, 128, 0.8); }
    50% { box-shadow: 0 0 24px rgba(74, 222, 128, 1); }
}

.profile-info-premium {
    text-align: center;
    width: 100%;
}

.profile-name-premium {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s;
}

.profile-link:hover .profile-name-premium {
    background: linear-gradient(135deg, #fff, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-time-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.profile-time-premium svg {
    opacity: 0.7;
}

/* Modern Stats Card */
.stats-card-modern {
    padding: 24px;
}

.card-title-modern {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.stats-modern-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.stat-modern-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.stat-modern-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.stat-modern-icon-wrap {
    position: relative;
    flex-shrink: 0;
}

.stat-modern-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.stat-modern-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    opacity: 0;
    animation: statPulse 2s ease-in-out infinite;
}

@keyframes statPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
}

/* Individual stat colors */
.stat-plays .stat-modern-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-plays .stat-modern-pulse {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-likes .stat-modern-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-likes .stat-modern-pulse {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-downloads .stat-modern-icon {
    background: linear-gradient(135deg, #48c6ef 0%, #6f86d6 100%);
}

.stat-downloads .stat-modern-pulse {
    background: linear-gradient(135deg, #48c6ef 0%, #6f86d6 100%);
}

.stat-size .stat-modern-icon {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.stat-size .stat-modern-pulse {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.stat-modern-content {
    flex: 1;
    min-width: 0;
}

.stat-modern-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.2;
}

.stat-modern-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Similar tracks */
.similar-card {
    padding: 24px;
}

.similar-tracks {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.similar-track {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s;
}

.similar-track:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.similar-track-cover {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.similar-track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.similar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.4);
}

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

.similar-track-title {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-track-artist {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-track-duration {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .media-hero-title {
        font-size: 2rem;
    }
    .media-hero-cover {
        width: 180px;
        height: 180px;
    }
    .action-buttons-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    .stats-modern-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .media-hero {
        padding: 40px 0 60px;
    }
    .media-hero-cover {
        width: 160px;
        height: 160px;
        margin: 0 auto 24px;
    }
    .media-hero-info {
        padding-left: 0;
        text-align: center;
    }
    .media-hero-title {
        font-size: 1.75rem;
    }
    .media-hero-meta {
        justify-content: center;
    }
    .player-controls-row {
        flex-wrap: wrap;
        padding: 16px 20px;
        gap: 16px;
    }
    .player-main-controls {
        order: 1;
        width: 100%;
        margin: 8px 0;
    }
    .player-volume-control .volume-slider {
        width: 80px;
    }
    .action-buttons-horizontal {
        gap: 6px;
    }
    .action-btn-horizontal {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    .action-btn-horizontal span {
        display: none;
    }
    .action-btn-horizontal i {
        font-size: 1.2rem;
    }
    .profile-avatar-premium {
        width: 80px;
        height: 80px;
    }
    .profile-name-premium {
        font-size: 1rem;
    }
}
