/* CSS Variables */
:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #4834D4;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --background: #0D0D12;
    --surface: #1A1A24;
    --surface-light: #252532;
    --text: #FFFFFF;
    --text-secondary: #9E9EA7;
    --text-muted: #6B6B7A;
    --success: #00B894;
    --warning: #FDCB6E;
    --error: #E17055;
    --gradient-1: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    --gradient-2: linear-gradient(135deg, #00CEC9 0%, #55EFC4 100%);
    --gradient-3: linear-gradient(135deg, #FD79A8 0%, #FDCB6E 100%);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 13, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    padding: 0 2rem;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
    border-radius: 1px;
}

.nav-search {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.search-btn svg {
    width: 16px;
    height: 16px;
    color: white;
}

/* Main Content */
.main-content {
    padding-top: 72px;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Sections */
.section {
    padding: 2rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-light);
}

/* Song Card */
.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.song-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.song-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.song-card-cover {
    position: relative;
    aspect-ratio: 1;
    background: var(--surface-light);
    overflow: hidden;
}

.song-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.song-card-cover .album-art {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
}

.album-art-inner {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Real cover thumbnails (YouTube results) fill the color tile underneath */
.cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    z-index: 1;
}

.song-card-cover .album-art,
.chart-item-cover .album-art,
.download-item-cover .album-art {
    position: relative;
    overflow: hidden;
}

.song-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.song-card-play {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.song-card:hover .song-card-play {
    opacity: 1;
    transform: translateY(0);
}

.song-card-play svg {
    width: 20px;
    height: 20px;
    color: white;
    margin-left: 2px;
}

.song-card-info {
    padding: 1rem;
}

.song-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.song-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.song-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--warning);
    font-size: 0.8rem;
}

.song-card-rating svg {
    width: 14px;
    height: 14px;
}

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

.song-card-genre {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary-light);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.song-card-download {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
}

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

.song-card-download svg {
    width: 16px;
    height: 16px;
    color: white;
}

.song-card-download:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.song-card-download.downloading {
    background: var(--secondary);
    animation: spin 1s linear infinite;
}

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

/* Chart List */
.chart-list {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chart-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

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

.chart-item:hover {
    background: var(--surface-light);
}

.chart-rank {
    width: 40px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.chart-rank.top-1 {
    color: var(--warning);
}

.chart-rank.top-2 {
    color: var(--text-secondary);
}

.chart-rank.top-3 {
    color: #CD7F32;
}

.chart-item-cover {
    width: 48px;
    height: 48px;
    margin-right: 1rem;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.chart-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.chart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-item-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.chart-item-stats {
    text-align: right;
    flex-shrink: 0;
}

.chart-item-plays {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.chart-item-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--warning);
    font-size: 0.8rem;
    margin-top: 4px;
}

.chart-item-rating svg {
    width: 12px;
    height: 12px;
}

/* Search Page */
.search-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.search-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.search-form-large {
    margin-bottom: 1.5rem;
}

.search-box-large {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-large .search-icon {
    position: absolute;
    left: 20px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box-large input {
    width: 100%;
    padding: 1rem 1rem 1rem 52px;
    background: var(--surface);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition);
}

.search-box-large input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2);
}

.search-box-large input::placeholder {
    color: var(--text-muted);
}

.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
}

.filter-select:focus {
    border-color: var(--primary);
}

.results-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Downloads Page */
.downloads-section {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.downloads-container {
    max-width: 900px;
    margin: 0 auto;
}

.downloads-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--surface);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    width: fit-content;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-icon {
    width: 18px;
    height: 18px;
}

.tab-icon svg {
    width: 100%;
    height: 100%;
}

.tab-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tab-btn.active .tab-badge {
    background: rgba(255, 255, 255, 0.25);
}

.download-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.download-item:hover {
    background: var(--surface-light);
}

.download-item-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.download-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.download-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-item-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.download-item-status {
    margin-right: 1rem;
    flex-shrink: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.pending {
    background: rgba(253, 203, 110, 0.15);
    color: var(--warning);
}

.status-badge.downloading {
    background: rgba(0, 206, 201, 0.15);
    color: var(--secondary);
}

.status-badge.completed {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.status-badge.failed {
    background: rgba(225, 112, 85, 0.15);
    color: var(--error);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.downloading .status-dot {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.download-progress {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.download-progress-bar {
    height: 100%;
    background: var(--gradient-2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.download-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #00A381;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #D63031;
}

.btn-pause {
    background: #FDCB6E;
    color: #2D3436;
}

.btn-pause:hover {
    background: #F9E79F;
}

.btn-resume {
    background: #00B894;
    color: white;
}

.btn-resume:hover {
    background: #00A381;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.empty-state p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text);
}

/* Playlist Grid */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.playlist-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.playlist-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.playlist-card-cover {
    position: relative;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-card-icon {
    width: 64px;
    height: 64px;
    background: var(--coverColor);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.playlist-card-info {
    padding: 0 1.5rem 1.5rem;
}

.playlist-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.playlist-card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.playlist-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.playlist-song-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.playlist-card-download {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.playlist-card-download:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.playlist-card-download svg {
    width: 14px;
    height: 14px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.song-card,
.chart-item,
.download-item {
    animation: fadeInUp 0.5s ease forwards;
}

.song-card:nth-child(1) { animation-delay: 0.05s; }
.song-card:nth-child(2) { animation-delay: 0.1s; }
.song-card:nth-child(3) { animation-delay: 0.15s; }
.song-card:nth-child(4) { animation-delay: 0.2s; }
.song-card:nth-child(5) { animation-delay: 0.25s; }
.song-card:nth-child(6) { animation-delay: 0.3s; }
.song-card:nth-child(7) { animation-delay: 0.35s; }
.song-card:nth-child(8) { animation-delay: 0.4s; }

/* Responsive */
/* Settings Page */
.settings-section {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.settings-container {
    max-width: 100%;
}

.settings-groups {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.settings-group {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.settings-group h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.settings-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.setting-info {
    flex: 1;
}

.setting-info label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.setting-description {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.settings-select,
.settings-input {
    padding: 0.6rem 1rem;
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    min-width: 200px;
}

.settings-select:focus,
.settings-input:focus {
    border-color: var(--primary);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-slider {
    width: 150px;
    height: 4px;
    background: var(--surface-light);
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-light);
    border-radius: 28px;
    transition: var(--transition);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background: white;
}

.folder-path {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--surface-light);
    border-radius: var(--radius);
}

.folder-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.about-info {
    background: var(--surface-light);
    border-radius: var(--radius);
    padding: 1rem;
}

.about-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.about-row span:first-child {
    color: var(--text-secondary);
}

.about-row span:last-child {
    font-weight: 500;
}

.api-status {
    color: var(--success);
}

.api-status.offline {
    color: var(--error);
}

.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.settings-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-toast.show {
    opacity: 1;
}

.settings-toast.success {
    border-color: var(--success);
}

.settings-toast.error {
    border-color: var(--error);
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem 0;
    }

    .nav-search {
        order: 3;
        max-width: 100%;
        margin: 1rem 0 0;
        width: 100%;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero {
        padding: 4rem 1rem 3rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .section {
        padding: 1rem 1rem 3rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .song-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-select {
        min-width: 100%;
    }

    .downloads-tabs {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ============= YOUTUBE PLAYER OVERLAY ============= */
#imaning-player-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 28, 0.86);
    backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.imaning-player {
    background: var(--surface);
    border: 1px solid var(--surface-light, #2a2a35);
    border-radius: 16px;
    padding: 16px;
    width: min(680px, 96vw);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.imaning-player-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.imaning-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.imaning-player-cover {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.imaning-player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imaning-player-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70vw;
}

.imaning-player-artist {
    font-size: 0.85rem;
    opacity: 0.7;
    color: var(--text, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70vw;
}

.imaning-player-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text, #fff);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imaning-player-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.imaning-player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.imaning-player-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
