/* ========================================
   飞龙音乐 - 公共样式表
   深色主题（仿QQ音乐风格）
   ======================================== */

/* CSS 变量定义 */
:root {
    /* 背景色 */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --bg-card: #1e2a4a;
    --bg-hover: #253352;

    /* 强调色 */
    --color-primary: #31c27c;
    --color-primary-hover: #2aad6b;
    --color-primary-light: rgba(49, 194, 124, 0.15);
    --color-accent: #ff9800;
    --color-danger: #ff4444;
    --color-warning: #ffaa00;

    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6a6a8a;
    --text-link: #31c27c;

    /* 边框 */
    --border-color: #2a2a4a;
    --border-light: #3a3a5a;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 50px;

    /* 导航栏高度 */
    --navbar-height: 64px;
    --player-height: 72px;

    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 全局重置 */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

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

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(22, 33, 62, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
    transition: background var(--transition-normal);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.navbar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), #1a9f5c);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.navbar-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.navbar-logo .logo-text span {
    color: var(--color-primary);
}

/* 搜索框区域 */
.navbar-search {
    flex: 1;
    max-width: 560px;
    margin: 0 32px;
    display: flex;
    align-items: center;
}

.search-box {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 44px 0 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.search-box .search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: background var(--transition-fast);
}

.search-box .search-btn:hover {
    background: var(--color-primary-hover);
}

/* 音乐源切换 */
.source-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.source-btn {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-size: 13px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.source-btn:hover {
    border-color: var(--color-primary);
    color: var(--text-primary);
}

.source-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 500;
}

/* 用户区域 */
.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 16px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.user-avatar:hover {
    border-color: var(--color-primary);
}

.user-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.user-nav-link:hover {
    opacity: 0.8;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1001;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a,
.user-dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.user-dropdown-menu .divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

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

.btn-login-nav,
.btn-register-nav {
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-login-nav {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-login-nav:hover {
    border-color: var(--color-primary);
    color: var(--text-primary);
}

.btn-register-nav {
    background: var(--color-primary);
    color: #fff;
}

.btn-register-nav:hover {
    background: var(--color-primary-hover);
}

/* ========================================
   主体区域
   ======================================== */
.main-content {
    padding-top: calc(var(--navbar-height) + 24px);
    padding-bottom: calc(var(--player-height) + 24px);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 搜索结果区域 */
.search-section {
    padding: 20px 0;
}

.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.search-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.search-header .result-count {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   卡片网格布局
   ======================================== */
.music-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.music-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

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

.music-card .card-cover {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.music-card .card-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.music-card .card-cover .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.music-card:hover .card-cover .play-overlay {
    opacity: 1;
}

.play-overlay .play-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(49, 194, 124, 0.4);
}

.music-card .card-source {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    backdrop-filter: blur(4px);
}

.source-netease { background: rgba(197, 72, 72, 0.85); }
.source-qq { background: rgba(49, 194, 124, 0.85); }
.source-kuwo { background: rgba(255, 152, 0, 0.85); }
.source-migu { background: rgba(66, 133, 244, 0.85); }

.music-card .card-info {
    padding: 12px;
}

.music-card .card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.music-card .card-artist {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   模态框
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal-content {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
}

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

/* 模态框头部 */
.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 16px;
    flex-shrink: 0;
}

.modal-back-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.modal-back-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

.modal-song-info .modal-cover {
    display: none;
}

.modal-song-info .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-song-info .modal-artist {
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 模态框封面 */
.modal-cover-area {
    width: 100%;
    max-height: 280px;
    overflow: hidden;
    flex-shrink: 0;
}

.modal-cover-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 模态框播放控制 */
.modal-player {
    padding: 16px 20px;
    flex-shrink: 0;
}

/* 进度条 */
.progress-wrapper {
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height var(--transition-fast);
}

.progress-bar:hover {
    height: 6px;
}

.progress-bar .progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.progress-bar .progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.progress-bar:hover .progress-fill::after {
    opacity: 1;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

/* 播放控制按钮 */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.ctrl-btn {
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

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

.ctrl-btn.play-pause-btn {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(49, 194, 124, 0.3);
}

.ctrl-btn.play-pause-btn:hover {
    background: var(--color-primary-hover);
    color: #fff;
    transform: scale(1.05);
}

/* 模态框歌词区域 */
.modal-lyrics {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 20px;
    min-height: 200px;
}

.lyrics-container {
    text-align: center;
    padding: 20px 0;
}

.lyric-line {
    padding: 8px 16px;
    font-size: 15px;
    color: var(--text-muted);
    transition: all var(--transition-normal);
    line-height: 1.8;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.lyric-line:hover {
    color: var(--text-secondary);
}

.lyric-line.active {
    color: var(--color-accent);
    font-size: 16px;
    font-weight: 500;
    transform: scale(1.02);
}

.lyric-line.empty {
    color: transparent;
    pointer-events: none;
}

.lyrics-placeholder {
    color: var(--text-muted);
    font-size: 14px;
    padding: 40px 0;
}

/* ========================================
   底部播放器
   ======================================== */
.bottom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.bottom-player.show {
    transform: translateY(0);
}

/* 顶部细线进度条 */
.bottom-player-progress {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.bottom-player-progress-fill {
    height: 100%;
    background: var(--color-primary);
    width: 0%;
    transition: width 0.1s linear;
}

.bottom-player-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 16px;
}

.player-song-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.player-song-info .player-cover {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

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

.player-song-info .player-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-song-info .player-artist {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 12px;
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(49, 194, 124, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #e63e3e;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ========================================
   表单样式
   ======================================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* ========================================
   提示消息（Toast）
   ======================================== */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: #fff;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s ease forwards;
    pointer-events: auto;
    max-width: 400px;
    text-align: center;
}

.toast.toast-success {
    background: var(--color-primary);
}

.toast.toast-error {
    background: var(--color-danger);
}

.toast.toast-warning {
    background: var(--color-warning);
    color: #333;
}

.toast.toast-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

/* ========================================
   加载动画
   ======================================== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state .empty-text {
    font-size: 16px;
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

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

.fade-in { animation: fadeIn 0.5s ease; }
.fade-in-up { animation: fadeInUp 0.5s ease; }
.fade-in-down { animation: fadeInDown 0.5s ease; }
.slide-up { animation: slideUp 0.5s ease; }
.scale-in { animation: scaleIn 0.3s ease; }

/* 卡片逐个出现动画 */
.music-card {
    animation: fadeInUp 0.4s ease backwards;
}

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

/* ========================================
   响应式媒体查询
   ======================================== */

/* 平板（<=1024px） */
@media (max-width: 1024px) {
    .music-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .navbar-search {
        max-width: 400px;
        margin: 0 20px;
    }
}

/* 小平板（<=768px） */
@media (max-width: 768px) {
    :root {
        --navbar-height: 56px;
        --player-height: 64px;
    }

    .navbar {
        padding: 0 12px;
    }

    .navbar-inner {
        flex-wrap: nowrap;
    }

    .navbar-logo .logo-text {
        font-size: 16px;
    }

    .navbar-logo .logo-text span {
        display: none; /* 移动端隐藏"音乐"，只显示"飞龙" */
    }

    .navbar-search {
        max-width: 140px;
        margin: 0 8px;
        flex: 0 0 auto;
    }

    .source-switcher {
        gap: 3px;
        flex-shrink: 1;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .source-switcher::-webkit-scrollbar {
        display: none;
    }

    .source-btn {
        padding: 3px 6px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .navbar-user {
        margin-left: 6px;
        flex-shrink: 0;
    }

    .user-nav-link span {
        display: none; /* 移动端隐藏用户名 */
    }

    .nav-auth-btns {
        gap: 4px;
    }

    .btn-login-nav,
    .btn-register-nav {
        padding: 4px 8px;
        font-size: 11px;
    }

    .search-box input {
        padding: 0 36px 0 12px;
        font-size: 13px;
    }

    .music-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .music-card {
        display: flex;
        align-items: center;
    }

    .music-card .card-cover {
        position: relative;
        width: 64px;
        height: 64px;
        min-width: 64px;
        padding-top: 0;
        border-radius: var(--radius-md);
        overflow: hidden;
    }

    .music-card .card-cover img {
        position: relative;
        width: 100%;
        height: 100%;
    }

    .music-card .card-cover .play-overlay {
        opacity: 0;
    }

    .music-card .card-cover .card-source {
        display: none;
    }

    .music-card .card-info {
        flex: 1;
        min-width: 0;
        padding: 8px 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .music-card .card-title {
        font-size: 15px;
        margin-bottom: 2px;
    }

    .music-card .card-artist {
        font-size: 13px;
    }

    .container {
        padding: 0 16px;
    }

    .main-content {
        padding-top: calc(var(--navbar-height) + 16px);
        padding-bottom: calc(var(--player-height) + 16px);
    }

    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-cover-area {
        max-height: 180px;
    }

    .bottom-player {
        padding: 0;
    }

    .bottom-player-inner {
        padding: 6px 12px;
    }

    .player-song-info .player-cover {
        width: 36px;
        height: 36px;
    }

    .player-song-info .player-title {
        max-width: 160px;
        font-size: 13px;
    }

    .player-song-info .player-artist {
        font-size: 11px;
    }

    .player-actions {
        margin-left: 8px;
    }

    .player-actions .play-pause-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .toast {
        max-width: calc(100vw - 32px);
    }
}

/* 手机（<=480px） */
@media (max-width: 480px) {
    .navbar-logo .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .navbar-logo .logo-text {
        font-size: 15px;
    }

    .source-btn {
        padding: 3px 6px;
        font-size: 11px;
    }

    .search-box input {
        height: 36px;
        font-size: 13px;
    }

    .search-box .search-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-cover-area {
        max-height: 160px;
    }

    .modal-lyrics {
        padding: 8px 16px 16px;
    }

    .lyric-line {
        font-size: 14px;
        padding: 6px 12px;
    }

    .player-controls {
        gap: 16px;
    }

    .ctrl-btn.play-pause-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* ========================================
   工具类
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--color-primary); }
.text-danger { color: var(--color-danger); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
