/* ============================================
   Музыкальный сервис — Современные CSS стили
   Основано на CSS_стили_StringConversion.md
   Дата: 08.04.2026
   ============================================ */

/* === Контейнер страницы музыки === */
.music-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* === Заголовок страницы музыки === */
.music-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.music-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.music-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

.music-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.music-header-icon i {
    font-size: 2.5rem;
    color: white;
    animation: musicPulse 2s ease-in-out infinite;
}

/* === Карточка музыки === */
.music-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

/* === Строка трека === */
.track-row {
    background: white;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.track-row:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.track-row.playing {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.track-row.playing .track-title {
    color: #667eea;
}

/* === Обложка трека === */
.track-cover {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.track-cover:hover {
    transform: scale(1.05);
}

.track-cover-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.track-cover-placeholder i {
    font-size: 1.5rem;
    color: white;
}

/* === Кнопки музыки === */
.music-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.music-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.music-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.music-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.music-btn-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.music-btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.music-btn-outline {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
}

.music-btn-outline:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.music-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* === Кнопка лайка === */
.music-like-btn {
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.music-like-btn:hover {
    transform: scale(1.2);
}

.music-like-btn.liked i {
    color: #f5576c;
    animation: heartBeat 0.5s ease;
}

.music-like-btn:not(.liked) i {
    color: #a0aec0;
}

/* === Панель плеера === */
.music-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 2px solid rgba(102, 126, 234, 0.3);
    padding: 12px 20px;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
}

.music-player-bar .track-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.music-player-bar .track-title {
    font-weight: 600;
    color: white;
}

.music-player-bar .track-artist {
    color: #a0aec0;
    font-size: 0.85rem;
}

.music-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.music-player-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.music-player-btn:hover {
    color: #667eea;
    transform: scale(1.1);
}

.music-player-btn.play-pause {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.music-player-btn.play-pause:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.music-progress-bar {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #667eea var(--progress, 0%), #2d3748 var(--progress, 0%));
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.music-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.music-volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #667eea var(--volume, 80%), #2d3748 var(--volume, 80%));
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.music-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

/* === Поиск музыки === */
.music-search {
    position: relative;
    margin-bottom: 2rem;
}

.music-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.music-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.music-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

/* === Статистика музыки === */
.music-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.music-stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.music-stat-item:hover {
    transform: translateY(-2px);
}

.music-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.music-stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.music-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.music-stat-label {
    font-size: 0.875rem;
    color: #718096;
}

/* === Карточки плейлистов === */
.playlist-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.playlist-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.playlist-cover-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-cover-placeholder i {
    font-size: 3rem;
    color: white;
}

/* === Загрузка файлов === */
.upload-zone {
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8fafc;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.upload-zone-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
    animation: uploadBounce 2s ease-in-out infinite;
}

/* === Комментарии === */
.comment-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.comment-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    color: #2d3748;
}

.comment-date {
    color: #a0aec0;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.comment-text {
    color: #4a5568;
    margin-top: 0.25rem;
}

/* === Уведомления === */
.music-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(67, 233, 123, 0.4);
    animation: slideUp 0.3s ease;
    z-index: 1100;
}

.music-notification.error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 40px rgba(245, 87, 108, 0.4);
}

/* === Анимации === */
@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes uploadBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .music-container {
        padding: 1rem;
    }

    .music-title {
        font-size: 1.75rem;
    }

    .music-card {
        padding: 1.5rem;
    }

    .music-stats {
        grid-template-columns: 1fr;
    }

    .music-player-bar {
        padding: 8px 12px;
    }

    .music-player-bar .track-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .track-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .track-row .track-info {
        flex: 1 1 100%;
    }
}

@media (max-width: 576px) {
    .music-header-icon {
        width: 60px;
        height: 60px;
    }

    .music-header-icon i {
        font-size: 1.75rem;
    }

    .music-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .music-player-btn.play-pause {
        width: 40px;
        height: 40px;
    }
}
