* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9f9f9;
    --text-primary: #111111;
    --text-secondary: #666666;
    --border-color: #eeeeee;
    --nav-bg: rgba(255, 255, 255, 0);
    --player-bg: #ffffff;
    --player-border: #dddddd;
    --bottom-bar-bg: #cccccc;
    --bottom-bar-active: #000000;
    --search-bg: #f1f1f171;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --logo-bg: #efefef;
}

body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --nav-bg: rgba(26, 26, 26, 0);
    --player-bg: #222222;
    --player-border: #333333;
    --bottom-bar-bg: #555555;
    --bottom-bar-active: #ffffff;
    --search-bg: #333333;
    --glass-bg: rgba(30, 30, 30, 0.4);
    --logo-bg: #3a3a3a;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-primary);
    padding-bottom: 100px;
    color: var(--text-primary);
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* THEME TOGGLE BUTTON */
.theme-toggle {
    position: fixed;
    top: 22px;
    right: 20px;
    z-index: 1500;
    background: var(--logo-bg);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.5s ease-out 0.2s both;
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.theme-toggle:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    background: var(--bg-secondary);
}

.theme-toggle:active {
    transform: scale(0.9) rotate(0deg);
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hero Section Styles */
.hero-section {
    padding: 40px 20px;
    background: var(--bg-primary);
    margin-bottom: 20px;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    animation: fadeInDown 0.6s ease-out 0.2s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out 0.3s both;
}

.playlists-container {
    position: relative;
    margin-top: 20px;
}

.playlists-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 10px 0;
    margin: 0 50px;
}

.playlists-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.playlists-grid {
    display: flex;
    gap: 20px;
    width: max-content;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeInScale 0.5s ease-out 0.4s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.scroll-btn:hover {
    background: var(--bg-primary);
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--text-primary);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.9);
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-btn svg {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-btn-left:hover svg {
    transform: translateX(-2px);
}

.scroll-btn-right:hover svg {
    transform: translateX(2px);
}

.scroll-btn-left {
    left: 0;
}

.scroll-btn-right {
    right: 0;
}

.scroll-btn svg {
    width: 20px;
    height: 20px;
}

.scroll-btn:disabled,
.scroll-btn[style*="pointer-events: none"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.playlist-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    width: 180px;
    opacity: 0;
    animation: slideUpFade 0.6s ease-out both;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.playlist-card:nth-child(1) { animation-delay: 0.1s; }
.playlist-card:nth-child(2) { animation-delay: 0.15s; }
.playlist-card:nth-child(3) { animation-delay: 0.2s; }
.playlist-card:nth-child(4) { animation-delay: 0.25s; }
.playlist-card:nth-child(5) { animation-delay: 0.3s; }
.playlist-card:nth-child(6) { animation-delay: 0.35s; }

.playlist-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    border-color: var(--text-primary);
}

.playlist-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg-secondary);
}

.playlist-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.playlist-card:hover .playlist-image img {
    transform: scale(1.15);
}

.playlist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playlist-card:hover .playlist-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 3rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transform: scale(0.7) rotate(-90deg);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.playlist-card:hover .play-icon {
    transform: scale(1.1) rotate(0deg);
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

.playlist-info {
    padding: 15px;
}

.playlist-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.playlist-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.music-list {
    padding: 20px;
}

.song {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: slideInLeft 0.5s ease-out both;
    position: relative;
    overflow: hidden;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.song:nth-child(1) { animation-delay: 0.1s; }
.song:nth-child(2) { animation-delay: 0.15s; }
.song:nth-child(3) { animation-delay: 0.2s; }
.song:nth-child(4) { animation-delay: 0.25s; }
.song:nth-child(5) { animation-delay: 0.3s; }
.song:nth-child(6) { animation-delay: 0.35s; }
.song:nth-child(7) { animation-delay: 0.4s; }
.song:nth-child(8) { animation-delay: 0.45s; }
.song:nth-child(9) { animation-delay: 0.5s; }

.song::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--text-primary);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom;
}

.song:hover {
    background: var(--bg-secondary);
    transform: translateX(5px);
    padding-left: 25px;
}

.song:hover::before {
    
    transform-origin: top;
}

.song-details {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 2;
}

.album-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.song:hover .album-thumb {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.info {
    display: flex;
    flex-direction: column;
}

.info .title {
    font-weight: bold;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.info .artist {
    font-size: 14px;
    color: var(--text-secondary);
}

.waveform-preview {
    flex: 2;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 1px;
}

.mini-bar {
    width: 2px;
    height: 100%;
    background: #ccc;
    border-radius: 2px;
}

.song-meta {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
    gap: 20px;
}

.music-player {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--player-bg);
    border-top: 1px solid var(--player-border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 30px;
    z-index: 1000;
    transition: all 0.3s;
}

#playPauseBtn {
    margin-left: 10px;
    margin-right: 10px;
}

.player-controls img {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.left-group {
    display: flex;
    align-items: center;
}

.player-controls img:hover {
    transform: scale(1.3) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.player-controls img:active {
    transform: scale(1.1) rotate(0deg);
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#playPauseBtn {
    width: 24px;
    height: 24px;
}

#playPauseBtn:hover {
    transform: scale(1.4) rotate(0deg);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.music-player.expanded .player-controls img {
    animation: popIn 0.5s ease forwards, slowPulse 4s ease-in-out infinite;
}

@keyframes slowPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.bottom-waveform {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    padding: 0 10px;
    width: fit-content;
    cursor: pointer;
    gap: 1px;
}

.bottom-bar {
    width: 3px;
    height: 100%;
    background: var(--bottom-bar-bg);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom;
}

.bottom-bar.active {
    background: var(--bottom-bar-active);
    transform: scaleY(1.2);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.bottom-bar:hover {
    transform: scaleY(1.1);
}

.track-time {
    font-size: 14px;
    color: var(--text-secondary);
}

.song-number {
    font-size: 11px;
    color: var(--text-primary);
    width: 20px;
}

nav {
    background: var(--nav-bg);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    color: var(--text-primary);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    transition: background 0.2s;
}

.nav-links {
    display: flex;
    gap: 60px;
    font-size: 13px;
    align-items: center;
    margin-right: 20px;
    padding-right: 50px;
}

.nav-links a {
    text-decoration: none;
    color: #616161;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    padding: 5px 0;
}

body.dark-mode .nav-links a {
    color: #b0b0b0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-links a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active::after {
    width: 100%;
}

.search-wrapper {
    display: flex;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--search-bg);
    width: calc(100% - 60px);
    margin: 10px 30px 0 20px;
    box-sizing: border-box;
    margin-bottom: 10px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

.search-wrapper:hover {
    transform: scale(1.05);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-wrapper:focus-within {
    transform: scale(1.05);
    border-color: var(--text-primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.search-field {
    flex: 1;
    padding: 10px 15px;
    border: none;
    font-size: 14px;
    outline: none;
    background-color: transparent;
    width: 300px;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-field:focus {
    transform: translateX(2px);
}

.search-field::placeholder {
    color: var(--text-secondary);
}

.nav-links a.active {
    font-weight: bold;
    color: var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
}

.logo_image {
    height: 30px;
    vertical-align: middle;
    margin-right: 8px;
    background-color: var(--logo-bg);
    border-radius: 7px;
    padding: 0;
    margin-right: 20px;
}

#player-thumb {
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#player-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.lyrics-container {
    
    max-width: 90%;
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
    display: none;
    white-space: pre-wrap;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-player.expanded .lyrics-container {
    display: block;
    animation: fadeUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.lyrics-lines {
    padding: 0px 30px 0px 30px;
    font-size: 15px;
    line-height: 1.8em;
    max-height: calc(1.8em * 3);
    overflow-y: hidden;
    text-align: center;
    color: var(--text-primary);
    position: relative;
    user-select: none;
    will-change: transform;
    width: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-player.expanded .lyrics-lines {
    opacity: 1;
    transform: translateY(0);
    animation: fadeUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

.lyrics-line {
    opacity: 0.25;
    padding: 6px 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-secondary);
    transform: scale(0.95);
}

.lyrics-line.active {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 19px;
    opacity: 1;
    padding-top: 20px;
    transform: scale(1.05);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#player-thumb.expanded {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: expandThumb 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes expandThumb {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.music-player {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background: var(--player-bg);
    border-top: 1px solid var(--player-border);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    flex-wrap: wrap;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-player.expanded {
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 60px 30px 40px 30px;
    background: var(--player-bg);
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: expandPlayer 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    backdrop-filter: blur(10px);
}

@keyframes expandPlayer {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    50% {
        opacity: 0.95;
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Shrinking Animation - Fixes Lag */
.music-player.shrinking {
    /* Lock to full screen during animation so it doesn't snap */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    /* Disable transition to let animation take full control */
    transition: none !important;
    animation: collapsePlayer 0.5s cubic-bezier(0.32, 0, 0.67, 0) forwards;
    overflow: hidden;
}

@keyframes collapsePlayer {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(100vh - 85px)); }
}

/* Hide elements instantly when shrinking to prevent visual clutter */
.music-player.shrinking .lyrics-lines,
.music-player.shrinking .bottom-waveform,
.music-player.shrinking .song-info {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.music-player:not(.expanded) {
    animation: shrinkPlayer 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    /* Removed conflicting animation */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shrinkPlayer {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

.bottom-waveform,
.player-controls,
.track-time {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-player.expanded .bottom-waveform,
.music-player.expanded .player-controls,
.music-player.expanded .track-time {
    transform: translateY(30px);
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.music-player.expanded .bottom-waveform {
    animation-delay: 0.2s;
}

.music-player.expanded .player-controls {
    animation-delay: 0.3s;
}

.music-player.expanded .track-time {
    animation-delay: 0.4s;
}

.music-player.expanded #player-thumb {
    order: 1;
}

.music-player.expanded .song-info {
    order: 2;
}

.music-player.expanded .lyrics-container,
.music-player.expanded .lyrics-lines {
    order: 3;
}

.music-player.expanded .bottom-waveform {
    order: 4;
    width: 100%;
    max-width: 600px;
    margin-top: auto;
}

.music-player.expanded .player-controls {
    order: 5;
    gap: 30px;
    margin-bottom: 10px;
}

.music-player.expanded .track-time {
    order: 6;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.song-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.song-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.song-artist {
    font-size: 12px;
    color: var(--text-secondary);
}

.music-player.expanded .song-info {
    align-items: center;
    text-align: center;
    margin-left: 0;
    animation: fadeUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.music-player.expanded .song-title {
    font-size: 18px;
    transition: font-size 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-player.expanded .song-artist {
    font-size: 14px;
    transition: font-size 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-controls {
    gap: 10px;
}

.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 8px;
}

.menu-toggle:hover {
    background: var(--bg-secondary);
    transform: scale(1.1) rotate(90deg);
}

.menu-toggle:active {
    transform: scale(0.9) rotate(0deg);
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    body {
        padding-bottom: 140px;
    }

    .theme-toggle {
        top: 70px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
        gap: 0;
    }

    .left-group {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .menu-toggle {
        display: block;
        font-size: 22px;
        cursor: pointer;
        user-select: none;
        color: var(--text-primary);
        order: 1;
        transition: transform 0.4s ease;
    }

    .menu-toggle:active {
        transform: scale(0.85);
    }

    .search-wrapper {
        flex-grow: 1;
        margin: 0 1px;
        background-color: var(--search-bg);
        border-radius: 8px;
        order: 2;
        display: flex;
        align-items: center;
    }

    .search-field {
        width: 100%;
        font-size: 13px;
        padding: 8px 12px;
        border: none;
        outline: none;
        background: transparent;
        color: var(--text-primary);
    }

    .logo {
        order: 3;
        padding: 0;
    }

    .logo_image {
        height: 35px;
        padding: 0;
        background-color: var(--logo-bg);
        border-radius: 6px;
    }

    .nav-links {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        background-color: var(--glass-bg);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
        transition: max-height 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
        pointer-events: none;
        will-change: opacity, transform, max-height;
        margin-right: 0;
    }

    .nav-links.show {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        padding: 10px 20px;
    }

    .nav-links a {
        display: inline-block;
        font-size: 13px;
        font-weight: 500;
        padding: 8px 18px;
        background-color: var(--bg-secondary);
        border-radius: 12px;
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.3s ease;
        backdrop-filter: blur(5px);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .nav-links.show a {
        opacity: 1;
        transform: translateY(0);
        transition: all 0.4s ease;
    }

    .nav-links a:hover {
        transform: scale(1.08) translateX(5px);
        background-color: var(--border-color);
        color: var(--text-primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-links a.active {
        background-color: var(--border-color);
        font-weight: 600;
        color: var(--text-primary);
    }

    .hero-section {
        padding: 30px 15px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .playlists-scroll {
        margin: 0 15px;
    }

    .playlist-card {
        width: 150px;
    }

    .playlists-grid {
        gap: 15px;
    }

    .scroll-btn {
        display: none;
    }

    .playlist-info {
        padding: 12px;
    }

    .playlist-info h3 {
        font-size: 0.9rem;
    }

    .playlist-info p {
        font-size: 0.8rem;
    }

    .music-list {
        padding: 10px;
    }

    .song {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
        border-bottom: 1px solid var(--border-color);
    }

    .song-details {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 2;
    }

    .album-thumb {
        width: 40px;
        height: 40px;
        border-radius: 5px;
        object-fit: cover;
    }

    .info .title {
        font-size: 13px;
    }

    .info .artist {
        font-size: 12px;
    }

    .song-meta {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        font-size: 12px;
        color: var(--text-secondary);
        gap: 10px;
        margin-left: auto;
        text-align: right;
    }

    .music-player {
        padding: 10px 15px;
        flex-direction: row;
        gap: 12px;
        bottom: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    #player-thumb {
        flex-shrink: 0;
        width: 50px;
        height: 50px;
    }

    .song-info {
        flex: 1;
        margin-left: 0;
        min-width: 0;
        overflow: hidden;
    }

    .song-title {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-artist {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .player-controls {
        flex-shrink: 0;
        order: 3;
        gap: 10px;
    }

    .track-time {
        display: none;
    }

    .music-player.expanded .track-time {
        display: flex;
    }

    .music-player.expanded {
        padding: 20px;
        gap: 0;
        flex-direction: column;
        align-items: center;
    justify-content: space-between;
        text-align: center;
    overflow: hidden;
        max-height: 100vh;
    }

    .music-player.expanded #player-thumb {
    width: 260px;
    height: 260px;
    max-height: 35vh;
        order: 1;
        margin-bottom: 20px;
    }

    .music-player.expanded .song-info {
        align-items: center;
        text-align: center;
        margin-left: 0;
        order: 2;
        width: 100%;
        padding: 0 20px;
        margin-bottom: 25px;
    }

    .music-player.expanded .song-title {
        font-size: 18px;
        white-space: normal;
        margin-bottom: 5px;
    }

    .music-player.expanded .song-artist {
        font-size: 14px;
        white-space: normal;
    }

    .music-player.expanded .lyrics-container,
    .music-player.expanded .lyrics-lines {
        order: 3;
        width: 100%;
        max-width: 100%;
        padding: 0 25px;
        margin-bottom: 30px;
        flex: 1;
        min-height: 150px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .music-player.expanded .lyrics-lines {
        font-size: 15px;
        line-height: 2;
    padding: 0;
        overflow-y: auto;
        max-height: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    }

    .music-player.expanded .lyrics-lines::-webkit-scrollbar {
        display: none;
    }

    .music-player.expanded .lyrics-line {
        padding: 8px 0;
    }

    .music-player.expanded .lyrics-line.active {
        font-size: 17px;
        font-weight: 600;
        opacity: 1;
        padding-top: 10px;
    }

    .bottom-waveform {
        display: none;
    }

    .music-player.expanded .bottom-waveform {
        display: flex;
        height: 30px;
        width: 100%;
        justify-content: center;
        gap: 1px;
        order: 4;
        margin-bottom: 20px;
    }

    .bottom-bar {
        width: 2px;
    }

    .music-player.expanded .player-controls {
        justify-content: center;
        gap: 15px;
        order: 5;
        display: flex;
        margin-bottom: 15px;
    }

    .player-controls {
        justify-content: center;
        gap: 15px;
        display: flex;
    }

    .music-player.expanded .track-time {
        font-size: 13px;
        width: 100%;
        text-align: center;
        margin: 0 auto;
        order: 6;
    }

    .track-time {
        font-size: 13px;
        width: 100%;
        text-align: center;
        margin: 0 auto;
    }

    .lyrics-lines {
        font-size: 14px;
        padding: 0 10px;
    }

    .lyrics-line.active {
        font-size: 16px;
    }

    .song-title {
        font-size: 13px;
    }

    .song-artist {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 70px;
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    nav {
        padding: 8px 15px;
    }

    .logo_image {
        height: 30px;
        padding: 0;
    }

    .search-field {
        font-size: 12px;
    }

    .hero-section {
        padding: 20px 10px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .playlists-scroll {
        margin: 0 10px;
    }

    .playlist-card {
        width: 130px;
    }

    .playlists-grid {
        gap: 12px;
    }

    .scroll-btn {
        display: none;
    }

    .playlist-info {
        padding: 10px;
    }

    .playlist-info h3 {
        font-size: 0.85rem;
    }

    .playlist-info p {
        font-size: 0.75rem;
    }

    .music-list {
        padding: 8px;
    }

    .song {
        padding: 8px;
        gap: 8px;
    }

    .album-thumb {
        width: 35px;
        height: 35px;
    }

    .music-player {
        padding: 8px 12px;
        gap: 10px;
        flex-direction: row;
        justify-content: space-between;
    }

    #player-thumb {
        width: 45px;
        height: 45px;
    }

    .song-title {
        font-size: 12px;
    }

    .song-artist {
        font-size: 10px;
    }

    .player-controls img {
        width: 18px;
        height: 18px;
    }

    .music-player.expanded {
        flex-direction: column;
        align-items: center;
    justify-content: space-between;
    padding: 20px 15px;
        gap: 0;
    overflow: hidden;
        max-height: 100vh;
    }

    .music-player.expanded #player-thumb {
    width: 220px;
    height: 220px;
    max-height: 30vh;
        order: 1;
        margin-bottom: 15px;
    }

    .music-player.expanded .song-info {
        order: 2;
        width: 100%;
        padding: 0 15px;
        margin-bottom: 20px;
    }

    .music-player.expanded .song-title {
        margin-bottom: 5px;
    }

    .music-player.expanded .lyrics-container,
    .music-player.expanded .lyrics-lines {
        order: 3;
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
        margin-bottom: 25px;
        flex: 1;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .music-player.expanded .lyrics-lines {
        font-size: 14px;
        line-height: 1.9;
        padding: 15px 0;
        overflow-y: auto;
        max-height: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .music-player.expanded .lyrics-lines::-webkit-scrollbar {
        display: none;
    }

    .music-player.expanded .lyrics-line.active {
        font-size: 16px;
        font-weight: 600;
        padding-top: 8px;
    }

    .music-player.expanded .bottom-waveform {
        order: 4;
        margin-bottom: 15px;
    }

    .music-player.expanded .player-controls {
        order: 5;
        margin-bottom: 12px;
    }

    .music-player.expanded .track-time {
        order: 6;
    }

    .track-time {
        display: none;
    }

    .music-player.expanded .track-time {
        display: flex;
    }

    .bottom-bar {
        width: 1.5px;
    }

    .bottom-waveform {
        display: none;
    }

    .music-player.expanded .bottom-waveform {
        display: flex;
        height: 25px;
    }
}
