
:root {
    /* Light Theme */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent-warm: #f59e0b;
    --accent-cool: #10b981;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --text-primary: var(--gray-800);
    --text-secondary: var(--gray-600);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 8px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 15px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Theme Toggle Colors */
    --sun-color: #fbbf24;
    --moon-color: #e2e8f0;
    --moon-shadow: #1e293b;
}


:root {
    /* Light Theme - Serene Day Colors */
    --primary: #7CB9E8;      /* Peaceful sky blue */
    --primary-light: #B0E0E6; /* Powder blue */
    --primary-dark: #4682B4;  /* Steel blue */
    --accent-warm: #E6B8AF;   /* Soft coral */
    --accent-cool: #98FB98;   /* Mint green */
    --bg-primary: #ffffff;
    --bg-secondary: #F0F8FF;  /* Alice blue */
    --text-primary: #2F4F4F;  /* Dark slate gray */
    --text-secondary: #778899; /* Light slate gray */

    /* Theme Toggle Colors */
    --sun-color: #FFD700;     /* Gentle gold */
    --moon-color: #E6E6FA;    /* Lavender */
    --moon-shadow: #9370DB;   /* Medium purple */
}

/* Dark Theme - Calming Night Colors */
[data-theme="dark"] {
    --primary: #9B8FBF;      /* Soft lavender */
    --primary-light: #C5B4E3; /* Light periwinkle */
    --primary-dark: #6A5495;  /* Muted purple */
    --accent-warm: #D4A5A5;   /* Dusty rose */
    --accent-cool: #87CEEB;   /* Sky blue */
    --bg-primary: #1F2937;    /* Deep blue-gray */
    --bg-secondary: #2D3748;  /* Slate blue-gray */
    --bg-tertiary: #4A5568;   /* Medium blue-gray */
    --text-primary: #E2E8F0;  /* Soft white */
    --text-secondary: #A0AEC0; /* Cool gray */
}

/* Hero Section Gradient */
.hero {
    background: linear-gradient(135deg,
            var(--primary) 0%,
            var(--primary-dark) 100%
    );
    position: relative;
    overflow: hidden;
}

/* Add gentle floating clouds for light theme */
[data-theme="light"] .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 20px, transparent 21px),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.4) 20px, transparent 21px);
    background-size: 100px 100px;
    animation: floatingClouds 30s linear infinite;
    opacity: 0.6;
}

/* Add gentle starlight for dark theme */
[data-theme="dark"] .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: twinkleStars 4s ease-in-out infinite;
}

@keyframes floatingClouds {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

@keyframes twinkleStars {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Softer badge gradients */
.badge-hindi {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 4px 15px rgba(124, 185, 232, 0.2);
}

.badge-synced {
    background: linear-gradient(135deg, var(--accent-warm), var(--primary-light));
    box-shadow: 0 4px 15px rgba(230, 184, 175, 0.2);
}

/* Musical staff with gentler opacity */
.musical-staff {
    opacity: 0.06;
}

/* Note animation updates */
.note {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-light);
    opacity: 0.7;
}

/* Smoother transitions */
.theme-toggle,
.search-input,
.badge,
.lyrics-line {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Song card with softer shadows */
.song-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .song-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}


/* Dark Theme */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-light: #a5b4fc;
    --primary-dark: #df0756;
    --accent-warm: #fbbf24;
    --accent-cool: #34d399;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Enhanced Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.toggle-inner {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun {
    position: absolute;
    inset: 0;
    background: var(--sun-color);
    border-radius: 50%;
    transform: scale(1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-beams {
    position: absolute;
    inset: -8px;
    transform-origin: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-beam {
    position: absolute;
    width: 2px;
    height: 8px;
    background: var(--sun-color);
    left: calc(50% - 1px);
    top: 0;
    transform-origin: center 20px;
}

.sun-beam:nth-child(1) { transform: rotate(0deg); }
.sun-beam:nth-child(2) { transform: rotate(45deg); }
.sun-beam:nth-child(3) { transform: rotate(90deg); }
.sun-beam:nth-child(4) { transform: rotate(135deg); }
.sun-beam:nth-child(5) { transform: rotate(180deg); }
.sun-beam:nth-child(6) { transform: rotate(225deg); }
.sun-beam:nth-child(7) { transform: rotate(270deg); }
.sun-beam:nth-child(8) { transform: rotate(315deg); }

[data-theme="dark"] .sun {
    transform: scale(0.75);
    background: var(--moon-color);
    box-shadow: inset -4px -4px 0 0 var(--moon-shadow);
}

[data-theme="dark"] .sun-beams {
    opacity: 0;
    transform: rotate(45deg);
}

/* Enhanced Musical Notes Animation */
.musical-notes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.note {
    position: absolute;
    color: var(--primary);
    font-size: 2rem;
    opacity: 0;
    filter: blur(0.5px);
    text-shadow: 0 0 10px var(--primary-light);
    will-change: transform, opacity;
    animation: floatUpward 6s ease-in-out forwards;
}

@keyframes floatUpward {
    0% {
        transform: translate(var(--start-x), 100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
        transform: translate(var(--start-x), 80vh) rotate(var(--rotate));
    }
    80% {
        opacity: 0.4;
        transform: translate(var(--end-x), 20vh) rotate(calc(var(--rotate) * 2));
    }
    100% {
        transform: translate(var(--end-x), -50px) rotate(calc(var(--rotate) * 3));
        opacity: 0;
    }
}

/* Musical Staff Background */
.musical-staff {
    position: fixed;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--primary) 20%,
            var(--primary) 80%,
            transparent 100%);
    opacity: 0.05;
    pointer-events: none;
}

.staff-1 { top: 20%; }
.staff-2 { top: 25%; }
.staff-3 { top: 30%; }
.staff-4 { top: 35%; }
.staff-5 { top: 40%; }

/* Hero Section */
.hero {
    position: relative;
    min-height: 60vh;
    background: linear-gradient(135deg,
            var(--primary) 0%,
            var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
    transition: background 0.3s ease;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0C13.4 15 0 30 0 45s13.4 15 30 15 30 0 30-15-13.4-30-30-45z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E");
    animation: patternMove 60s linear infinite;
    opacity: 0.1;
    mask-image: linear-gradient(to bottom,
            transparent,
            black 20%,
            black 80%,
            transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg,
            var(--white) 0%,
            rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 800px;
    margin: -3rem auto 0;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 10;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--gray-100);
    border-radius: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: var(--bg-primary);
}

/* Enhanced Search Suggestions */
.suggestions-container {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    max-height: 300px;
    overflow-y: auto;
}

.suggestions-container.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.suggestion-item {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    color: var(--text-primary);
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: var(--bg-secondary);
    border-left-color: var(--primary);
    padding-left: 2rem;
}

.suggestion-icon {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

/* Enhanced Badges */
.badges-container {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.8rem 1.5rem;
    border-radius: 3rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    will-change: transform;
}

.badge-hindi {
    background: linear-gradient(135deg, #4ECDC4, #556270);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.badge-synced {
    background: linear-gradient(135deg, #FF847C, #FED766);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 132, 124, 0.3);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.badge:active {
    transform: translateY(0);
}

.badge svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Results Section */
.results-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

.results-section.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Song Card */
.song-card {
    position: relative;
    background: var(--bg-primary);
    border-radius: 1.5rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.song-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right,
            rgba(99, 102, 241, 0.1),
            transparent 70%);
    pointer-events: none;
}

/* Song Thumbnail and Info */
.song-thumbnail {
    width: 180px;
    height: 180px;
    border-radius: 1rem;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
    transform: rotate(-3deg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    will-change: transform;
}

.song-thumbnail:hover {
    transform: rotate(0deg) scale(1.05);
}

.song-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Update these styles in your existing CSS */
.lyrics-container {
    position: relative;
    background: var(--bg-primary);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
    overflow: hidden;
    text-align: center; /* Add this */
}

.lyrics-content {
    position: relative;
    z-index: 1;
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-primary);
    white-space: pre-wrap;
    max-width: 600px; /* Add this */
    margin: 0 auto; /* Add this */
}

.lyrics-line {
    display: flex;
    align-items: center;
    justify-content: center; /* Add this */
    padding: 0.75rem 1rem;
    margin: 0.25rem auto; /* Modified this */
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    will-change: transform, background-color;
    text-align: center; /* Add this */
    max-width: 500px; /* Add this */
}

/* For non-synced lyrics */
.lyrics-text {
    text-align: center;
    margin: 0 auto;
}

/* For synced lyrics */
.time-stamp {
    position: absolute; /* Add this */
    left: 0; /* Add this */
    font-family: 'Marcellus', serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
    width: 65px; /* Add this */
    text-align: right; /* Add this */
    padding-right: 1rem; /* Add this */
}

/* Add padding to lyrics text to accommodate timestamps */
.lyrics-line .lyrics-text {
    padding-left: 70px; /* Add this to make space for timestamp */
    flex: 1;
    text-align: center;
}

.song-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.song-artist {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.lyrics-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg,
            rgba(99, 102, 241, 0.03),
            rgba(99, 102, 241, 0.06));
    pointer-events: none;
    opacity: 0.5;
}

.lyrics-line:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(10px);
}

.lyrics-line.active {
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.lyrics-line::after {
    content: '♪';
    position: absolute;
    right: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--primary);
}

.lyrics-line:hover::after {
    opacity: 0.5;
    transform: translateX(0);
}

/* Loading Animation */
.loading {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    perspective: 1000px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--bg-secondary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes patternMove {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .search-container {
        margin: -2rem 2rem 0;
    }
    .results-section {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    .song-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .song-thumbnail {
        margin: 0 auto;
        width: 150px;
        height: 150px;
    }
    .badges-container {
        justify-content: center;
    }
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
    /* Responsive adjustments for lyrics */
    .lyrics-line {
        flex-direction: column;
        align-items: center;
        padding-top: 2rem; /* Add more padding for timestamp */
    }
    .time-stamp {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        padding-right: 0;
        opacity: 0.7;
    }
    .lyrics-line .lyrics-text {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .search-container {
        margin: -2rem 1rem 0;
        padding: 1.5rem;
    }
    .search-input {
        padding: 1rem;
        font-size: 1rem;
    }
    .badge {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .lyrics-container {
        padding: 1.5rem;
    }
    .lyrics-content {
        font-size: 1rem;
    }
}


.hamburger {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: var(--bg-secondary);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.hamburger:hover {
    background: var(--bg-tertiary);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
}

.hamburger-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
}

.hamburger-menu.active {
    transform: translateX(0);
}

.menu-item {
    color: var(--white);
    font-size: 1.5rem;
    margin: 1rem 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.menu-item:hover {
    color: var(--primary-light);
}

/* Footer styling */
.footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-align: center;
    padding: 1.5rem 0; /* Increase padding for more space */
    margin-top: 2rem; /* Add margin-top for space from content above */
    font-size: 0.9rem;
    box-shadow: var(--shadow-md); /* Optional: Add a subtle shadow for better separation */
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--primary-dark);
}

.footer p {
    margin: 0.5rem 0; /* Ensure consistent spacing between paragraphs */
}


.lyrics-container {
    position: relative;
}

.lyrics-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.75rem;
    z-index: 2;
}

.lyrics-action-btn {
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.lyrics-action-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.lyrics-action-btn:active {
    transform: translateY(0);
}

.lyrics-action-btn .material-icons {
    font-size: 20px;
}

.copy-tooltip {
    position: absolute;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    right: 0;
    top: calc(100% + 0.5rem);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.copy-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Music Player Container */
.music-player-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(to bottom, #4c3c7b, #861657);
}

/* Music Player */
.music-player {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 90%;
    max-width: 900px;
    display: flex;
    align-items: center;
}

/* Album Art */
.album-art {
    width: 220px;
    height: 220px;
    border-radius: 16px;
    margin-right: 40px;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
    cursor: pointer;
}

.album-art:hover {
    transform: scale(1.05);
}

/* Song Info */
.song-info {
    flex-grow: 1;
    text-align: center;
}

.song-title {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #4c3c7b;
}

.song-artist {
    font-size: 22px;
    color: #861657;
    margin-bottom: 20px;
}

.progress-container {
    width: 100%;
    height: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 6px;
    width: 0;
    transition: width 0.1s linear;
}

.progress-handle {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
    z-index: 2;
}

.progress-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.progress-container:hover .progress-bar {
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 100%);
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
}

.control-button {
    background-color: #4c3c7b;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.control-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.control-button .material-icons {
    font-size: 28px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .music-player {
        flex-direction: column;
        padding: 32px;
    }
    .album-art {
        width: 180px;
        height: 180px;
        margin-right: 0;
        margin-bottom: 24px;
    }
    .song-title {
        font-size: 26px;
        margin-bottom: 10px;
    }
    .song-artist {
        font-size: 20px;
        margin-bottom: 16px;
    }
    .progress-container {
        height: 10px;
        margin-bottom: 20px;
    }
    .progress-handle {
        width: 18px;
        height: 18px;
    }
    .controls {
        margin-top: 0;
    }
    .control-button {
        width: 52px;
        height: 52px;
        margin: 0 16px;
    }
    .control-button .material-icons {
        font-size: 24px;
    }
}


/* API Panel Styles */
.api-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 800px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.api-panel.active {
    right: 0;
}

.api-panel-content {
    padding: 2rem;
}

.api-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.close-api-panel {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.close-api-panel:hover {
    color: var(--primary);
}

.api-section {
    margin-bottom: 3rem;
}

.api-endpoint {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    color: var(--primary);
    font-family: monospace;
    margin: 1rem 0;
    overflow-y:auto;
}

.api-params {
    list-style: none;
    padding-left: 1rem;
}

.api-params li {
    margin: 0.5rem 0;
}

.api-example {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    overflow-y:auto;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.api-limits {
    list-style: none;
    padding-left: 1rem;
}

@media (max-width: 768px) {
    .api-panel {
        max-width: 100%;
    }
}


.listen-now-button {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.listen-now-button:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
}

.listen-now-button:active {
    transform: scale(1);
}


/* Streaming Links Container */
.streaming-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem; /* Maintain spacing between icons */
    margin: 1.5rem auto;
    padding: 0.5rem;
}

/* Individual Icon Style */
.streaming-icon {
    width: 80px; /* Keep frame size unchanged */
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--icon-bg, linear-gradient(135deg, #6366f1, #818cf8)); /* Dynamic gradient */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer;
    will-change: transform, background; /* GPU acceleration */
}

/* Hover Effect */
.streaming-icon:hover {
    transform: scale(1.1); /* Slight zoom */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Icon Images */
.streaming-icon img {
    width: 70%; /* Increase icon size */
    height: 70%;
    object-fit: contain; /* Prevent distortion */
    filter: blur(0); /* Ensure no blur */
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden; /* Avoid rendering glitches */
}

/* Tooltip on Hover */
.streaming-icon::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #000000d9; /* Semi-transparent black */
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    transition: opacity 0.3s ease, bottom 0.3s ease;
}

/* Tooltip Visibility on Hover */
.streaming-icon:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -50px;
}

/* Dark Mode Adjustment */
[data-theme="dark"] .streaming-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); /* Adjust gradient for dark mode */
}


.modern-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader-content {
    text-align: center;
    color: white;
}

.musical-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 60px;
    gap: 4px;
    margin-bottom: 20px;
}

.bar {
    width: 6px;
    height: 20px;
    background: linear-gradient(to top, #4CAF50, #2196F3);
    border-radius: 3px;
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { height: 20px; }
    50% { height: 50px; }
}

.bar:nth-child(1) { animation-delay: 0.0s; }
.bar:nth-child(2) { animation-delay: 0.1s; }
.bar:nth-child(3) { animation-delay: 0.2s; }
.bar:nth-child(4) { animation-delay: 0.3s; }
.bar:nth-child(5) { animation-delay: 0.4s; }
.bar:nth-child(6) { animation-delay: 0.5s; }
.bar:nth-child(7) { animation-delay: 0.6s; }

.loading-text {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

.sub-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation: pulse 2s infinite;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.notes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.note {
    position: absolute;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    animation: float 3s ease-in-out infinite;
    opacity: 0;
}

.loading-text.pop-in {
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes popIn {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) translateY(-20px);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) translateY(50px);
        opacity: 0;
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translate(var(--moveX), -200px) rotate(var(--rotation));
        opacity: 0;
    }
}


/* Musical Notes Background Animation */
.musical-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-note {
    position: absolute;
    font-size: 24px;
    opacity: 0;
    color: var(--primary);
    filter: blur(0.5px);
    will-change: transform, opacity;
    animation: floatNote 8s linear forwards;
}

/* Light theme notes */
[data-theme="light"] .floating-note {
    color: rgba(99, 102, 241, 0.2); /* Light purple */
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

/* Dark theme notes */
[data-theme="dark"] .floating-note {
    color: rgba(129, 140, 248, 0.2); /* Lighter purple */
    text-shadow: 0 0 10px rgba(129, 140, 248, 0.1);
}

@keyframes floatNote {
    0% {
        transform: translate(var(--startX), 110vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--endX), -10vh) rotate(var(--rotation));
        opacity: 0;
    }
}


/* Musical Scale Background */
.musical-scale-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.scale-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--primary) 20%,
        var(--primary) 80%,
        transparent 100%
    );
    opacity: 0.03;
    transform-origin: left;
    animation: scaleFloat 15s infinite linear;
}

/* Floating Musical Elements */
.music-element {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    animation: elementFloat 12s linear infinite;
}

.music-clef {
    font-family: serif;
    font-size: 3rem;
    opacity: 0;
    position: absolute;
    animation: clefSpin 20s ease-in-out infinite;
}

/* Sparkles */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0;
    animation: sparkle 4s linear infinite;
}

/* Wave Pattern */
.wave-pattern {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    opacity: 0.05;
    pointer-events: none;
}

.wave {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        var(--primary) 0%,
        transparent 10%
    );
    animation: waveMove 20s linear infinite;
}

/* Dynamic Color Adjustments for Themes */
[data-theme="light"] {
    --element-color: rgba(99, 102, 241, 0.1);
    --sparkle-color: rgba(99, 102, 241, 0.3);
    --wave-opacity: 0.03;
}

[data-theme="dark"] {
    --element-color: rgba(129, 140, 248, 0.15);
    --sparkle-color: rgba(129, 140, 248, 0.4);
    --wave-opacity: 0.05;
}

/* Animations */
@keyframes scaleFloat {
    0% { transform: translateX(-100%) scaleY(1); }
    50% { transform: translateX(0%) scaleY(0.8); }
    100% { transform: translateX(100%) scaleY(1); }
}

@keyframes elementFloat {
    0% {
        transform: translate(var(--startX), 110vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: var(--element-opacity, 0.2);
    }
    90% {
        opacity: var(--element-opacity, 0.2);
    }
    100% {
        transform: translate(var(--endX), -10vh) rotate(var(--rotation));
        opacity: 0;
    }
}

@keyframes clefSpin {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 0.1;
    }
    80% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1) rotate(180deg);
        opacity: var(--sparkle-opacity, 0.4);
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes waveMove {
    0% { background-position: 0 0; }
    100% { background-position: 100% 100%; }
}

/* Dynamic Element Generation Script */
.generate-elements {
    animation: none !important;
    opacity: 0 !important;
}


/* Position the icon container */
.icon-container {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

/* General icon styles */
.material-icons {
    font-size: 32px; /* Large size for visibility */
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Hover and active states */
.material-icons:hover {
    transform: scale(1.2);
}

/* Clear icon styles */
.clear-icon {
    display: none;
    font-size: 24px;
    color: var(--text-secondary);
}

/* Default mic icon */
.mic-icon {
    color: var(--primary);
}

/* Listening mic icon */
.mic-icon.listening {
    color: var(--accent-warm); /* Highlight color when listening */
    animation: pulse 1.5s infinite; /* Subtle pulsing effect */
}

/* Light and dark mode adjustments */
[data-theme="light"] .mic-icon {
    color: #ff5722;
}

[data-theme="dark"] .mic-icon {
    color: #4caf50;
}

[data-theme="dark"] .mic-icon.listening {
    color: #ff9800;
}

/* Pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* Hide default scrollbar across browsers while maintaining functionality */
html {
scroll-behavior: smooth; /* Enable smooth scrolling */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
width: 12px; /* Width of the scrollbar */
}

/* Track customization */
::-webkit-scrollbar-track {
background: transparent;
margin: 10px 0; /* Add some space at top and bottom */
}

/* Scrollbar handle */
::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
border-radius: 20px;
border: 3px solid transparent;
background-clip: content-box;
transition: all 0.3s ease;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Scrollbar handle on hover */
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
background-clip: content-box;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Hide scrollbar for Firefox */
* {
scrollbar-width: thin;
scrollbar-color: var(--primary) transparent;
}

/* Enhance scrolling behavior */
body {
overflow-y: overlay; /* Creates an overlay scrollbar effect */
}

/* Music note decorations for scrollbar (light theme) */
[data-theme="light"] ::-webkit-scrollbar-thumb::before {
content: '♪';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: rgba(255, 255, 255, 0.7);
font-size: 14px;
}

/* Music note decorations for scrollbar (dark theme) */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
border: 3px solid transparent;
background-clip: content-box;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* Scrollbar pulsing animation */
@keyframes scrollPulse {
0% { opacity: 0.7; }
50% { opacity: 1; }
100% { opacity: 0.7; }
}

::-webkit-scrollbar-thumb {
animation: scrollPulse 2s infinite;
}

/* Custom scroll behavior for specific containers */
.lyrics-container {
scroll-behavior: smooth;
scrollbar-width: thin;
}

/* Glowing effect when scrolling */
.scrolling-active ::-webkit-scrollbar-thumb {
box-shadow: 0 0 15px var(--primary);
}

/* JavaScript to add scrolling-active class when scrolling */

