/* Discover Page Styles */

.discover-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    padding-bottom: 100px;
}

/* Hero Section */
.discover-hero {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(139, 0, 0, 0.05) 100%);
    border-radius: 20px;
    padding: 80px 40px;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.discover-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.05) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-title i {
    color: #FF0000;
    font-size: 3rem;
    vertical-align: middle;
    margin-right: 15px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 50px;
    opacity: 0.9;
}

/* YouTube Search Box */
.youtube-search-container {
    max-width: 700px;
    margin: 0 auto;
}

.search-box-large {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 60px;
    padding: 6px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    gap: 10px;
}

.search-box-large:focus-within {
    border-color: #FF0000;
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.12);
}

.search-box-large .search-icon {
    color: #FF0000;
    font-size: 1.4rem;
    margin-left: 20px;
    flex-shrink: 0;
}

.search-input-large {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 14px 10px;
    min-width: 0;
}

.search-input-large::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.btn-search {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.4);
}

.btn-search i {
    font-size: 0.9rem;
}

.search-hint {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.search-hint i {
    color: #FFD700;
    margin-right: 6px;
}

/* Content Sections */
.content-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-header h2 i {
    color: #FF0000;
    font-size: 1.6rem;
}

.see-all-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.see-all-link:hover {
    color: var(--text-primary);
    gap: 10px;
}

.see-all-link i {
    font-size: 0.8rem;
}

/* Results Section */
.results-section {
    margin-bottom: 60px;
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}

/* YouTube Results Grid */
.youtube-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.youtube-result-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.youtube-result-card:hover {
    border-color: rgba(255, 0, 0, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.youtube-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #000;
}

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

.youtube-thumbnail-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;
}

.youtube-result-card:hover .youtube-thumbnail-overlay {
    opacity: 1;
}

.btn-play-youtube {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #FF0000;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-play-youtube:hover {
    transform: scale(1.1);
    background: #CC0000;
}

.youtube-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.youtube-result-info {
    padding: 16px;
}

.youtube-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.youtube-result-channel {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.youtube-result-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

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

.btn-download-youtube {
    flex: 1;
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-download-youtube:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.btn-preview-youtube {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-preview-youtube:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Song Grid */
.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.song-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s;
}

.song-card:hover {
    border-color: rgba(30, 215, 96, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.song-card-cover {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

.song-card:hover .song-card-cover img {
    transform: scale(1.1);
}

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

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

.btn-play-card {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-play-card:hover {
    transform: scale(1.1);
    background: #22c55e;
}

.source-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.source-badge.youtube {
    background: #FF0000;
    color: white;
}

.song-card-info {
    padding: 0 4px;
}

.song-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.song-card-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.song-card-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Download Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(40, 40, 50, 0.95) 0%, rgba(30, 30, 40, 0.98) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-lg {
    width: 700px;
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: #FF0000;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.download-info {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 20px;
}

.download-progress {
    padding: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1ed760, #16a34a);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
}

.success-message {
    text-align: center;
    padding: 40px;
}

.success-message i {
    font-size: 4rem;
    color: #1ed760;
    margin-bottom: 20px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.empty-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Responsive */
@media (max-width: 768px) {
    .discover-hero {
        padding: 50px 25px;
        margin-bottom: 40px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-title i {
        font-size: 2rem;
        margin-right: 10px;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 35px;
    }
    
    .youtube-search-container {
        max-width: 100%;
    }
    
    .search-box-large {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border-radius: 20px;
        gap: 8px;
    }
    
    .search-box-large .search-icon {
        margin-left: 10px;
        font-size: 1.2rem;
    }
    
    .search-input-large {
        padding: 12px 10px;
        font-size: 0.95rem;
    }
    
    .btn-search {
        width: 100%;
        justify-content: center;
        padding: 12px 24px;
        margin-top: 0;
    }
    
    .search-hint {
        font-size: 0.85rem;
        margin-top: 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .youtube-results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .song-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .content-section {
        margin-bottom: 50px;
    }
}

@media (max-width: 480px) {
    .discover-hero {
        padding: 40px 20px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-title i {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .song-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
