/* =========================================================
   44100 曲库直下站 - 现代化暗色音频工坊主题样式 (style.css)
   ========================================================= */

:root {
    --bg-main: #0a0e17;
    --bg-card: rgba(18, 26, 43, 0.75);
    --bg-card-hover: rgba(28, 39, 64, 0.85);
    --bg-modal: rgba(15, 23, 42, 0.96);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(56, 189, 248, 0.4);
    
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.25);
    --accent-purple: #818cf8;
    --accent-pink: #f43f5e;
    --accent-green: #10b981;
    --accent-gold: #fbbf24;
    --accent-yellow: #f59e0b;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --font-family: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.2);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 110px;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glows */
.bg-glow {
    position: fixed;
    top: -150px;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-2 {
    position: fixed;
    top: 40%;
    right: 5%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.09) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

/* Container */
.app-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    position: relative;
    z-index: 1;
}

/* =========================================================
   Header Section & User Auth Bar
   ========================================================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 26px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Animated Sound Wave Logo */
.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0284c7, #6366f1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

.logo-icon .bar {
    width: 4px;
    background: #ffffff;
    border-radius: 2px;
    animation: soundWave 1.4s ease-in-out infinite alternate;
}

.logo-icon .bar-1 { height: 14px; animation-delay: 0.1s; }
.logo-icon .bar-2 { height: 26px; animation-delay: 0.3s; }
.logo-icon .bar-3 { height: 18px; animation-delay: 0.2s; }
.logo-icon .bar-4 { height: 12px; animation-delay: 0.4s; }

@keyframes soundWave {
    0% { transform: scaleY(0.4); }
    100% { transform: scaleY(1.1); }
}

.logo-text h1 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text h1 span {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text .subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-pill i {
    color: var(--primary);
}

.stat-pill b {
    color: #ffffff;
    font-weight: 700;
}

/* User Auth Bar */
.user-auth-bar {
    display: flex;
    align-items: center;
}

.btn-auth-action {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--primary);
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-auth-action:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(129, 140, 248, 0.3));
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.auth-logged-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 3px 8px 3px 4px;
    border-radius: var(--radius-full);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 4px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-purple), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.85rem;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.username-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.balance-label {
    font-size: 0.72rem;
    color: var(--accent-gold);
}

.balance-label b {
    font-weight: 700;
}

.btn-recharge-nav {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    transition: all 0.2s ease;
}

.btn-recharge-nav:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

.btn-logout-nav {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.btn-logout-nav:hover {
    color: var(--accent-pink);
}

.btn-sync {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-sync:hover {
    border-color: var(--primary);
    color: #ffffff;
}

.btn-sync.spinning #sync-icon {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* Sync Banner */
.sync-banner {
    display: none;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sync-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sync-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(56, 189, 248, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

.sync-desc strong {
    font-size: 0.9rem;
    color: var(--primary);
    display: block;
}

.sync-desc span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sync-progress-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.progress-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-purple));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.progress-percent {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 38px;
    text-align: right;
}

/* =========================================================
   Search & Controls Section
   ========================================================= */
.controls-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.search-box .search-icon {
    position: absolute;
    left: 18px;
    font-size: 1.1rem;
    color: var(--text-dim);
}

.search-box input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 52px;
    background: rgba(10, 14, 23, 0.8);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.98rem;
    font-family: inherit;
    transition: all 0.25s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.btn-clear {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.filter-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.filter-tab.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.15);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.select-wrapper select {
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

/* =========================================================
   Main Results Section
   ========================================================= */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 0 4px;
}

.results-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.results-count b {
    color: var(--primary);
}

.view-mode-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Songs Grid Layout */
.songs-container.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

/* Song Card */
.song-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.song-card.playing-card {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.song-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.card-top {
    margin-bottom: 14px;
}

.card-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.parent-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.files-count-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.song-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.45;
    word-break: break-all;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.type-tag {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.type-tag.wav { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.type-tag.mp3 { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.type-tag.acep { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.type-tag.bought { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
    margin-top: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

.card-size {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-card-action {
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-card-preview {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(56, 189, 248, 0.2));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.btn-card-preview:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(56, 189, 248, 0.35));
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.btn-card-preview.playing {
    background: linear-gradient(135deg, #10b981, #0284c7);
    color: #ffffff;
}

.btn-card-detail {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
}

.btn-card-detail:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Buy Button (1 Yuan) */
.btn-card-buy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-card-buy:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

/* Purchased Download Button */
.btn-card-download {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.btn-card-download:hover {
    background: linear-gradient(135deg, #38bdf8, #3b82f6);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

/* =========================================================
   Songs List View Layout
   ========================================================= */
.songs-container.view-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.songs-container.view-list .song-card {
    flex-direction: row;
    align-items: center;
    padding: 12px 20px;
}

.songs-container.view-list .card-top {
    margin-bottom: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.songs-container.view-list .song-title {
    font-size: 0.98rem;
    min-width: 250px;
    flex: 2;
}

.songs-container.view-list .card-bottom {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Skeleton Loading Cards */
.skeleton-card {
    height: 175px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonGlow 1.6s infinite;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

@keyframes skeletonGlow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin: 30px 0;
}

.empty-icon {
    font-size: 3.5rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 36px;
}

.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 6px;
}

.page-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.page-num.active {
    background: linear-gradient(135deg, #0284c7, #4f46e5);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

/* =========================================================
   Modals Common
   ========================================================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 760px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.modal-backdrop.open .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-badge {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-song-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.modal-song-path {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 4px;
    word-break: break-all;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-meta-row {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.modal-meta-row strong {
    color: #ffffff;
}

/* Need Buy Notice inside Modal */
.modal-need-buy-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.need-buy-icon {
    font-size: 1.8rem;
    color: var(--accent-gold);
}

.need-buy-info {
    flex: 1;
}

.need-buy-info h4 {
    font-size: 0.95rem;
    color: var(--accent-gold);
    margin-bottom: 4px;
}

.need-buy-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.btn-modal-buy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-modal-buy:hover {
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

.file-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    flex-wrap: wrap;
    gap: 10px;
}

.modal-actions-right {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    transition: all 0.2s ease;
}

.btn-copy-all {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.btn-download-all {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.file-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.file-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.file-icon-box.wav { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.file-icon-box.mp3 { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.file-icon-box.default { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.file-item-info {
    overflow: hidden;
}

.file-item-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-meta {
    font-size: 0.76rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.btn-file-down {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================================================
   Auth Modal (Login & Register)
   ========================================================= */
.auth-modal-card {
    max-width: 440px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
}

.auth-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-welcome-text {
    margin-bottom: 20px;
}

.auth-welcome-text h3 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 4px;
}

.auth-welcome-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.92rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.auth-error-msg {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #f43f5e;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    margin-bottom: 16px;
}

.btn-auth-submit {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #0284c7, #6366f1);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.btn-auth-submit:hover {
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
    transform: translateY(-1px);
}

/* =========================================================
   QR Code Recharge Modal
   ========================================================= */
.recharge-modal-card {
    max-width: 520px;
}

.recharge-current-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.recharge-current-box span {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.current-bal-val {
    font-size: 1.2rem;
    color: var(--accent-gold);
    font-weight: 800;
}

.recharge-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.amount-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.amount-btn:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.amount-btn.active {
    border-color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
    color: var(--accent-gold);
}

.amount-btn .badge-tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: var(--text-muted);
}

.amount-btn.active .badge-tag {
    background: rgba(245, 158, 11, 0.25);
    color: var(--accent-gold);
}

.custom-amount-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.custom-amount-row input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
}

.qr-code-wrapper {
    background: rgba(10, 14, 23, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-box {
    text-align: center;
}

.qr-code-img-box {
    width: 190px;
    height: 190px;
    margin: 0 auto 12px;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.qr-placeholder {
    width: 100%;
    height: 100%;
    background: #0f172a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.qr-brand-icon {
    position: absolute;
    font-size: 1.2rem;
}

.qr-brand-icon.wechat { top: 8px; left: 8px; color: #07c160; }
.qr-brand-icon.alipay { top: 8px; right: 8px; color: #1677ff; }

.qr-pay-amount {
    font-size: 1rem;
    color: #ffffff;
    display: block;
    margin-bottom: 4px;
}

.qr-pay-amount b {
    color: var(--accent-gold);
    font-size: 1.25rem;
}

.qr-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.recharge-actions {
    text-align: center;
}

.btn-confirm-pay {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
}

.btn-confirm-pay:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.recharge-subnote {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 8px;
}

/* =========================================================
   Bottom Audio Player Bar (Dual-Track Synchronized Mixer)
   ========================================================= */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
    z-index: 900;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-bar.active {
    transform: translateY(0);
}

.player-content {
    max-width: 1380px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 280px;
    overflow: hidden;
}

.player-cover {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-green), var(--primary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.player-info {
    overflow: hidden;
}

.player-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sync-indicator {
    font-size: 0.68rem;
    color: #34d399;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 1.4s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 6px #10b981; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.player-center {
    flex: 1;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.btn-play-action {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

.btn-play-action:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

.player-progress-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    min-width: 38px;
}

.progress-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary);
}

.player-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.track-mix-controls {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-md);
}

.track-mix-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-track-mute {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-track-mute.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--primary);
}

.btn-track-mute.muted {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.4);
    color: #f43f5e;
    text-decoration: line-through;
}

.mini-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.mini-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
}

.volume-box {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.btn-player-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
}

.btn-player-close:hover {
    color: #ffffff;
}

/* =========================================================
   Toast Notifications
   ========================================================= */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-highlight);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-stats {
        width: 100%;
        justify-content: space-between;
    }
    .player-left {
        width: auto;
        max-width: 180px;
    }
    .volume-box {
        display: none;
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 14px 12px 110px;
    }
    .songs-container.view-grid {
        grid-template-columns: 1fr;
    }
    .player-content {
        flex-direction: column;
        gap: 10px;
    }
    .player-left {
        max-width: 100%;
        width: 100%;
    }
    .player-center {
        width: 100%;
    }
    .player-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* Admin Button Styling in Header */
.btn-admin-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.btn-admin-nav:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));
    color: #ffffff;
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

