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

    :root { --banner-cover-url: none; } /* default */

    /* Design System Variables */
    :root {
        /* Music App Dark Theme */
        --background: hsl(220, 15%, 8%);
        --background-secondary: hsl(220, 15%, 12%);
        --background-tertiary: hsl(220, 15%, 16%);
        --foreground: hsl(0, 0%, 98%);
        --foreground-secondary: hsl(0, 0%, 85%);
        --foreground-muted: hsl(0, 0%, 60%);

        /* Brand Colors */
        --primary: hsl(210, 85%, 60%);
        --primary-foreground: hsl(0, 0%, 100%);
        --accent: hsl(280, 85%, 65%);
        --accent-foreground: hsl(0, 0%, 100%);

        /* Card Colors */
        --card: hsl(220, 15%, 12%);
        --card-hover: hsl(220, 15%, 18%);
        --card-foreground: hsl(0, 0%, 98%);

        /* Gradients */
        --gradient-primary: linear-gradient(135deg, hsl(210, 85%, 60%), hsl(280, 85%, 65%));
        --gradient-card: linear-gradient(135deg, hsl(220, 15%, 12%), hsl(220, 15%, 16%));
        --gradient-overlay: linear-gradient(180deg, transparent, hsl(220, 15%, 8%, 0.8));

        /* Interactive States */
        --hover: hsl(220, 15%, 20%);
        --active: hsl(220, 15%, 24%);
        
        /* Shadows */
        --shadow-card: 0 4px 12px hsl(220, 15%, 4%, 0.3);
        --shadow-player: 0 -4px 20px hsl(220, 15%, 4%, 0.5);

        /* Border Radius */
        --radius: 0.75rem;
        --radius-sm: 0.5rem;
        --radius-lg: 1rem;

        /* Animations */
        --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    body {
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        background: var(--background);
        color: var(--foreground);
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        overscroll-behavior-y: contain;
        font-size: 14px;
    }

    .app {
        min-height: 100vh;
        min-height: 100dvh;
        background: var(--background);
        position: relative;
    }

    /* Header */
    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 3rem 1rem 1rem 1rem;
        position: relative;
    }

    .greeting {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--foreground);
    }

    .header-icons {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .icon-button {
        background: none;
        border: none;
        padding: 0.5rem;
        color: var(--foreground-secondary);
        cursor: pointer;
        transition: var(--transition-smooth);
    }

    .icon-button:hover {
        color: var(--foreground);
        transform: scale(1.1);
    }

    .icon-button i {
        width: 1.5rem;
        height: 1.5rem;
    }

    /* Main Content */
    .main-content {
        padding: 0 1rem 8rem 1rem;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Album Detail View */
    .album-view {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: var(--background);
      overflow-y: auto;
      z-index: 100;
      display: flex;
      flex-direction: column;
    }

    .album-topbar {
      display: flex;
      align-items: center;
      padding: 1rem;
    }

    .album-back {
      background: none;
      border: none;
      color: var(--foreground);
      font-size: 1.2rem;
      cursor: pointer;
      display: flex;
      align-items: center;
    }

    .album-header {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 1.5rem 1rem;
      text-align: center;
    }

    #album-cover {
      width: 14rem;
      height: 14rem;
      border-radius: var(--radius-lg);
      object-fit: cover;
      margin-bottom: 1rem;
      box-shadow: var(--shadow-card);
    }

    #album-title {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--foreground);
      margin-bottom: 0.25rem;
    }

    #album-artist {
      font-size: 1rem;
      color: var(--foreground-muted);
      margin: 0;
    }

    .album-tracks {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      padding: 1rem;
    }

    .album-track {
      display: flex;
      flex-direction: column;
      background: var(--card);
      border-radius: var(--radius);
      padding: 0.75rem;
      transition: var(--transition-smooth);
      cursor: pointer;
    }

    .album-track:hover {
      background: var(--card-hover);
    }

    .album-track span {
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--foreground);
    }

    .album-track small {
      font-size: 0.8rem;
      color: var(--foreground-muted);
    }

    /* Sections */
    .section {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
        font-weight: bold;
        color: var(--foreground);
    }

    .horizontal-scroll {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .horizontal-scroll::-webkit-scrollbar {
        display: none;
    }

    .music-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 9rem;
        cursor: pointer;
        transition: var(--transition-smooth);
    }

    .music-card:hover {
        transform: scale(1.05);
    }

    .music-card img {
        width: 9rem;
        height: 9rem;
        border-radius: var(--radius);
        object-fit: cover;
        box-shadow: var(--shadow-card);
        margin-bottom: 0.75rem;
    }

    .music-card span {
        color: var(--foreground);
        font-weight: 600;
        text-align: center;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* Music Player */
    .music-player {
        position: fixed;
        bottom: 4rem;
        left: 0;
        right: 0;
        background: var(--gradient-card);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--background-tertiary);
        box-shadow: var(--shadow-player);
        z-index: 40;
        padding: 0.75rem 1rem;
    }

    .player-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.75rem;
    }

    .track-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1;
    }

    .track-image {
        width: 3rem;
        height: 3rem;
        border-radius: var(--radius);
        overflow: hidden;
        background: var(--background-tertiary);
    }

    .track-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .track-details {
        flex: 1;
        overflow: hidden;
    }

    .track-details h4 {
        color: var(--foreground);
        font-weight: 600;
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .track-details p {
        color: var(--foreground-muted);
        font-size: 0.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .player-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .control-button {
        background: none;
        border: none;
        padding: 0.5rem;
        color: var(--foreground-secondary);
        cursor: pointer;
    }

    .control-button i {
        width: 1.25rem;
        height: 1.25rem;
    }

    .play-button {
        width: 3rem;
        height: 3rem;
        background: var(--gradient-primary);
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: var(--transition-smooth);
        box-shadow: 0 4px 12px hsl(210, 85%, 60%, 0.3);
    }

    .play-button:hover {
        transform: scale(1.05);
    }

    .play-button i {
        width: 1.25rem;
        height: 1.25rem;
        color: white;
    }

    .progress-bar {
        width: 100%;
    }

    .progress-track {
        width: 100%;
        height: 0.3rem;
        background: var(--background-tertiary);
        border-radius: 0.125rem;
        position: relative;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        overflow: visible;
    }

    .progress-fill {
        width: 35%;
        height: 100%;
        background: var(--gradient-primary);
        border-radius: 0.25rem;
    }
    
    .progress-handle-circle {
    position: absolute;
    top: 50%;
    left: 35%; /* Should be updated by JS */
    width: 0.8rem;
    height: 0.8rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    opacity: 1; /* Changed from 0 to 1 */
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

    /* REMOVE THIS RULE */
.progress-track:hover .progress-handle-circle,
.progress-track:active .progress-handle-circle {
    opacity: 1;
}

    /* Bottom Navigation */
    .bottom-nav {
    position: fixed;
    bottom: -0.1rem;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 50;
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        background: none;
        border: none;
        color: var(--foreground-muted);
        cursor: pointer;
        padding: 0.5rem 1rem;
        transition: var(--transition-smooth);
        font-size: 0.75rem;
    }

    .nav-item.active {
        color: var(--primary);
    }

    .nav-item:hover {
        color: var(--foreground-secondary);
    }

    .nav-item.active:hover {
        color: var(--primary);
    }

    .nav-item i {
        width: 1.5rem;
        height: 1.5rem;
    }

    /* Music Banner (Full-Screen Player) */
    .music-banner {
      display: flex;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--background);
      z-index: 1000;
      padding: 0px;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: var(--transition-smooth);
    }

    .player-container {
      position: relative;
      width: 100%;
      max-width: 500px;
      height: 100%;
      background: transparent;
      padding: 1.5rem;
      border-radius: var(--radius-lg);
      overflow: hidden;
    }

    .player-container::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image: var(--banner-cover-url, none);
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      filter: blur(20px) brightness(0.6);
      transform: scale(1.1);
      z-index: 0;
    }

    .player-container::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, var(--background), rgba(0, 0, 0, 0.25));
      z-index: 0;
    }

    .player-container > * {
      position: relative;
      z-index: 1;
    }

    /* Fix the close button positioning */
.close-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--foreground);
    transition: var(--transition-smooth);
    z-index: 100;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

    .close-btn i {
      width: 1rem;
      height: 1rem;
    }

    .album-cover {
    position: relative;
      width: 100%;
      max-width: 300px;
    }

    .overlay-btn {
      position: absolute;
      bottom: 10px;
      right: 10px;
      margin: 0 !important;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(5px);
      border-radius: 20px;
      padding: 8px 16px;
      font-size: 0.875rem;
      transition: var(--transition-smooth);
    }

    .overlay-btn:hover {
      background: rgba(0, 0, 0, 0.7);
      transform: scale(1.05);
    }

    #banner-cover-image {
      width: 80%;
      max-width: 300px;
      aspect-ratio: 1;
      object-fit: cover;
      border-radius: var(--radius);
      box-shadow: var(--shadow-card);
    }

    .song-info {
      text-align: center;
      margin-bottom: 2rem;
    }

    #banner-song-title {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--foreground-secondary);
      margin-bottom: 0.25rem;
    }

    #banner-artist-name {
      font-size: 1rem;
      color: var(--foreground-muted);
    }

    /* Flip Animation */
    .flip-container {
      perspective: 1000px;
      width: 100%;
      height: 300px;
      margin-bottom: 20px;
    }

    .flip-inner {
      position: relative;
      width: 100%;
      height: 100%;
      transition: transform 0.6s;
      transform-style: preserve-3d;
    }

    .flip-inner.flipped {
      transform: rotateY(180deg);
    }

    .flip-inner.flipped .overlay-btn {
      display: none;
    }

    .flip-front, .flip-back {
      position: absolute;
      width: 100%;
      height: 100%;
      backface-visibility: hidden;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .flip-back {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      margin: 0 auto;
      height: 130%;
      transform: rotateY(180deg);
      background: none;
      border-radius: 20px;
      padding: 20px 30px;
    }

    /* Lyrics Styling */
    .lyrics-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      margin-bottom: 15px;
    }

    .lyrics-content {
      flex: 1;
      width: 130%;
      max-width: 700px;
      overflow-y: auto;
      text-align: center;
      font-size: 1rem;
      line-height: 2rem;
      padding: 0 1rem;
    }

    .lyrics-line {
      margin: 8px 0;
      transition: all 0.3s ease;
      opacity: 0.7;
      word-break: normal;
      white-space: normal;
      overflow-wrap: break-word;
      text-align: center;
    }

    .lyrics-line.active-line {
      opacity: 1;
      color: var(--primary);
      font-weight: 600;
      transform: scale(1.05);
    }

    .lyrics-content::-webkit-scrollbar {
      display: none;
    }

    .flip-btn {
      margin: 0 !important;
      background: rgba(0, 0, 0, 0.7);
      border: none;
      color: var(--foreground);
      padding: 8px 16px;
      border-radius: 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .flip-2-btn {
      background: rgba(255,255,255,0.1);
      border: none;
      color: var(--foreground);
      padding: 8px 16px;
      border-radius: 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .song-info {
      margin-top: 20px;
      text-align: center;
    }

    .progress-container {
      width: 100%;
      margin-bottom: 1.5rem;
    }

    .time-stamps {
      display: flex;
      justify-content: space-between;
      font-size: 0.75rem;
      color: var(--foreground-muted);
      margin-top: 0.5rem;
    }

    .main-controls {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 1.5rem;
      margin-bottom: 1.5rem;
    }

    .popup {
      position: fixed;
      bottom: 6rem;
      left: 50%;
      transform: translateX(-50%);
      background: var(--background-secondary);
      color: var(--foreground);
      padding: 0.5rem 1rem;
      border-radius: var(--radius-sm);
      font-size: 0.875rem;
      opacity: 0;
      transition: opacity 0.5s ease-in-out;
      pointer-events: none;
    }

    .popup.active {
      opacity: 1;
    }

    .music-banner.active ~ .header,
    .music-banner.active ~ .main-content,
    .music-banner.active ~ .music-player,
    .music-banner.active ~ .bottom-nav,
    .music-banner.active ~ #settings-sheet {
      display: none !important;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
      .player-container {
        padding: 1rem;
      }

      #banner-cover-image {
        margin-top: 40%;
        width: 100%;
        max-width: 300px;
      }

      #banner-song-title {
        margin-top: 70px;
        font-size: 1.25rem;
      }

      #banner-artist-name {
        font-size: 0.875rem;
      }
      
      .profile-dropdown {
        right: 0.5rem;
        width: 220px;
      }
    }

    /* Custom scrollbar */
    ::-webkit-scrollbar {
        width: 4px;
    }

    ::-webkit-scrollbar-track {
        background: var(--background-secondary);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--background-tertiary);
        border-radius: 2px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--hover);
    }

    /* Responsive optimizations */
    @media (max-width: 320px) {
        .quick-grid {
            gap: 0.25rem;
        }
        
        .playlist-card {
            padding: 0.5rem;
        }
        
        .playlist-card img {
            width: 2.5rem;
            height: 2.5rem;
        }
        
        .music-card {
            min-width: 8rem;
        }
        
        .music-card img {
            width: 8rem;
            height: 8rem;
        }
        
        .profile-dropdown {
            width: 200px;
            right: 0.5rem;
        }
    }

    /* Settings full screen */
    #settings-sheet {
      position: fixed;
      left: 0;
      right: 0;
      bottom: -100%;
      height: 60%;
      background: var(--background);
      border-top-left-radius: 20px;
      background: blur(20px);
      border-top-right-radius: 20px;
      box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
      transition: bottom 0.3s ease;
      display: flex;
      flex-direction: column;
      z-index: 9999;
    }

    #settings-sheet.active {
      bottom: 0;
    }

    .sheet-header {
      display: flex;
      align-items: center;
      padding: 12px 16px;
      border-bottom: 1px solid var(--border);
      position: relative;
    }

    .sheet-header h2 {
      flex: 1;
      text-align: center;
      margin: 0;
    }

    .sheet-header button {
      background: none;
      border: none;
      color: var(--foreground);
      font-size: 20px;
    }

    .drag-line {
      width: 40px;
      height: 4px;
      background: var(--border);
      border-radius: 2px;
      position: absolute;
      top: 6px;
      left: 50%;
      transform: translateX(-50%);
    }

    .sheet-body {
      padding: 20px;
      overflow-y: auto;
    }

    .quality-options {
      display: grid;
      gap: 12px;
      margin-top: 15px;
    }

    .quality-btn {
      width: 100%;
      padding: 14px;
      border: none;
      border-radius: 12px;
      font-size: 16px;
      font-weight: 500;
      background: var(--surface);
      color: var(--foreground);
      text-align: left;
      transition: background 0.2s;
    }

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

    .quality-btn:hover {
      background: var(--primary-hover, #444);
    }

    /* Search Bar */
    .search-container {
        display: flex;
        align-items: center;
        background: var(--card);
        border-radius: var(--radius);
        padding: 0.5rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-card);
    }

    .search-container input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: var(--foreground);
        font-size: 0.9rem;
        padding: 0.4rem;
    }

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

    .search-container button {
        background: var(--gradient-primary);
        border: none;
        border-radius: var(--radius-sm);
        padding: 0.5rem 0.8rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-foreground);
        transition: var(--transition-smooth);
    }

    .search-container button:hover {
        transform: scale(1.05);
    }

    .search-results {
        margin-top: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-result-item {
        display: flex;
        align-items: center;
        background: var(--card);
        border-radius: var(--radius);
        padding: 0.5rem;
        cursor: pointer;
        gap: 0.75rem;
        transition: var(--transition-smooth);
    }

    .search-result-item:hover {
        background: var(--card-hover);
    }

    .search-result-item img {
        width: 3rem;
        height: 3rem;
        border-radius: var(--radius-sm);
        object-fit: cover;
    }

    .search-result-info {
        flex: 1;
        overflow: hidden;
    }

    .search-result-info h4 {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--foreground);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .search-result-info p {
        font-size: 0.75rem;
        color: var(--foreground-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Touch optimizations */
    @media (hover: none) and (pointer: coarse) {
        .playlist-card:active {
            background: var(--card-hover);
            transform: scale(0.98);
        }
        
        .music-card:active {
            transform: scale(1.02);
        }
        
        .play-button:active {
            transform: scale(0.95);
        }
        
        .profile-avatar:active {
            transform: scale(0.95);
        }
    }


    /* Spotify Sections Styles */
.spotify-section {
    margin-bottom: 2rem;
}

.spotify-section .section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spotify-section .section-title::before {
    content: '🎵';
    font-size: 1.1rem;
}

.spotify-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 0.5rem;
    transition: var(--transition-smooth);
    min-width: 150px;
}

.spotify-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
}

.spotify-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.spotify-card h4 {
    font-size: 0.9rem;
    margin: 0;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-card p {
    font-size: 0.8rem;
    color: var(--foreground-muted);
    margin: 0.25rem 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments for Spotify sections */
@media (max-width: 768px) {
    .spotify-card {
        min-width: 120px;
    }
    
    .spotify-card img {
        height: 100px;
    }
}

/* Compact Footer */
.compact-footer {
    position: fixed;
    bottom: 3.7rem;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    transition: var(--transition-smooth);
    margin: 0 1rem 1rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
}

.footer-track-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.footer-track-image {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--background-tertiary);
    flex-shrink: 0;
}

.footer-track-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-track-details {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.footer-track-details h4 {
    color: var(--foreground);
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-track-details p {
    color: var(--foreground-muted);
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.footer-play-button {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.footer-play-button:hover {
    transform: scale(1.05);
}

.footer-play-button i {
    width: 1rem;
    height: 1rem;
    color: white;
}

.footer-next-button {
    background: none;
    border: none;
    color: var(--foreground-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-smooth);
}

.footer-next-button:hover {
    color: var(--foreground);
}

.footer-next-button i {
    width: 1.2rem;
    height: 1.2rem;
}

/* Progress bar for footer */
.footer-progress {
    position: absolute;
    top: -2px;
    left: 0.4rem;
    right: 0.4rem;
    height: 2px;
    background: transparent;
}

.footer-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 1px;
}

/* Hide original music player when footer is active */
.compact-footer.active ~ .music-player {
    display: none;
}

/* Adjust main content padding when footer is active */
.compact-footer.active ~ .main-content {
    padding-bottom: 5rem;
}

/* Enhanced card animations */
.music-card {
    position: relative;
    overflow: hidden;
}

.music-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1;
}

.music-card:hover::before {
    opacity: 0.1;
}

.music-card img {
    transition: var(--transition-smooth);
    position: relative;
    z-index: 2;
}

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

/* Enhanced section titles */
.section-title {
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.2em;
    background: var(--gradient-primary);
    border-radius: 3px;
}

/* Improved search results */
.search-result-item {
    position: relative;
    overflow: hidden;
}

.search-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s ease;
}

.search-result-item:hover::before {
    left: 0;
}

/* Enhanced buttons */
.play-button, .footer-play-button {
    position: relative;
    overflow: hidden;
}

.play-button::before, .footer-play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: var(--transition-smooth);
}

.play-button:hover::before, .footer-play-button:hover::before {
    opacity: 1;
}

/* Smooth scrolling for horizontal sections */
.horizontal-scroll {
    scroll-behavior: smooth;
}

/* Loading animation for cards */
.music-card, .search-result-item {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .compact-footer {
        height: 55px;
        padding: 0.4rem 0.8rem;
    }
    
    .footer-track-image {
        width: 2.2rem;
        height: 2.2rem;
    }
    
    .footer-track-details h4 {
        font-size: 0.75rem;
    }
    
    .footer-track-details p {
        font-size: 0.65rem;
    }
    
    .footer-play-button {
        width: 2.2rem;
        height: 2.2rem;
    }
}

/* Visual feedback for active states */
.nav-item {
    position: relative;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* Enhanced music banner transitions */
.music-banner {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* End of enhanced styles */
    /*End of styles.css */