:root {
    /* Netease Inspired Palette */
    --primary-color: #ec4141; /* Netease Red */
    --primary-hover: #d73535;
    --secondary-color: #2b2b2b;
    --bg-color: #f6f6f6; /* Soft gray bg */
    --sidebar-bg: #f9f9f9;
    --card-bg: #ffffff;
    --text-main: #373737;
    --text-sub: #969696;
    --border-color: #e0e0e0;
    --player-bg: rgba(255, 255, 255, 0.95);
    --hover-bg: #f5f5f5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    --player-height: 4.5rem; /* 72px */
    --nav-height: 4rem; /* 64px */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 50%;
}

[data-theme="dark"] {
    --bg-color: #1e1e1e;
    --sidebar-bg: #2b2b2b;
    --card-bg: #2b2b2b;
    --text-main: #dcdcdc;
    --text-sub: #888888;
    --border-color: #3f3f3f;
    --player-bg: rgba(43, 43, 43, 0.95);
    --hover-bg: #363636;
    --shadow-sm: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.2);
    --shadow-md: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: clamp(14px, 0.5vw + 13px, 18px);
}

@media (max-width: 360px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.5;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    color: white;
    z-index: 100;
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: 0.03rem;
    transition: all 0.2s ease;
}

.logo:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 1.875rem;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn i {
    display: none; /* Hide icons by default on desktop if text is shown, or show both. Let's show both or just text. */
    font-size: 1.1rem;
}

.nav-btn:hover {
    color: white;
}

.nav-btn.active {
    color: white;
    font-weight: 700;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1.25rem;
    height: 0.1875rem;
    background: white;
    border-radius: 0.125rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 1.25rem;
    padding: 0.375rem 1rem;
    transition: background 0.2s;
}

.search-bar:focus-within {
    background: white;
}

.search-bar:focus-within input {
    color: #333;
}

.search-bar:focus-within button {
    color: #333;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    padding: 0 0.5rem;
    font-size: 0.85rem;
    width: 11.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-bar button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
}

.theme-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 0.5rem;
}

.theme-toggle:hover {
    color: white;
    transform: rotate(15deg);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: overlay; /* Standard scrollbar but overlay */
    padding: 1.5rem 2rem;
    padding-bottom: calc(var(--player-height) + 2rem);
    position: relative;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.main-content::-webkit-scrollbar {
    width: 0.5rem;
}
.main-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 0.25rem;
}
.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.view {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-width: 75rem;
    margin: 0 auto;
}

.view.active {
    display: block;
}

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

/* Platform Tabs */
.platform-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.875rem;
    justify-content: flex-start;
}

.platform-btn {
    padding: 0.375rem 1.125rem;
    border: none;
    background: transparent;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: 0.2s;
    position: relative;
}

.platform-btn:hover {
    color: var(--text-main);
}

.platform-btn.active {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
}

.platform-btn.active::after {
    content: '';
    position: absolute;
    bottom: -0.375rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 0.1875rem;
    background: var(--primary-color);
    border-radius: 0.125rem;
}

/* Toplist Categories Grid - Enhanced with Card Style & Circular Elements */
.toplist-categories {
    display: grid;
    /* PC: 4 columns, max width ~1200px, each card ~280px wide */
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Toplist Card - Card Style with Border & Padding */
.toplist-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px; /* 12px = 0.75rem, between 8-16px */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px; /* 16px内边距 */
    gap: 12px;
}

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

/* Cover Section - Circular Element for Icon/Album */
.toplist-card-cover {
    width: 100%;
    aspect-ratio: 16/9; /* Wider than square, like a banner */
    background: linear-gradient(135deg, #e66465, #9198e5);
    border-radius: 8px; /* Match card radius */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.toplist-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Circular Icon Element - 40px diameter (32-48px range) */
.toplist-card-cover i {
    font-size: 2.5rem; /* ~40px */
    opacity: 0.85;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

/* Circular Play Button - 36px diameter */
.toplist-card-cover::after {
    content: '\f04b'; /* Play Icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px; /* 32-48px range */
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(8px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toplist-card:hover .toplist-card-cover::after {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Card Title Section */
.toplist-name {
    font-size: 1rem; /* Slightly larger */
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

/* Additional info for card */
.toplist-card-info {
    font-size: 0.75rem;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mobile H5 Styles - Responsive */
@media (max-width: 768px) {
    .toplist-categories {
        /* Mobile: Full width, 2 columns or 1 column depending on screen */
        grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
        gap: 1rem;
        max-width: 100%;
    }

    .toplist-card {
        /* Height constraint for mobile */
        min-height: 180px;
        max-height: 200px;
        padding: 12px;
        gap: 8px;
    }

    .toplist-card-cover {
        aspect-ratio: 16/10;
    }

    .toplist-card-cover i {
        font-size: 2rem; /* ~32px */
        width: 32px;
        height: 32px;
    }

    .toplist-card-cover::after {
        width: 32px;
        height: 32px;
        right: 8px;
        bottom: 8px;
        font-size: 0.8rem;
    }

    .toplist-name {
        font-size: 0.9rem;
    }
}

/* Small Mobile (< 480px) - Single column for better readability */
@media (max-width: 480px) {
    .toplist-categories {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .toplist-card {
        flex-direction: row;
        align-items: center;
        min-height: 90px;
        max-height: 90px;
        padding: 10px;
        gap: 10px;
        border-radius: 8px;
    }

    .toplist-card-cover {
        width: 100px;
        height: 60px;
        aspect-ratio: 16/10;
        flex-shrink: 0;
        border-radius: 6px;
    }

    .toplist-card-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0; /* Fix text overflow */
    }

    .toplist-name {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .toplist-card-info {
        font-size: 0.7rem;
    }

    .toplist-card-cover::after {
        width: 28px;
        height: 28px;
        right: 6px;
        bottom: 6px;
        font-size: 0.75rem;
    }

    .toplist-card-cover i {
        font-size: 1.5rem;
        width: 28px;
        height: 28px;
    }
}

/* Song List */
.song-list-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.list-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.list-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.list-info p {
    color: var(--text-sub);
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

.back-btn {
    margin-right: 0.9375rem;
    border: none;
    background: none;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
    padding: 0.5rem; /* Better touch target */
}

.back-btn:hover {
    color: var(--text-main);
}

.song-list {
    display: flex;
    flex-direction: column;
}

.song-header-row {
    display: flex;
    padding: 0.625rem 1rem;
    color: var(--text-sub);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.song-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
}

.song-item:hover {
    background-color: var(--hover-bg);
}

.song-item.playing {
    background-color: var(--hover-bg);
}

.song-item.playing .song-title {
    color: var(--primary-color);
}

.song-index {
    width: 2.5rem;
    color: var(--text-sub);
    font-size: 0.9rem;
    text-align: center;
    margin-right: 0.625rem;
}

.song-cover {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.25rem;
    margin-right: 1rem;
    object-fit: cover;
    background: #eee;
}

.song-title-col {
    flex: 2;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 1.25rem;
}

.song-artist-col {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-actions-col {
    width: 6.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.song-item:hover .song-actions-col {
    opacity: 1;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-sub);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.action-btn:hover {
    color: var(--text-main);
    background: rgba(0,0,0,0.05);
}

/* Player Bar - Glassmorphism */
.player-bar {
    height: var(--player-height);
    background-color: var(--player-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 200;
    justify-content: space-between;
    box-shadow: 0 -0.125rem 0.625rem rgba(0,0,0,0.05);
}

/* Visualizer Canvas */
#visualizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.1;
    z-index: -1;
}

.song-info {
    display: flex;
    align-items: center;
    width: 18.75rem;
    position: relative;
    z-index: 2;
}

.player-cover {
    width: 3rem;
    height: 3rem;
    border-radius: 0.375rem;
    margin-right: 0.75rem;
    object-fit: cover;
    box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.1);
    transition: transform 0.5s;
}

.player-cover.rotating {
    animation: rotate 10s linear infinite;
    border-radius: 50%;
}

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

.info-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.info-text .song-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-text .artist-name {
    font-size: 0.8rem;
    color: var(--text-sub);
}

/* Controls */
.controls-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 31.25rem;
    gap: 0.375rem;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ctrl-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem; /* Touch target */
}

.ctrl-btn:hover {
    color: var(--primary-color);
}

.play-btn {
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 50%;
    background: var(--bg-color); /* Usually secondary */
    color: var(--text-main);
    font-size: 1.2rem;
    box-shadow: 0 0.125rem 0.375rem rgba(0,0,0,0.1);
}

.play-btn:hover {
    background: var(--bg-color);
    transform: scale(1.1);
    box-shadow: 0 0.25rem 0.625rem rgba(0,0,0,0.15);
}

.progress-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-sub);
    font-family: monospace;
}

.progress-bar-wrapper {
    flex: 1;
    height: 0.75rem; /* Hit area */
    display: flex;
    align-items: center;
    cursor: pointer;
    group: hover;
}

.progress-bar-bg {
    width: 100%;
    height: 0.25rem;
    background: var(--border-color);
    border-radius: 0.125rem;
    position: relative;
    overflow: visible;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 0.125rem;
    width: 0%;
    position: relative;
}

.progress-handle {
    position: absolute;
    right: -0.375rem;
    top: -0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.2);
}

.progress-bar-wrapper:hover .progress-handle {
    opacity: 1;
}

/* Volume & Extras */
.volume-container {
    width: 18.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.vol-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 6.25rem;
}

#volumeSlider {
    width: 100%;
    height: 0.25rem;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 0.125rem;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0.0625rem 0.1875rem rgba(0,0,0,0.3);
}

/* Download List */
.download-list {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 0;
    overflow: hidden;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.download-item:hover {
    background-color: var(--hover-bg);
}

.download-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.75rem;
    background: rgba(24, 144, 255, 0.1);
    color: #1890ff;
    font-weight: 500;
}

.download-status.success {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

/* Full Player Overlay */
.full-player {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1000;
    transition: top 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.full-player.active {
    top: 0;
}

.full-player-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.6);
    transform: scale(1.2);
    z-index: -1;
}

.full-player-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.full-player-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    color: white;
    height: 100%;
    max-width: 62.5rem;
    margin: 0 auto;
    width: 100%;
}

.full-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.75rem;
    margin-bottom: 1.25rem;
}

.icon-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.625rem;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: white;
}

.header-info {
    text-align: center;
    flex: 1;
    padding: 0 1.25rem;
}

.header-info .song-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-info .artist-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.full-player-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    min-height: 0; /* Important for flex child scrolling */
    margin-bottom: 1.25rem;
}

/* PC Layout: Side by Side */
.cover-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 50%;
}

.cover-wrapper {
    width: 18.75rem;
    height: 18.75rem;
    position: relative;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 1.25rem rgba(0,0,0,0.4);
}

.cover-wrapper::after {
    /* Disc effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(transparent 45%, rgba(0,0,0,0.8) 50%, transparent 55%);
    pointer-events: none;
}

.fp-cover {
    width: 12.5rem;
    height: 12.5rem;
    border-radius: 50%;
    object-fit: cover;
    animation: rotate 20s linear infinite;
    animation-play-state: paused;
}

.fp-cover.rotating {
    animation-play-state: running;
}

.lyric-section {
    flex: 1;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.lyric-container {
    width: 100%;
    text-align: center;
    overflow-y: auto;
    height: 25rem;
    scroll-behavior: smooth;
    padding: 50% 0; /* To allow scrolling top/bottom items to center */
}

/* Hide scrollbar for lyrics */
.lyric-container::-webkit-scrollbar {
    width: 0;
}

.lyric-line {
    padding: 0.625rem 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    min-height: 2.5rem; /* ensure height even if empty */
}

.lyric-line.active {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 0 0.625rem rgba(255, 255, 255, 0.3);
}

.full-player-footer {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
}

.progress-area {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.controls-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.fp-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fp-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

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

.play-btn-lg {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
}

.play-btn-lg:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.05);
}

/* --- Responsive & Breakpoints --- */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
        padding-bottom: calc(var(--player-height) + 1.5rem);
    }
    
    .toplist-categories {
        gap: 1rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        padding: 0 1rem;
        height: 3.5rem;
    }

    .logo span {
        font-size: 1.1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-btn {
        padding: 0.75rem; /* Better touch target */
    }

    .nav-btn span {
        display: none;
    }

    .nav-btn i {
        display: block;
        font-size: 1.25rem;
    }
    
    .nav-btn.active::after {
        display: none;
    }
    
    .nav-btn.active {
        color: white;
        background: rgba(255,255,255,0.1);
        border-radius: var(--radius-sm);
    }

    .search-bar {
        padding: 0.5rem 0.75rem;
    }

    .search-bar input {
        width: 6.25rem; /* Collapsed */
        transition: width 0.3s;
    }

    .search-bar input:focus {
        width: 10rem; /* Expanded */
    }

    /* Main Content */
    .main-content {
        padding: 1rem;
        padding-bottom: 6rem; /* Space for player bar */
    }

    /* Song List */
    .list-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .song-artist-col {
        display: none; /* Hide artist col on small screens to save space */
    }
    
    .song-title-col {
        padding-right: 0.5rem;
    }
    
    .song-actions-col {
        width: auto;
        opacity: 1; /* Always visible on touch */
    }

    .action-btn {
        padding: 0.5rem;
    }

    /* Player Bar */
    .player-bar {
        padding: 0 0.75rem;
        height: 4rem;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .song-info {
        width: auto;
        flex: 1;
        max-width: 65%;
    }
    
    .controls-container {
        flex: 0;
        width: auto;
    }
    
    .control-buttons {
        gap: 1rem;
    }
    
    /* Hide desktop controls on mobile */
    .progress-container, .volume-container, .ctrl-btn:not(.play-btn) {
        display: none;
    }
    
    /* Show play button only on mobile controls */
    .play-btn {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }

    /* Mobile Progress Bar at top of player bar */
    .player-bar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 2px;
        background: var(--primary-color);
        width: var(--progress-width, 0%);
        transition: width 0.1s linear;
        z-index: 201;
    }

    /* Full Player Mobile Layout */
    .full-player-content {
        padding: 1rem;
    }

    .full-player-body {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .cover-section {
        max-width: 100%;
        height: auto;
        flex: 0 0 auto;
    }
    
    .cover-wrapper {
        width: 15rem;
        height: 15rem;
    }
    
    .fp-cover {
        width: 10rem;
        height: 10rem;
    }
    
    .lyric-section {
        flex: 1;
        height: auto;
        width: 100%;
    }
    
    .lyric-container {
        height: 100%;
        padding: 30% 0;
    }
    
    .lyric-line {
        padding: 0.375rem 0;
        font-size: 0.95rem;
        min-height: 2rem;
    }
    
    .lyric-line.active {
        font-size: 1.1rem;
    }

    .controls-area {
        gap: 2rem;
    }
}

/* Small Mobile (< 375px) */
@media (max-width: 375px) {
    .nav-links {
        gap: 0.5rem;
    }
    
    .search-bar input {
        width: 4rem;
    }
    
    .search-bar input:focus {
        width: 8rem;
    }

    .song-info {
        max-width: 55%;
    }
    
    .cover-wrapper {
        width: 12.5rem;
        height: 12.5rem;
    }
    
    .fp-cover {
        width: 8rem;
        height: 8rem;
    }
}

/* --- Enhanced Full Player - NetEase Cloud Music Style --- */

/* Header Layout Enhancement */
.full-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    margin-bottom: 20px;
    gap: 20px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 100px;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

.header-info {
    flex: 1;
    text-align: center;
    padding: 0 20px;
}

/* Cover Wrapper - Vinyl Disc Effect */
.cover-wrapper {
    width: 200px;
    height: 200px;
    position: relative;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(0,0,0,0.5), 0 0 80px rgba(236, 65, 65, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.cover-wrapper::before {
    /* Vinyl disc effect */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    height: 95%;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.03) 0px,
        rgba(255, 255, 255, 0.03) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
}

.cover-wrapper::after {
    /* Center hole */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #000;
    border: 2px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.fp-cover {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    animation: rotate 20s linear infinite;
    animation-play-state: paused;
    z-index: 2;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.fp-cover.rotating {
    animation-play-state: running;
}

/* Enhanced Lyrics */
.lyric-section {
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.lyric-container {
    height: 300px;
    padding: 50% 0;
}

.lyric-line {
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 2.5rem;
    line-height: 1.4;
}

.lyric-line:hover {
    color: rgba(255, 255, 255, 0.6);
}

.lyric-line.active {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(236, 65, 65, 0.5);
    transform: scale(1.05);
}

/* Enhanced Footer */
.full-player-footer {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    padding: 20px;
}

/* Enhanced Controls */
.controls-area {
    gap: 30px;
}

.fp-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.fp-btn:hover {
    color: var(--primary-color);
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.1);
}

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

.play-btn-lg {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border: 2px solid white;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(236, 65, 65, 0.4);
}

.play-btn-lg:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(236, 65, 65, 0.6);
}

.play-btn-lg:active {
    transform: scale(1);
}

/* Song Info Modal - NetEase Style */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #2b2b2b;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1.3rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.info-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 500;
}

.info-value {
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* Enhanced Responsive - Full Player */
@media (max-width: 1024px) {
    .full-player-content {
        padding: 15px;
    }

    .full-player-body {
        flex-direction: column;
        gap: 20px;
    }

    .cover-section {
        max-width: 100%;
        flex: 0 0 auto;
    }

    .cover-wrapper {
        width: 280px;
        height: 280px;
    }

    .fp-cover {
        width: 180px;
        height: 180px;
    }

    .lyric-section {
        flex: 1;
        height: 200px;
    }

    .lyric-container {
        height: 200px;
    }

    .lyric-line.active {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .full-player-content {
        padding: 12px;
    }

    .full-player-header {
        height: 50px;
        margin-bottom: 12px;
    }

    .header-info .song-name {
        font-size: 1.1rem;
    }

    .header-info .artist-name {
        font-size: 0.8rem;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .full-player-body {
        flex-direction: column;
        gap: 15px;
        justify-content: center;
    }

    .cover-section {
        max-width: 100%;
        flex: 0 0 auto;
    }

    .cover-wrapper {
        width: 220px;
        height: 220px;
    }

    .fp-cover {
        width: 140px;
        height: 140px;
    }

    .lyric-section {
        height: 180px;
        flex: 1;
    }

    .lyric-container {
        height: 180px;
    }

    .lyric-line {
        padding: 8px 0;
        font-size: 0.9rem;
        min-height: 2rem;
    }

    .lyric-line.active {
        font-size: 1rem;
    }

    .full-player-footer {
        gap: 12px;
        padding: 12px;
    }

    .progress-area {
        gap: 8px;
        font-size: 0.75rem;
    }

    .controls-area {
        gap: 20px;
    }

    .fp-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .play-btn-lg {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .modal-content {
        width: 92%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cover-wrapper {
        width: 200px;
        height: 200px;
    }

    .fp-cover {
        width: 120px;
        height: 120px;
    }

    .lyric-container {
        height: 160px;
    }

    .header-left,
    .header-right {
        min-width: 80px;
        gap: 8px;
    }

    .header-info {
        padding: 0 10px;
    }
}
