/* track.css */

.track-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
}

.track-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.track-cover-large {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: auto;
    height: 300px;
}

.track-cover-large img {
    width: 300px;
    height: auto;
    object-fit: cover;
}

.track-info-large {
    display: flex;
    flex-direction: column;
}

.track-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.track-type {
    background: #1db954;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

.track-plays i {
    margin-right: 5px;
}

.track-title {
    font-size: 36px;
    margin: 0 0 20px 0;
    color: #333;
    line-height: 1.2;
}

.artist-info {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.artist-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #f0f0f0;
}

.artist-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.artist-name:hover {
    color: #1db954;
}

.artist-followers {
    color: #666;
    font-size: 14px;
}

.track-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 15px;
}

.detail-item i {
    color: #1db954;
    width: 20px;
}

.track-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 12px 25px;
    font-size: 16px;
    min-width: 120px;
}

.track-description {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.track-description h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.track-description p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Аудиоплеер */
.audio-player-container {
    background: linear-gradient(135deg, #1db954, #1ed760);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
}

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

.player-btn {
    width: 60px;
    height: 60px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1db954;
    font-size: 24px;
    transition: all 0.3s;
}

.player-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.progress-container {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 10px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.volume-container i {
    color: white;
    font-size: 20px;
}

#volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

/* Комментарии */
.comments-section {
    margin-bottom: 40px;
}

.comments-section h2 {
    color: #333;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
}

.comments-section h2 i {
    margin-right: 10px;
    color: #1db954;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: #1db954;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
    padding: 0 8px;
}

.comment-form {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 15px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #1db954;
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

.login-prompt {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 30px;
}

.login-prompt a {
    color: #1db954;
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.comments-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    transition: transform 0.3s;
}

.comment-item:hover {
    transform: translateX(5px);
    border-color: #1db954;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.comment-content {
    flex: 1;
    position: relative;
}

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

.comment-author {
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.comment-author:hover {
    color: #1db954;
}

.comment-date {
    color: #888;
    font-size: 13px;
}

.comment-text {
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
}

.delete-comment {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.comment-item:hover .delete-comment {
    opacity: 1;
}

.empty-comments {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-comments i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-comments p {
    margin: 0;
    font-size: 16px;
}

/* Похожие треки */
.similar-tracks {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.similar-tracks h2 {
    color: #333;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
}

.similar-tracks h2 i {
    margin-right: 10px;
    color: #1db954;
}

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

.track-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

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

.track-card-cover {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.track-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

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

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

.play-btn {
    width: 40px;
    height: 40px;
    background: #1db954;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s;
}

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

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

.track-card-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.track-card-info h3 a {
    color: inherit;
    text-decoration: none;
}

.track-card-info h3 a:hover {
    color: #1db954;
}

.track-card-artist {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.track-card-artist a {
    color: inherit;
    text-decoration: none;
}

.track-card-artist a:hover {
    color: #1db954;
}

.track-card-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 12px;
}

.track-card-meta i {
    margin-right: 5px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .track-header {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .track-cover-large {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .track-cover-large img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .track-container {
        padding: 20px;
    }
    
    .track-header {
        gap: 20px;
    }
    
    .track-cover-large {
        max-width: 100%;
    }
    
    .track-cover-large img {
        height: 300px;
    }
    
    .track-title {
        font-size: 28px;
    }
    
    .track-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-lg {
        width: 100%;
    }
    
    .player-controls {
        flex-wrap: wrap;
    }
    
    .progress-container {
        order: 3;
        flex: 0 0 100%;
        margin-top: 15px;
    }
    
    .volume-container {
        min-width: 120px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .tracks-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .track-container {
        padding: 15px;
    }
    
    .track-cover-large img {
        height: 200px;
    }
    
    .track-title {
        font-size: 24px;
    }
    
    .artist-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .artist-avatar {
        margin-right: 0;
        width: 80px;
        height: 80px;
    }
    
    .track-details {
        justify-content: center;
    }
    
    .tracks-grid {
        grid-template-columns: 1fr;
    }
}
