/* 全局变量与设计系统 */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --bg-color: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; position: relative; overflow-x: hidden; min-height: 100vh; }

/* 动态背景修饰 */
.bg-glow { position: fixed; border-radius: 50%; filter: blur(80px); z-index: -1; opacity: 0.4; }
.glow-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: #c7d2fe; }
.glow-2 { bottom: -10%; right: -10%; width: 600px; height: 600px; background: #e9d5ff; }

/* 通用布局与组件 */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; }
.text-center { text-align: center; } .text-muted { color: var(--text-muted); } .text-sm { font-size: 0.875rem; }
.flex-gap { display: flex; gap: 10px; } .flex-1 { flex: 1; } .w-100 { width: 100%; }

/* 玻璃拟态卡片 */
.glass-panel { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); padding: 30px; margin-bottom: 24px; }

/* 头部导航 */
header { padding: 20px 0; position: sticky; top: 0; z-index: 100; background: rgba(248, 250, 252, 0.7); backdrop-filter: blur(10px); }
.header-content { display: flex; justify-content: center; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 10px; color: var(--primary); }
.logo-icon { width: 32px; height: 32px; }
.logo-text { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Hero Section */
.hero-section { text-align: center; padding: 50px 30px; position: relative; z-index: 30; }
.hero-text h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 10px; color: #0f172a; }
.hero-text p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; }

/* Tabs 切换栏 */
.parse-tabs { display: inline-flex; background: #e2e8f0; padding: 6px; border-radius: 40px; margin-bottom: 30px; }
.tab-item { padding: 10px 24px; border-radius: 30px; font-weight: 600; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.tab-item.active { background: white; color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

/* 搜索控制台 */
.search-console { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 50; }
.search-input-wrap { position: relative; width: 100%; }
.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: #94a3b8; }
.search-input { width: 100%; padding: 20px 20px 20px 55px; border-radius: 20px; border: 2px solid white; background: white; font-size: 1.1rem; box-shadow: 0 10px 25px rgba(0,0,0,0.05); outline: none; transition: var(--transition); }
.search-input:focus { border-color: var(--primary); box-shadow: 0 10px 25px rgba(99, 102, 241, 0.15); }
.controls-wrap { display: flex; gap: 15px; }

/* 自定义下拉框 */
.select-container { flex: 1; position: relative; }
.select-display { display: flex; justify-content: space-between; align-items: center; background: white; border: 2px solid transparent; padding: 0 20px; height: 56px; border-radius: 16px; font-weight: 500; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: var(--transition); }
.select-display:hover { border-color: #e2e8f0; }
.select-options { position: absolute; top: calc(100% + 10px); left: 0; width: 100%; background: #ffffff; border: 1px solid #f1f5f9; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); z-index: 9999; display: none; overflow: hidden; }
.select-option { padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 500; transition: var(--transition); border-bottom: 1px solid #f8fafc; }
.select-option:last-child { border-bottom: none; }
.select-option:hover { background: #f8fafc; color: var(--primary); }
.select-option.active { background: #eef2ff; color: var(--primary); }

/* 按钮通用 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 24px; height: 56px; border-radius: 16px; font-weight: 600; font-size: 1rem; cursor: pointer; border: none; transition: var(--transition); }
.btn-lg { height: 60px; font-size: 1.1rem; }
.btn-gradient { background: var(--gradient-main); color: white; flex: 1; max-width: 200px; box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3); }
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4); }
.btn-gradient-success { background: var(--gradient-success); color: white; box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3); }
.btn-gradient-success:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(16, 185, 129, 0.4); }
.btn-secondary { background: #f1f5f9; color: var(--text-main); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-text-back { background: none; border: none; color: var(--primary); font-weight: 600; display: flex; align-items: center; gap: 5px; cursor: pointer; margin-bottom: 20px; font-size: 1rem; }
.btn-text-back:hover { text-decoration: underline; }

/* 徽章 */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-recommend { background: #fef3c7; color: #d97706; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-downloading { background: #dbeafe; color: #1d4ed8; }
.badge-failed { background: #fee2e2; color: #b91c1c; }

/* 结果区与页脚 */
.result-section { animation: fadeIn 0.4s ease-out forwards; position: relative; z-index: 20; }
.footer-section { padding: 30px; text-align: center; position: relative; z-index: 10; }

/* 现代歌曲列表 */
.playlist-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 2px dashed #e2e8f0; }
.playlist-info h3 { font-size: 1.5rem; color: #0f172a; }
.modern-list { display: flex; flex-direction: column; gap: 12px; }
.song-item { display: flex; align-items: center; background: white; padding: 12px 20px; border-radius: 16px; transition: var(--transition); border: 1px solid #f1f5f9; }
.song-item:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.06); transform: scale(1.01); border-color: #e2e8f0; }
.song-index { width: 40px; font-weight: 700; color: #cbd5e1; font-size: 1.2rem; }
.song-cover { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.song-info { flex: 1; padding: 0 20px; display: flex; flex-direction: column; justify-content: center; }
.song-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.song-title-row strong { font-size: 1.1rem; color: #1e293b; }
.song-artist-row { font-size: 0.9rem; color: var(--text-muted); }
.song-actions .parse-song-btn { height: 40px; padding: 0 20px; border-radius: 20px; font-size: 0.9rem; background: #eef2ff; color: var(--primary); border: none; font-weight: 600; cursor: pointer; transition: var(--transition); }
.song-actions .parse-song-btn:hover { background: var(--primary); color: white; }

/* 单曲解析详情页 (增加了播放器区域) */
.single-card-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 768px) { .single-card-inner { grid-template-columns: 1fr; } .controls-wrap { flex-direction: column; } .btn-gradient { max-width: 100%; } }
.single-main-info { background: white; padding: 30px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.song-title { font-size: 2rem; font-weight: 800; color: #0f172a; margin-bottom: 8px; line-height: 1.2; }
.song-artist { font-size: 1.2rem; color: var(--primary); font-weight: 500; }
.tags-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.info-tag { background: #f8fafc; padding: 12px 16px; border-radius: 12px; display: flex; flex-direction: column; border: 1px solid #f1f5f9; }
.tag-label { font-size: 0.8rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.tag-value { font-weight: 600; color: #334155; font-size: 1rem; }

/* APlayer 播放器美化 */
.aplayer-wrapper { background: white; padding: 20px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.aplayer { border-radius: 16px !important; box-shadow: none !important; border: 1px solid #f1f5f9; margin: 0 !important; }
.aplayer .aplayer-info { padding: 14px 15px 14px 15px !important; }

/* 进度条 */
.song-progress { width: 100%; display: none; }
.progress-bar-container { height: 8px; background-color: #e2e8f0; border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--gradient-success); transition: width 0.3s ease; }

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

/* 模态框 */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(5px); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.modal-content { position: relative; max-width: 90vw; max-height: 90vh; }
.modal-content img { max-width: 100%; max-height: 90vh; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.modal-close { position: absolute; top: -40px; right: -40px; background: none; border: none; color: white; font-size: 40px; cursor: pointer; }

/* 【回归】原版优雅的 Toast 提示框样式 */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { padding: 12px 24px; border-radius: 12px; color: white; box-shadow: 0 10px 30px rgba(0,0,0,0.15); opacity: 0; transform: translateY(-20px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-weight: 500; text-align: center; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--gradient-success); }
.toast.error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.toast.warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.toast.info { background: var(--gradient-main); }

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