/**
 * Song Detail Page - Modern UI Styles
 * All colors use CSS variables from Admin panel (dynamic-theme.css)
 */

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 8px;
    color: #666;
}

.breadcrumb-item a {
    color: var(--primary-color, #667eea);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color, #764ba2);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
}

/* ==================== HERO SECTION ==================== */
.song-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.song-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.5);
    transform: scale(1.2);
    z-index: 0;
}

.song-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: 25px;
    padding: 30px;
}

.song-artwork-wrapper {
    flex-shrink: 0;
}

.song-artwork {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

.song-artwork:hover {
    transform: scale(1.03);
}

.song-info {
    flex: 1;
    color: #fff;
    min-width: 0;
}

.song-type-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
}

.song-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.song-artist {
    font-size: 1.1rem;
    margin-bottom: 12px;
    opacity: 0.9;
}

.song-artist a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.song-artist a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.song-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    opacity: 0.85;
}

.song-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.song-meta-item i {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Rating in Hero */
.song-rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.song-rating-stars {
    display: flex;
    gap: 2px;
}

.song-rating-stars i {
    color: #ffc107;
    font-size: 14px;
}

.song-rating-stars i.empty {
    color: rgba(255,255,255,0.3);
}

.song-rating-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ==================== ACTION BUTTONS ==================== */
.song-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.btn-play-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}

.btn-play-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(var(--primary-color-rgb), 0.5);
}

.btn-play-main i {
    font-size: 1.1rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f5f5f5;
    color: #555;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--primary-color, #667eea);
    color: #fff;
    transform: scale(1.1);
}

.btn-action.active {
    background: #ff4757;
    color: #fff;
}

.btn-action-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    color: #555;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-text:hover {
    background: #e8e8e8;
}

/* Dark mode support */
/* ==================== SONG DETAILS CARD ==================== */
.song-details-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.song-details-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.song-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.song-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.song-detail-text {
    flex: 1;
    min-width: 0;
}

.song-detail-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.song-detail-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-detail-value a {
    color: var(--primary-color, #667eea);
    text-decoration: none;
}

.song-detail-value a:hover {
    text-decoration: underline;
}

/* ==================== IN-PAGE PLAYER ==================== */
.song-player-section {
    background: linear-gradient(135deg, var(--header-bg-color, #1a1a2e) 0%, var(--footer-bg-color, #16213e) 100%);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.song-player-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.song-player-header i {
    color: var(--primary-color, #667eea);
}

/* Waveform Animation */
.waveform-animation {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 25px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.waveform-animation.active {
    opacity: 1;
}

.waveform-animation span {
    width: 4px;
    background: var(--primary-color, #667eea);
    border-radius: 2px;
    height: 8px;
}

.waveform-animation.active span {
    animation: waveform 0.8s ease-in-out infinite;
}

.waveform-animation span:nth-child(1) { animation-delay: 0s; }
.waveform-animation span:nth-child(2) { animation-delay: 0.1s; }
.waveform-animation span:nth-child(3) { animation-delay: 0.2s; }
.waveform-animation span:nth-child(4) { animation-delay: 0.3s; }
.waveform-animation span:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveform {
    0%, 100% { height: 8px; }
    50% { height: 25px; }
}

.song-player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-btn-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 25px rgba(var(--primary-color-rgb), 0.5), 0 0 0 0 rgba(var(--primary-color-rgb), 0.7);
    position: relative;
    overflow: visible;
}

.player-btn-large::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.player-btn-large:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 35px rgba(var(--primary-color-rgb), 0.6), 0 0 0 8px rgba(var(--primary-color-rgb), 0.2);
}

.player-btn-large:hover::before {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1.3);
}

.player-btn-large.playing {
    animation: pagePlayPulse 2s ease-in-out infinite;
}

@keyframes pagePlayPulse {
    0%, 100% {
        box-shadow: 0 4px 25px rgba(var(--primary-color-rgb), 0.5), 0 0 0 0 rgba(var(--primary-color-rgb), 0.7);
    }
    50% {
        box-shadow: 0 4px 25px rgba(var(--primary-color-rgb), 0.6), 0 0 0 4px rgba(var(--primary-color-rgb), 0);
    }
}

.player-btn-large i {
    margin-left: 3px; /* Optical centering for play icon */
}

.song-progress-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.song-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: height 0.2s ease;
}

.song-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 50%, var(--primary-color, #667eea) 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    animation: pageProgressGradient 3s linear infinite;
}

@keyframes pageProgressGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.song-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(50%);
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid var(--primary-color, #667eea);
}

.song-progress-bar:hover {
    height: 10px;
}

.song-progress-bar:hover .song-progress-fill::after,
.song-progress-bar:active .song-progress-fill::after {
    opacity: 1;
    transform: translateY(-50%) translateX(50%) scale(1.2);
}

/* Touch-friendly on mobile */
@media (max-width: 767.98px) {
    .song-progress-bar {
        height: 10px;
    }
    
    .song-progress-fill::after {
        opacity: 1;
        width: 20px;
        height: 20px;
    }
    
    .song-progress-bar:active .song-progress-fill::after {
        transform: translateY(-50%) translateX(50%) scale(1.4);
    }
}

.song-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    font-family: monospace;
    font-weight: 500;
    margin-top: 4px;
}

/* ==================== DESCRIPTION SECTION ==================== */
.song-description {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.song-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.song-section-title i {
    color: var(--primary-color, #667eea);
}

.song-description-text {
    color: #666;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ==================== LYRICS SECTION ==================== */
.song-lyrics {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.lyrics-content {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
    white-space: pre-line;
    max-height: 200px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.lyrics-content.expanded {
    max-height: none;
}

.lyrics-content:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}

.btn-lyrics-toggle {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    color: var(--primary-color, #667eea);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-lyrics-toggle:hover {
    background: #e8e8e8;
}

/* ==================== RELATED SECTIONS ==================== */
.related-section {
    margin-bottom: 25px;
}

.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.related-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--card-border-radius, 8px);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary-gradient, var(--primary-gradient));
    width: 100%;
    margin-bottom: 0;
}

.related-title i {
    font-size: 1.1rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.related-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.related-scroll::-webkit-scrollbar {
    height: 6px;
}

.related-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.related-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color, #667eea);
    border-radius: 3px;
}

.related-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.related-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.related-card-body {
    padding: 12px;
}

.related-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.related-card-meta {
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== RATING COMPONENT ==================== */
.song-rating-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.rating-prompt {
    color: #666;
    margin-bottom: 15px;
}

/* ==================== SHARE MODAL ==================== */
.share-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.whatsapp { background: #25D366; }
.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.telegram { background: #0088cc; }

.share-link-box {
    display: flex;
    gap: 10px;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
}

.share-link-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: #333;
}

.btn-copy-link {
    background: var(--primary-color, #667eea);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 767.98px) {
    .song-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    
    .song-artwork {
        width: 160px;
        height: 160px;
    }
    
    .song-title {
        font-size: 1.5rem;
    }
    
    .song-meta {
        justify-content: center;
    }
    
    .song-rating-display {
        justify-content: center;
    }
    
    .song-actions {
        justify-content: center;
    }
    
    .song-details-list {
        grid-template-columns: 1fr;
    }
    
    .song-player-controls {
        flex-direction: column;
        gap: 18px;
        align-items: stretch;
    }
    
    .player-btn-large {
        width: 65px;
        height: 65px;
        font-size: 1.5rem;
        align-self: center;
    }
    
    .song-progress-wrapper {
        width: 100%;
    }
    
    .song-time-display {
        font-size: 0.75rem;
        margin-top: 6px;
    }
    
    .song-progress-bar {
        height: 10px;
    }
    
    .related-card {
        flex: 0 0 140px;
    }
}

/* ==================== AUTO TAGS ==================== */
.song-autotags {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.85rem;
    color: #666;
    margin-top: 20px;
}

