/* Invisible auto-gesture overlay to unlock audio on load */
#autoStartOverlay{
	position:fixed;
	left:0;
	top:0;
	width:1px;
	height:1px;
	opacity:0;
	background:transparent;
	z-index:999999;
	pointer-events:auto;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    background-attachment: scroll;
    min-height: 100vh;
    color: #fff;
    width: 390px;
    height: 844px;
    margin: 0 auto;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: background 0.5s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Universal rule: All white text automatically gets shadow */
* {
    text-shadow: inherit;
}

/* Automatic shadow for all elements with white color in CSS */
.card-title,
.song-title,
.song-artist,
.nav-btn,
.dock-label,
.dock-cover-letter,
.np-title,
.np-artist,
.song-status,
.explicit,
.section-title,
.radio-logo,
.radio-label-abs,
.radio-large-img,
.profile-pic {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Ensure inline styles with white color also get shadow */
[style*="color: #fff"],
[style*="color: white"],
[style*="color:#fff"],
[style*="color:white"] {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Glassmorphic overlay effect - matching liquid glass.html */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    pointer-events: none;
    z-index: 0;
    /* Exclude dock area to prevent flickering */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 120px), 0 calc(100% - 120px));
}

/* Additional glassmorphic layer for depth */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px),
        repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    /* Exclude dock area to prevent flickering */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 120px), 0 calc(100% - 120px));
}

body > * {
    position: relative;
    z-index: 1;
}

/* iPhone 13 Pro Aspect Ratio Indicator */
.aspect-ratio-line {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 390px;
    height: 844px;
    border: 1px solid red;
    z-index: 9999;
    pointer-events: none;
    box-sizing: border-box;
}

/* Page Views */
.page-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.page-view.hidden {
    display: none;
}

/* Main Page */
.main-page-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 120px;
    -webkit-overflow-scrolling: touch;
}

/* Home Feed (TikTok-style) */
.home-feed {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overscroll-behavior: contain;
}
.feed-slide {
    position: relative;
    width: 100%;
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
}
.np-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}
.np-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.np-letter { font-size: 180px; font-weight: 900; line-height: 1; opacity: 0.9; transition: opacity 1s ease; }
.np-meta { display: flex; flex-direction: column; gap: 6px; }
.np-title { font-size: 28px; font-weight: 800; transition: opacity 1s ease; }
.np-artist { font-size: 16px; opacity: 0.9; transition: opacity 1s ease; }
.np-center.fade-out .np-letter,
.np-center.fade-out .np-title,
.np-center.fade-out .np-artist {
    opacity: 0;
}
.np-lyrics {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Lyrics Container - Matches template exactly */
.lyrics-container {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    text-align: center;
    z-index: 10;
}

/* Lyric Line Styles - Template Approach */
.lyric-line {
    position: absolute;
    width: 100%;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lyric-line.fade-out {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
}

.lyric-line.fade-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Faster animation for initial appearance only */
.lyric-line.fade-in-initial {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lyric-text {
    font-size: 28px;
    font-weight: 700;
    font-style: italic;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5),
                 0 0 30px rgba(255, 255, 255, 0.3);
    line-height: 1.4;
    letter-spacing: 0.5px;
    word-wrap: break-word;
}

/* Responsive font size for mobile */
@media (max-width: 480px) {
    .lyric-text {
        font-size: 24px;
    }
}
.np-hint { position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%); font-size: 12px; opacity: 0.85; z-index: 1; }
.np-cta { position: absolute; bottom: 140px; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: 20px; border: none; background: rgba(255,255,255,0.2); color: #fff; font-weight: 700; cursor: pointer; z-index: 1; }
.np-cta.hidden { display: none; }


/* Header */
.header {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
    padding-top: 20px;
}

.profile-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.profile-btn:active {
    transform: scale(0.95);
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

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

.nav-buttons {
    display: flex;
    gap: 8px;
    flex: 1;
}

.nav-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn.active {
    background: #1db954;
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Main Content */
.main-content {
    padding: 0 16px 24px;
    overflow-y: auto;
    height: calc(844px - 76px - 100px);
    padding-bottom: 120px;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease backwards;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

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

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

.card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.2);
}

.card:active {
    transform: scale(0.98);
}

.liked-songs {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.liked-heart {
    font-size: 32px;
    margin-bottom: 8px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.artist-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 80px;
}

.artist-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
    animation: rotate 10s linear infinite;
}

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

.playlist-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 80px;
}

.playlist-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.mini-img {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border-radius: 2px;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 80px;
}

.radio-image {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.radio-label {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 8px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 4px;
    border-radius: 2px;
}

.radio-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

/* Section Title */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 24px 0 16px;
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Song List */
.song-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease backwards;
}

.song-item:nth-child(1) { animation-delay: 0.1s; }
.song-item:nth-child(2) { animation-delay: 0.2s; }
.song-item:nth-child(3) { animation-delay: 0.3s; }

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

.song-item:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(4px);
}

.song-item:active {
    transform: scale(0.98);
}

.song-art {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.equalizer-icon {
    font-size: 16px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

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

.song-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.song-title {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-title.playing {
    color: #1db954;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px rgba(29, 185, 84, 0.5); }
    50% { text-shadow: 0 0 10px rgba(29, 185, 84, 0.8); }
}

.explicit {
    font-size: 10px;
    background: #333;
    color: #fff;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
}

.song-artist {
    font-size: 14px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-status {
    color: #1db954;
    font-size: 18px;
    font-weight: bold;
}

.song-options {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s ease;
}

.song-options:active {
    transform: rotate(90deg);
}

/* Jump Back In - Radio Scroll */
.radio-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    animation: fadeIn 0.5s ease;
}

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

.radio-scroll-card {
    flex-shrink: 0;
    width: 280px;
    height: 160px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

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

.radio-scroll-card:active {
    transform: scale(0.98);
}

.radio-gradient {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gradientShift 3s ease infinite;
}

.grad1 {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.grad2 {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}

.grad3 {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(10deg); }
}

.radio-logo {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.radio-label-abs {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
}

.radio-large-img {
    font-size: 64px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Dock */
.dock {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    padding: 12px 0 20px;
    isolation: isolate;
    will-change: transform;
}

.dock-arrow {
    position: absolute;
    right: calc(50% + 40px);
    bottom: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    opacity: 0.8;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    animation: arrowBounce 2s ease-in-out infinite;
    transform: translateX(-192%);
    isolation: isolate;
}

.dock-arrow:hover {
    opacity: 1;
    transform: translateX(-192%) translateY(-4px);
}

.dock-arrow:active {
    transform: translateX(-192%) translateY(-2px) scale(0.95);
}

.dock.expanded .dock-arrow {
    transform: translateX(-192%) rotate(180deg);
    animation: none;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(-192%) translateY(0);
    }
    50% {
        transform: translateX(-192%) translateY(-6px);
    }
}

.dock-content {
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: all 0.3s ease;
}

.dock.expanded .dock-content {
    opacity: 1;
    transform: translateY(-75%) scale(1);
    pointer-events: auto;
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    animation: dockItemAppear 0.4s ease backwards;
}

.dock-item:nth-child(1) { animation-delay: 0.1s; }
.dock-item:nth-child(2) { animation-delay: 0.2s; }
.dock-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes dockItemAppear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dock-item:hover {
    transform: translateY(-4px) scale(1.1);
}

.dock-item:active {
    transform: translateY(-2px) scale(0.95);
}

.dock-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* Ensure inline SVG icons render white with a subtle shadow */
.dock-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
    fill: #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.dock-item:hover .dock-icon {
    background: rgba(29, 185, 84, 0.3);
    transform: scale(1.1);
}

.dock-label {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.dock-now-playing-area {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    outline: none;
    isolation: isolate;
    max-width: 358px;
}

.dock-now-playing-area:focus {
    outline: none;
}

.dock-now-playing-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    border: none;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: -1;
    isolation: isolate;
}

.dock-now-playing-area:hover .dock-now-playing-bg {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

.dock-now-playing-area:active {
    transform: translateX(-50%) scale(0.98);
}

.dock-artist-name {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dock-artist-name:not(:empty) {
    opacity: 1;
    transform: translateX(0);
}

.dock-song-title {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dock-song-title:not(:empty) {
    opacity: 1;
    transform: translateX(0);
}

.dock-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1002;
    flex-shrink: 0;
    overflow: hidden;
}

.dock-artist-pfp {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
    transform-origin: center center;
}

.dock-artist-pfp.visible {
    opacity: 1;
}

.dock-toggle.playing .dock-artist-pfp.visible {
    opacity: 1;
    filter: none;
}

.dock-toggle.paused .dock-artist-pfp.visible {
    opacity: 1;
    filter: grayscale(100%);
}

/* Hide letter when profile picture is visible */
.dock-artist-pfp.visible ~ .dock-cover-letter {
    opacity: 0;
    pointer-events: none;
}

.dock-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

.dock-toggle:active {
    transform: scale(0.95);
}

.dock-toggle.spinning {
    animation: buttonSpin 0.4s ease;
}

/* Expanded: keep green highlight only (no rotation) */
.dock.expanded .dock-toggle {
    background: linear-gradient(135deg, #1db954 0%, #1ed760 100%);
}

/* When dock is expanded AND spinning, use normal spin */
.dock.expanded .dock-toggle.spinning {
    animation: buttonSpin 0.4s ease;
}

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

@keyframes buttonSpinExpanded {
    from {
        transform: rotate(180deg);
    }
    to {
        transform: rotate(540deg);
    }
}

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

/* Playing state - normal colors */
.dock-toggle.playing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.dock-toggle.playing:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* Paused state - black and white */
.dock-toggle.paused {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: none;
    filter: grayscale(100%);
}

.dock-toggle.paused:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}

.dock-cover-letter {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    animation: letterPulse 2s ease-in-out infinite;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

/* Playing state - normal white letter */
.dock-toggle.playing .dock-cover-letter {
    color: #fff;
    filter: none;
}

/* Paused state - black and white letter */
.dock-toggle.paused .dock-cover-letter {
    color: #fff;
    filter: grayscale(100%) brightness(1.2);
}

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

.dock.expanded .dock-cover-letter {
    animation: letterSpin 0.4s ease;
}

@keyframes letterSpin {
    from {
        transform: rotate(0deg) scale(1);
    }
    to {
        transform: rotate(360deg) scale(1);
    }
}

.dock-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.play-icon,
.pause-icon {
    font-size: 24px;
    color: #fff;
    position: absolute;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: bold;
}

.play-icon.active,
.pause-icon.active {
    opacity: 1;
    transform: scale(1);
}

.dock-toggle.playing .dock-cover-letter {
    opacity: 0.3;
    transform: scale(0.7);
}

.dock-toggle.playing .pause-icon {
    opacity: 1;
    transform: scale(1);
    color: #fff;
}

.dock-toggle.paused .dock-cover-letter {
    opacity: 0.3;
    transform: scale(0.7);
    color: #fff;
    filter: grayscale(100%) brightness(1.2);
}

.dock-toggle.paused .play-icon {
    opacity: 1;
    transform: scale(1);
    color: #fff;
}

.dock-toggle:not(.playing):not(.paused) .dock-cover-letter {
    opacity: 1;
    transform: scale(1);
    color: #fff;
    filter: none;
}

/* Scrollbar Styling */
.radio-scroll::-webkit-scrollbar {
    height: 4px;
}

.radio-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.radio-scroll::-webkit-scrollbar-thumb {
    background: #1db954;
    border-radius: 2px;
}

.main-content::-webkit-scrollbar {
    width: 4px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: #1db954;
    border-radius: 2px;
}

/* Song Playing Page */
.song-playing-content {
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Search Page and Playlist Page - Background GIF and Glassmorphic Overlay */
#searchPage,
#playlistPage {
    position: relative;
    overflow: hidden;
}

#searchPage::before,
#playlistPage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

#searchPage .page-gif-bg,
#playlistPage .page-gif-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

#searchPage .page-glassmorphic-overlay,
#playlistPage .page-glassmorphic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1;
    pointer-events: none;
    isolation: isolate;
    will-change: transform;
    /* Ensure it doesn't interfere with dock */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 120px), 0 calc(100% - 120px));
}

#searchPage > *,
#playlistPage > * {
    position: relative;
    z-index: 2;
}

/* Playlist Page */
.playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 12px;
}
.ph-left { display: flex; align-items: center; gap: 12px; }
.ph-title { font-size: 28px; font-weight: 800; }
.ph-actions { display: flex; gap: 8px; }
.ph-icon-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; cursor: pointer; transition: transform 0.2s ease;
}
.ph-icon-btn:active { transform: scale(0.95); }
.ph-icon-btn svg { width: 22px; height: 22px; fill: currentColor; }

.playlist-chips { display: flex; gap: 8px; padding: 0 16px; }
.chip {
    padding: 8px 16px; border-radius: 20px; border: none; cursor: pointer;
    background: #1a1a1a; color: #fff; font-size: 14px; font-weight: 600;
}
.chip.active { background: #1db954; }

.playlist-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.toolbar-btn { background: transparent; border: none; color: #fff; font-weight: 600; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.toolbar-icon { opacity: 0.9; }
.spacer { flex: 1; }

.playlist-content { padding: 0 16px 100px; overflow-y: auto; height: calc(844px - 56px - 48px - 48px - 100px); }

/* Grid mode */
.playlist-content.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.playlist-content.grid .song-item { flex-direction: column; align-items: flex-start; }
.playlist-content.grid .song-art { width: 72px; height: 72px; }
.playlist-content.grid .song-info { width: 100%; }

.song-playing-header {
    padding: 16px 0;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.back-btn:active {
    transform: scale(0.95);
}

.song-playing-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 40px 0;
}

.song-playing-art {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.6s ease;
}

.song-playing-letter {
    font-size: 120px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.song-playing-info {
    text-align: center;
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

.song-playing-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.song-playing-artist {
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

