/* ============================================================
   ChordLoop - 全局样式
   ============================================================ */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-input: #0d1b2a;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6c6c80;
    --accent-primary: #6c5ce7;
    --accent-secondary: #a29bfe;
    --accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe, #fd79a8);
    --accent-gradient-2: linear-gradient(135deg, #00cec9, #6c5ce7);
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(108,92,231,0.4);
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 20px rgba(108,92,231,0.3);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 20%, rgba(108,92,231,0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(253,121,168,0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0,206,201,0.04) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

a { color: var(--accent-secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-primary); }

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15,15,26,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}
.logo-icon { font-size: 24px; }
.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-menu { display: flex; gap: 8px; }
.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-user { display: flex; align-items: center; gap: 12px; }

.user-dropdown { position: relative; }
.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.user-btn:hover { border-color: var(--border-hover); }
.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
}
.badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.badge-vip { background: linear-gradient(135deg, #fdcb6e, #e17055); color: #1a1a2e; }
.badge-admin { background: var(--danger); color: white; }

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    overflow: hidden;
}
.user-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.user-menu-info {
    padding: 12px 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.user-menu-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.15s;
}
.user-menu-item:hover { background: rgba(108,92,231,0.1); color: var(--text-primary); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 22px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,92,231,0.4); color: white; }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--accent-primary); background: rgba(108,92,231,0.1); color: var(--text-primary); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #019875; color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #d63031; color: white; }
.btn-icon {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-icon:hover { background: rgba(108,92,231,0.15); border-color: var(--border-hover); }
.btn-generate { font-size: 16px; padding: 14px; }
.btn-generate:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-step {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.btn-step:hover { background: rgba(108,92,231,0.2); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.hero-badge {
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual { display: flex; justify-content: center; }
.visualizer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding: 20px;
}
.viz-bar {
    width: 24px;
    height: var(--h);
    background: var(--accent-gradient);
    border-radius: 4px 4px 0 0;
    animation: vizPulse 2s ease-in-out infinite;
    opacity: 0.8;
}
.viz-bar:nth-child(2) { animation-delay: 0.1s; }
.viz-bar:nth-child(3) { animation-delay: 0.2s; }
.viz-bar:nth-child(4) { animation-delay: 0.3s; }
.viz-bar:nth-child(5) { animation-delay: 0.4s; }
.viz-bar:nth-child(6) { animation-delay: 0.5s; }
.viz-bar:nth-child(7) { animation-delay: 0.6s; }
.viz-bar:nth-child(8) { animation-delay: 0.7s; }
@keyframes vizPulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.6); }
}

/* ============================================================
   Sections
   ============================================================ */
.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}
.main-content { min-height: calc(100vh - 64px - 60px); }

/* Pain Points */
.pain-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}
.pain-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.pain-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}
.pain-card:hover { transform: translateY(-4px); border-color: var(--danger); box-shadow: var(--shadow); }
.pain-icon { font-size: 36px; margin-bottom: 12px; }
.pain-card h3 { font-size: 18px; margin-bottom: 8px; }
.pain-card p { font-size: 14px; color: var(--text-secondary); }
.pain-solution {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(253,121,168,0.05));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    font-size: 16px;
}
.solution-arrow { font-size: 28px; display: block; margin-bottom: 8px; }

/* ============================================================
   Studio
   ============================================================ */
.studio {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}
.studio-header { margin-bottom: 24px; }
.limit-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(253,203,110,0.1), rgba(225,112,85,0.1));
    border: 1px solid rgba(253,203,110,0.3);
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-size: 14px;
    flex-wrap: wrap;
}
.limit-banner-guest {
    background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(0,206,201,0.1));
    border-color: rgba(108,92,231,0.3);
}

.studio-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
}
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.panel-header h3 { font-size: 16px; }
.panel-actions { display: flex; gap: 8px; }

.chord-help {
    padding: 12px 20px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    line-height: 1.8;
}
.chord-help code {
    background: rgba(108,92,231,0.15);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--accent-secondary);
    font-size: 11px;
}
.chord-textarea {
    width: 100%;
    min-height: 160px;
    padding: 16px 20px;
    background: var(--bg-input);
    border: none;
    color: var(--text-primary);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.8;
    resize: vertical;
    outline: none;
}
.chord-textarea:focus { background: #0a1520; }

.chord-preview {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    min-height: 120px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    position: relative;
}
.chord-preview::-webkit-scrollbar { height: 6px; }
.chord-preview::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.chord-preview::-webkit-scrollbar-thumb { background: rgba(108,92,231,0.4); border-radius: 3px; }
.preview-bar {
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    min-width: 140px;
    flex-shrink: 0;
}
.preview-bar .bar-num { color: var(--text-muted); font-size: 12px; display: block; margin-bottom: 6px; }
.preview-bar .bar-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols), 1fr);
    gap: 4px 8px;
    align-items: start;
}
.preview-bar .bar-chord {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
    text-align: left;
    word-break: break-all;
}
.preview-bar .bar-chord-empty { visibility: hidden; }
.preview-bar .lyric-seg {
    font-size: 17px;
    color: var(--text-primary);
    line-height: 1.5;
    text-align: left;
    word-break: break-all;
    padding-top: 2px;
}
.preview-bar .lyric-seg.lyric-hl { color: #DAA520; font-weight: 600; }
.preview-bar .lyric-empty { visibility: hidden; }

/* 简谱模式：和弦行独立 */
.preview-bar .bar-chords-row {
    display: grid;
    grid-template-columns: repeat(var(--cols), 1fr);
    gap: 4px 8px;
    margin-bottom: 4px;
}
.preview-bar .bar-chords-row .bar-chord {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
    text-align: left;
    word-break: break-all;
}

/* 简谱+歌词 grid */
.preview-bar .bar-jp-lyric {
    display: grid;
    grid-template-columns: repeat(var(--cols), 1fr);
    gap: 2px 4px;
    align-items: start;
}

/* 简谱音符 */
.jp-note {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    position: relative;
    min-height: 38px;
    padding: 14px 2px 10px 2px; /* 上方留延音线/高音点空间，下方留低音点空间 */
    box-sizing: border-box;
}
.jp-note.jp-empty { visibility: hidden; }
.jp-digit {
    font-size: 22px;
    font-weight: 700;
    color: #4FC3F7;
    line-height: 1;
    position: relative;
    display: inline-block;
    vertical-align: baseline;
}
.jp-aug-dot {
    font-size: 20px;
    font-weight: 700;
    color: #4FC3F7;
    line-height: 1;
    margin-left: 2px;
    transform: translateY(-1px);
}
.jp-dash {
    font-size: 20px;
    font-weight: 700;
    color: #4FC3F7;
    line-height: 1;
    margin-left: 2px;
    transform: translateY(-2px);
}

/* 音高：高音点（上方） */
.jp-oct-1 .jp-digit::before {
    content: '·';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
}
.jp-oct-2 .jp-digit::before {
    content: '··';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 1px;
    line-height: 1;
    font-weight: 700;
}
/* 音高：低音点（下方） */
.jp-oct--1 .jp-digit::after {
    content: '·';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
}
.jp-oct--2 .jp-digit::after {
    content: '··';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 1px;
    line-height: 1;
    font-weight: 700;
}

/* 时值：半拍下划线（一条） */
.jp-note.dur-half .jp-digit {
    border-bottom: 2px solid #4FC3F7;
    padding-bottom: 2px;
}
/* 时值：1/4拍下划线（两条） */
.jp-note.dur-quarter .jp-digit {
    border-bottom: 2px solid #4FC3F7;
    padding-bottom: 2px;
    box-shadow: 0 5px 0 -2px #4FC3F7;
}

/* 三连音标记 */
.jp-note.jp-triplet .jp-digit {
    position: relative;
}
.jp-note.jp-triplet .jp-digit::before {
    content: '3';
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #4FC3F7;
    font-weight: 400;
}
.jp-note.jp-triplet.jp-oct-1 .jp-digit::before,
.jp-note.jp-triplet.jp-oct-2 .jp-digit::before {
    top: -19px;
}

/* 延音线：只在起点显示┌，终点显示┐，中间音不显示 */
.jp-note.jp-tie-start:not(.jp-tie-end)::before {
    content: '┌';
    position: absolute;
    top: -3px;
    left: -1px;
    font-size: 16px;
    color: #4FC3F7;
    line-height: 1;
    font-weight: 400;
}
.jp-note.jp-tie-end:not(.jp-tie-start)::after {
    content: '┐';
    position: absolute;
    top: -3px;
    right: -1px;
    font-size: 16px;
    color: #4FC3F7;
    line-height: 1;
    font-weight: 400;
}

/* 简谱模式下的歌词字 */
.lyric-char {
    font-size: 17px;
    color: var(--text-primary);
    line-height: 1.4;
    text-align: center;
    word-break: break-all;
    padding-top: 4px;
}
.lyric-char.lyric-hl { color: #DAA520; font-weight: 600; }
.lyric-char.lyric-empty { visibility: hidden; }

/* Controls Panel */
.panel-controls { padding: 0; }
.control-group {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.control-group:last-child { border-bottom: none; }
.group-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}
.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.control-row:last-child { margin-bottom: 0; }
.control-label { font-size: 14px; color: var(--text-secondary); }

.bpm-control { display: flex; align-items: center; gap: 8px; }
.bpm-input, .capo-input {
    width: 70px;
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    text-align: center;
    outline: none;
}
.bpm-input:focus, .capo-input:focus { border-color: var(--accent-primary); }

.style-select {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    min-width: 140px;
}
.style-select:focus { border-color: var(--accent-primary); }

/* Instruments */
.instrument-list { display: flex; flex-direction: column; gap: 8px; }
.inst-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}
.inst-item:hover { background: rgba(255,255,255,0.05); }
.inst-check {
    width: 18px; height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}
.inst-icon { font-size: 18px; width: 24px; text-align: center; }
.inst-name { font-size: 14px; width: 50px; }
.inst-vol { flex: 1; }
.vol-slider {
    width: 100%;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* Playback */
.generate-row { margin: 16px 0 12px; }
.playback-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}
.playback-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
}
.playback-btn span { margin-right: 4px; }
.download-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.download-locked {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(253,203,110,0.08);
    border: 1px solid rgba(253,203,110,0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--warning);
    width: 100%;
    justify-content: space-between;
}
.status-bar {
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}
.status-bar.success { color: var(--success); }
.status-bar.error { color: var(--danger); }

/* Save */
.save-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.save-input {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}
.save-input:focus { border-color: var(--accent-primary); }
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ============================================================
   Saves Section
   ============================================================ */
.saves-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.section-header-row .section-title { margin-bottom: 0; text-align: left; }
.search-box input {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 14px;
    width: 240px;
    outline: none;
    transition: all 0.2s;
}
.search-box input:focus { border-color: var(--accent-primary); width: 280px; }

.saves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.saves-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}
.save-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}
.save-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.save-card h4 { font-size: 15px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.save-chords {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.2);
    padding: 8px 10px;
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 80px;
    overflow: hidden;
    margin-bottom: 12px;
    font-family: monospace;
}
.save-actions { display: flex; gap: 8px; }

/* ============================================================
   Features
   ============================================================ */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.feature-icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   Auth Page
   ============================================================ */
.auth-section {
    min-height: calc(100vh - 64px - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h2 { font-size: 24px; margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); font-size: 14px; }
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 4px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}
.auth-tab.active { background: var(--accent-gradient); color: white; }
.auth-form .form-group { margin-bottom: 16px; }
.auth-form label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.auth-form input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.auth-form input:focus { border-color: var(--accent-primary); }
.auth-hint { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.auth-divider {
    text-align: center;
    margin: 24px 0 16px;
    position: relative;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: var(--border);
}
.auth-divider span {
    background: var(--bg-card);
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
}
.auth-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.benefit-item { font-size: 12px; color: var(--text-secondary); }

/* ============================================================
   Pricing
   ============================================================ */
.pricing-hero {
    text-align: center;
    padding: 60px 24px 30px;
}
.pricing-title { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.pricing-subtitle { font-size: 16px; color: var(--text-secondary); }
.pricing-cards {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}
.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    position: relative;
    transition: all 0.3s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card-featured {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.03);
}
.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--accent-gradient);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}
.price-badge-best { background: linear-gradient(135deg, #fdcb6e, #e17055); color: #1a1a2e; }
.price-header { text-align: center; margin-bottom: 24px; }
.price-header h3 { font-size: 20px; margin-bottom: 12px; }
.price-amount { font-size: 42px; font-weight: 800; }
.price-amount span { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.price-save { font-size: 12px; color: var(--success); margin-top: 4px; }
.price-features { list-style: none; margin-bottom: 24px; }
.price-features li {
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.price-features li:last-child { border-bottom: none; }
.price-features .enabled { color: var(--text-primary); }
.price-features .disabled { color: var(--text-muted); }

.pricing-faq {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}
.faq-list { display: flex; flex-direction: column; gap: 16px; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}
.faq-item h4 { font-size: 16px; margin-bottom: 8px; }
.faq-item p { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   Activate Page
   ============================================================ */
.activate-section {
    min-height: calc(100vh - 64px - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.activate-card {
    width: 100%;
    max-width: 560px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}
.activate-header { text-align: center; margin-bottom: 24px; }
.activate-header h1 { font-size: 28px; margin-bottom: 8px; }
.activate-header p { color: var(--text-secondary); font-size: 14px; }
.activate-already {
    text-align: center;
    padding: 20px;
    background: rgba(0,184,148,0.08);
    border: 1px solid rgba(0,184,148,0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}
.check-icon {
    width: 48px; height: 48px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 12px;
}
.activate-form-wrap { margin-bottom: 32px; }
.activate-form .form-group { margin-bottom: 16px; }
.activate-form label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.activate-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.activate-form input:focus { border-color: var(--accent-primary); }
.activate-loading { text-align: center; padding: 12px; color: var(--text-muted); }
.activate-success {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0,184,148,0.1);
    border: 1px solid rgba(0,184,148,0.3);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 14px;
}
.activate-error {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(225,112,85,0.1);
    border: 1px solid rgba(225,112,85,0.3);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 14px;
}

.wechat-section {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.wechat-section h3 { font-size: 18px; margin-bottom: 8px; text-align: center; }
.wechat-section > p { text-align: center; color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.wechat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0,184,148,0.08), rgba(108,92,231,0.05));
    border: 1px solid rgba(0,184,148,0.2);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.wechat-avatar {
    width: 64px; height: 64px;
    background: rgba(0,184,148,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wechat-info h4 { font-size: 16px; margin-bottom: 4px; }
.wechat-id { font-size: 15px; color: var(--success); font-weight: 600; margin-bottom: 2px; }
.wechat-tip { font-size: 12px; color: var(--text-muted); }

.price-info {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.price-tag {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.price-label { display: block; font-size: 12px; color: var(--text-muted); }
.price-value { display: block; font-size: 24px; font-weight: 700; color: var(--accent-secondary); }
.price-desc { display: block; font-size: 11px; color: var(--text-muted); }

.wechat-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}
.step-num {
    width: 22px; height: 22px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}
.step-arrow { color: var(--text-muted); font-size: 14px; }

/* ============================================================
   Admin
   ============================================================ */
.admin-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.admin-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.admin-tab.active { color: var(--accent-secondary); border-bottom-color: var(--accent-primary); }
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}
.admin-card h3 { font-size: 18px; margin-bottom: 16px; }
.admin-form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.admin-select, .admin-input {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}
.admin-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.generated-codes { margin-top: 16px; }
.generated-codes h4 { font-size: 14px; margin-bottom: 10px; color: var(--text-secondary); }
.code-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.code-item:hover { background: rgba(108,92,231,0.15); }
.code-item code { font-size: 15px; letter-spacing: 1px; color: var(--accent-secondary); }
.copy-hint { font-size: 11px; color: var(--text-muted); }

.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th, .admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.admin-table code {
    background: rgba(108,92,231,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent-secondary);
    font-size: 12px;
}
.status-badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.status-unused { background: rgba(0,184,148,0.15); color: var(--success); }
.status-used { background: rgba(225,112,85,0.15); color: var(--danger); }

/* 系统设置面板 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.setting-item label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.setting-item .admin-input { width: 100%; }
.setting-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-direction: row !important;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .settings-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   404
   ============================================================ */
.error-section {
    min-height: calc(100vh - 64px - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.error-card { text-align: center; }
.error-code {
    font-size: 120px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}
.error-card h2 { font-size: 24px; margin-bottom: 12px; }
.error-card p { color: var(--text-secondary); margin-bottom: 24px; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
}
.footer-container { max-width: 1400px; margin: 0 auto; }
.footer p { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-size: 14px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s;
    max-width: 320px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-color: var(--success); color: var(--success); }
.toast-error { border-color: var(--danger); color: var(--danger); }
.toast-info { border-color: var(--accent-primary); color: var(--text-primary); }

/* ============================================================
   播放进度条
   ============================================================ */
.progress-bar-wrap {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
    transition: height 0.15s;
    position: relative;
    cursor: pointer;
}
.progress-bar-wrap:hover .progress-bar {
    height: 10px;
}
.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}
/* 透明 range 覆盖在进度条上，实现点击/拖拽 seek */
.progress-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    z-index: 2;
}
.progress-range::-webkit-slider-runnable-track {
    background: transparent;
    height: 100%;
}
.progress-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent);
    cursor: pointer;
    margin-top: -3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.15s;
}
.progress-bar:hover .progress-range::-webkit-slider-thumb {
    opacity: 1;
}
.progress-range::-moz-range-track {
    background: transparent;
    height: 100%;
    border: none;
}
.progress-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.15s;
}
.progress-bar:hover .progress-range::-moz-range-thumb {
    opacity: 1;
}
.progress-bar { position: relative; }
.progress-time {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    font-family: monospace;
}

/* 小节预览高亮 */
.preview-bar {
    transition: all 0.2s;
    border: 1px solid var(--border);
}
.preview-bar.active {
    border-color: var(--accent-primary);
    background: rgba(108,92,231,0.15);
    box-shadow: 0 0 12px rgba(108,92,231,0.3);
    transform: scale(1.02);
}
.preview-bar.active .bar-chord {
    color: var(--accent-secondary);
}
.preview-bar.active .lyric-seg {
    color: #fff;
}
.preview-bar.active .lyric-seg.lyric-hl {
    color: #FFD700;
}

/* ============================================================
   乐器新布局（含音色选择）
   ============================================================ */
.inst-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.inst-item:hover { background: rgba(255,255,255,0.05); }
.inst-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 110px;
}
.inst-check {
    width: 18px; height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}
.inst-icon { font-size: 18px; width: 24px; text-align: center; }
.inst-name { font-size: 14px; width: 40px; }
.inst-patch {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    min-width: 80px;
}
.inst-patch-select {
    padding: 4px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    outline: none;
    cursor: pointer;
    min-width: 130px;
    max-width: 150px;
}
.inst-patch-select:focus { border-color: var(--accent-primary); }
.inst-vol { min-width: 80px; }
.vol-slider {
    width: 100%;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.group-hint {
    font-size: 11px;
    color: var(--success);
    font-weight: 400;
    animation: fadeInOut 2s ease;
}
@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-badges, .hero-cta { justify-content: center; }
    .hero-visual { order: -1; }
    .pain-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .studio-layout { grid-template-columns: 1fr; }
    .pricing-cards { grid-template-columns: 1fr; max-width: 440px; }
    .price-card-featured { transform: none; }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
    }
    .nav-menu.active { display: flex; }
    .nav-toggle { display: flex; }
    .user-name { display: none; }
    .hero-title { font-size: 28px; }
    .hero-subtitle { font-size: 15px; }
    .section-title { font-size: 22px; }
    .pain-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .auth-benefits { grid-template-columns: 1fr; }
    .wechat-steps { flex-direction: column; }
    .step-arrow { transform: rotate(90deg); }
    .price-info { flex-direction: column; }
    .saves-grid { grid-template-columns: 1fr; }
    .search-box input { width: 100%; }
    .search-box input:focus { width: 100%; }
    .inst-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    .inst-patch-select { grid-column: 1 / -1; min-width: 100%; }
    .inst-patch { grid-column: 1 / -1; }
    .inst-vol { grid-column: 2; }
}

@media (max-width: 480px) {
    .nav-container { padding: 0 16px; }
    .hero { padding: 32px 16px; }
    .studio, .saves-section, .features-section, .pain-section { padding: 24px 16px; }
    .auth-card, .activate-card { padding: 24px 20px; }
    .control-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .bpm-control, .style-select { width: 100%; }
    .inst-check-label { min-width: auto; }
}

/* ============================================================
   痛点解析页
   ============================================================ */
.page-hero {
    padding: 80px 24px 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(108,92,231,0.12) 0%, transparent 100%);
}
.page-hero-content { max-width: 800px; margin: 0 auto; }
.page-hero-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}
.page-hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.pain-detail-section {
    padding: 60px 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.pain-detail-section.alt-bg {
    background: rgba(255,255,255,0.02);
    max-width: 100%;
}
.pain-detail-section.alt-bg > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.pain-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}
.pain-detail-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s;
}
.pain-detail-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108,92,231,0.15);
}
.pain-detail-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-primary);
    opacity: 0.4;
    margin-bottom: 8px;
}
.pain-detail-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.pain-detail-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 对比卡片 */
.pain-compare-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}
.pain-compare-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}
.pain-compare-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.pain-compare-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}
.pain-compare-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}
.pain-compare-list li:last-child { border-bottom: none; }
.pain-compare-list strong { color: var(--danger); }

.pain-conclusion {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}
.pain-conclusion-box {
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(253,203,110,0.1));
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    max-width: 700px;
    text-align: center;
}
.pain-conclusion-box h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.pain-conclusion-box p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 解决方案 */
.solution-section { padding-bottom: 80px; }
.solution-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}
.solution-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}
.solution-item:hover {
    border-color: var(--success);
    transform: translateY(-2px);
}
.solution-icon {
    font-size: 36px;
    margin-bottom: 12px;
}
.solution-item h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.solution-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.solution-cta {
    text-align: center;
    margin-top: 40px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 首页痛点更多链接 */
.pain-more-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.pain-more-link:hover { opacity: 0.8; text-decoration: underline; }

@media (max-width: 1024px) {
    .pain-detail-grid, .solution-grid { grid-template-columns: repeat(2, 1fr); }
    .pain-compare-wrap { grid-template-columns: 1fr; max-width: 440px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 768px) {
    .page-hero-title { font-size: 26px; }
    .page-hero-subtitle { font-size: 15px; }
    .pain-detail-grid, .solution-grid { grid-template-columns: 1fr; }
    .pain-detail-section { padding: 40px 16px; }
}

/* ============================================================
   教程页
   ============================================================ */
.tutorial-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}
.tutorial-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-bottom: 24px;
}
.tutorial-h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.tutorial-h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--accent-secondary);
}
.tutorial-block p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}
.tutorial-block code {
    background: rgba(108,92,231,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--accent-secondary);
}

/* 快速开始步骤 */
.tutorial-steps { display: flex; flex-direction: column; gap: 16px; }
.tutorial-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* 表格 */
.tutorial-table-wrap { overflow-x: auto; margin: 12px 0; }
.tutorial-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tutorial-table th, .tutorial-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.tutorial-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.02);
}
.tutorial-table code { font-size: 12px; }

/* 和弦标签 */
.chord-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.chord-tag {
    background: rgba(108,92,231,0.1);
    border: 1px solid rgba(108,92,231,0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 代码示例 */
.code-example {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 12px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: var(--accent-secondary);
    line-height: 1.8;
}

/* 风格网格 */
.style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 16px 0;
}
.style-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.style-item strong {
    font-size: 14px;
    color: var(--accent-secondary);
}
.style-item span {
    font-size: 12px;
    color: var(--text-muted);
}

/* 两列布局 */
.tutorial-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 16px 0;
}
.tutorial-col h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.tutorial-col p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 8px;
}

/* 列表 */
.tutorial-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}
.tutorial-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.tutorial-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}
.tutorial-list li strong { color: var(--text-primary); }

/* CTA */
.tutorial-cta {
    text-align: center;
    margin-top: 40px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .tutorial-block { padding: 20px 16px; }
    .tutorial-h2 { font-size: 19px; }
    .style-grid { grid-template-columns: repeat(2, 1fr); }
    .tutorial-two-col { grid-template-columns: 1fr; }
}


/* 作品库页面 */
.library-page { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.library-header { text-align: center; margin-bottom: 30px; }
.library-header h1 { font-size: 32px; margin-bottom: 8px; }
.library-header p { color: var(--text-secondary); margin-bottom: 20px; }
.library-search { display: flex; gap: 10px; max-width: 500px; margin: 0 auto 15px; }
.library-search .search-input { flex: 1; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); font-size: 15px; }
.library-count { color: var(--text-secondary); font-size: 14px; }
.view-more-wrap { text-align: center; margin-top: 20px; }

