/* ===================================== */
/*          TRACK INFO MODAL             */
/* ===================================== */

#trackInfoModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30000;
    width: 650px;
    max-width: 90vw;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 215, 0, 0.2);
    animation: modalAppear 0.3s ease;
}

#trackInfoModal.active {
    display: block;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

#trackInfoModal .modal-content {
    background: linear-gradient(145deg, #1e1e2a, #13131f);
    border: none;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

/* Фоновый градиент */
#trackInfoModal .modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.1), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

#trackInfoModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

#trackInfoModal .modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#trackInfoModal .modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

#trackInfoModal .modal-close:hover {
    background: #ff4b4b;
    transform: rotate(90deg);
}

#trackInfoModal .modal-body {
    padding: 20px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    flex: 1;
}

/* На ПК скролл только если контент не помещается */
@media (min-width: 769px) {
    #trackInfoModal .modal-body {
        overflow-y: visible;
    }
}

/* На мобилках скролл есть */
@media (max-width: 768px) {
    #trackInfoModal .modal-body {
        overflow-y: auto;
        max-height: 60vh;
    }
}

#trackInfoModal .modal-body::-webkit-scrollbar {
    width: 4px;
}

#trackInfoModal .modal-body::-webkit-scrollbar-track {
    background: #333;
}

#trackInfoModal .modal-body::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 2px;
}

/* Modal Footer */
#trackInfoModal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    flex-shrink: 0;
}

#trackInfoModal .modal-footer-btn {
    flex: 1;
    padding: 8px;
    border-radius: 30px;
    border: none;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

#trackInfoModal .modal-footer-btn:hover {
    transform: translateY(-2px);
}

#trackInfoModal .modal-footer-btn.share-btn {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
}

#trackInfoModal .modal-footer-btn.playlist-btn {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

#trackInfoModal .modal-footer-btn.close-btn {
    background: rgba(255, 75, 75, 0.1);
    color: #ff6b6b;
}

/* ========== ОСНОВНОЙ КОНТЕЙНЕР ========== */

.track-info-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Верхняя секция с обложкой */
.track-info-header {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.track-cover-large {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

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

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.track-cover-large:hover .cover-overlay {
    opacity: 1;
}

.cover-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

/* Основная информация */
.track-main-info {
    flex: 1;
    min-width: 0;
}

.track-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #fff;
    line-height: 1.3;
}

.track-artists {
    font-size: 14px;
    color: #FFD700;
    margin-bottom: 12px;
}

.artist-link {
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Быстрые действия */
.track-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-action {
    padding: 6px 14px;
    border-radius: 30px;
    border: none;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.quick-action:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.quick-action.play-btn-action.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.quick-action.like-btn.active {
    background: rgba(255, 75, 75, 0.2);
    color: #ff4b4b;
}

.quick-action.dislike-btn.active {
    background: rgba(255, 75, 75, 0.2);
    color: #ff4b4b;
}

/* Статистика - компактная */
.track-stats-grid {
    display: flex;
    gap: 12px;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 16px;
}

.stat-card {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #FFD700;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

/* Детальная информация - только нужное */
.track-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.2s;
}

.detail-card.clickable:hover {
    background: rgba(255, 215, 0, 0.1);
    cursor: pointer;
}

.detail-icon {
    font-size: 18px;
    width: 32px;
    text-align: center;
}

.detail-info {
    flex: 1;
}

.detail-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
}

.detail-arrow {
    color: #FFD700;
    font-size: 14px;
    opacity: 0;
}

.detail-card.clickable:hover .detail-arrow {
    opacity: 1;
}

.album-name, .album-link {
    color: #FFD700;
    cursor: pointer;
}

/* Вкладки */
.track-tabs {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.tab-btn {
    padding: 6px 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 30px;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
}

.tab-badge {
    background: rgba(255, 215, 0, 0.3);
    padding: 2px 5px;
    border-radius: 20px;
    font-size: 9px;
    margin-left: 4px;
}

.tab-content {
    display: none;
    padding: 12px 0;
}

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

/* Информационная вкладка */
.info-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-label {
    width: 80px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.info-value {
    flex: 1;
    font-size: 12px;
    color: #fff;
}

/* Похожие треки */
.similar-tracks-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 250px;
    overflow-y: auto;
}

.similar-track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.similar-track:hover {
    background: rgba(255, 215, 0, 0.1);
}

.similar-cover {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

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

.similar-title {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-artist {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-duration {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.similar-play {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.2);
    border: none;
    color: #FFD700;
    font-size: 10px;
    cursor: pointer;
}

.similar-play:hover {
    background: #FFD700;
    color: #000;
}

/* Плейлисты */
.playlists-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-item:hover {
    background: rgba(255, 215, 0, 0.1);
}

.playlist-cover {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.playlist-info {
    flex: 1;
}

.playlist-name {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.playlist-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.playlist-open-btn {
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #FFD700;
    font-size: 10px;
    cursor: pointer;
}

/* Комментарии */
.comments-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.comment-user {
    font-weight: 600;
    color: #FFD700;
    font-size: 11px;
}

.comment-time {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
}

.comment-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.comment-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.comment-like, .comment-reply {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 9px;
    cursor: pointer;
}

.comment-like:hover, .comment-reply:hover {
    color: #FFD700;
}

/* Форма добавления комментария */
.add-comment-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.comment-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 30px;
    color: white;
    font-size: 12px;
}

.comment-input:focus {
    border-color: #FFD700;
    outline: none;
}

.comment-submit {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFD700;
    border: none;
    color: #000;
    font-size: 14px;
    cursor: pointer;
}

/* Пустые состояния */
.empty-playlists, .empty-similar, .empty-comments {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #FFD700;
    font-size: 12px;
}

/* Адаптив */
@media (max-width: 768px) {
    #trackInfoModal {
        width: 95vw;
        max-height: 85vh;
    }
    
    #trackInfoModal .modal-body {
        overflow-y: auto;
        max-height: none;
    }
    
    .track-info-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .track-main-info {
        text-align: center;
    }
    
    .track-quick-actions {
        justify-content: center;
    }
    
    .track-stats-grid {
        flex-wrap: wrap;
    }
    
    .track-details-grid {
        grid-template-columns: 1fr;
    }
    
    .info-row {
        flex-direction: column;
        gap: 2px;
    }
    
    .info-label {
        width: auto;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}
.track-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.track-tag {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 20px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.18);
    color: rgba(255, 235, 130, 0.85);
    font-size: 10px;
    line-height: 1.2;
}
