/* ============================================
   康泰克音源旋律智能创作助手 - 样式（复刻在线版）
   配色：深空灰 + 电音青蓝 + 紫色点缀
   制作人：王彬瑶
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-background: hsl(220 18% 8%);
  --bg-card: hsl(220 15% 12%);
  --bg-muted: hsl(220 14% 10%);
  --text-foreground: hsl(210 20% 94%);
  --text-muted: hsl(220 10% 60%);
  --primary: hsl(190 85% 58%);
  --primary-foreground: hsl(220 25% 10%);
  --accent: hsl(220 12% 18%);
  --border: hsl(220 10% 22%);
  --success: hsl(150 55% 55%);
  --warning: hsl(35 80% 60%);
  --error: hsl(0 70% 60%);
  --purple: #a855f7;
  --radius: 12px;
  --radius-sm: 6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Inter, sans-serif;
  background: var(--bg-background);
  color: var(--text-foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit; color: #fff;
  transition: all .2s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-lg { padding: 14px 32px; font-size: 15px; height: 48px; }
.btn-xl { padding: 16px 40px; font-size: 16px; height: 56px; border-radius: 8px; box-shadow: 0 10px 30px rgba(34,211,238,0.15); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 4px 14px rgba(34,211,238,0.2); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.12); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-foreground); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-secondary { background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.35); color: var(--primary); }
.btn-secondary:hover:not(:disabled) { background: rgba(34,211,238,0.18); }
.btn-block { width: 100%; margin-top: 12px; }
.btn svg { flex-shrink: 0; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
}
.badge-outline { background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.3); color: var(--primary); }
.badge-primary { background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.35); color: var(--primary); }
.badge-green { background: rgba(46,160,67,0.12); border: 1px solid rgba(46,160,67,0.35); color: var(--success); }
.hidden { display: none !important; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(16,20,28,0.82);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-texts { display: flex; flex-direction: column; line-height: 1.3; }
.logo-main { font-size: 15px; font-weight: 700; }
.logo-sub { font-size: 10px; color: var(--text-muted); }
.nav-desktop { display: flex; gap: 22px; }
.nav-desktop a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.nav-desktop a:hover { color: var(--text-foreground); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text-foreground); border-radius: 1px; }
.nav-mobile {
  display: none; flex-direction: column; padding: 8px 24px 16px;
  border-top: 1px solid var(--border); background: var(--bg-background);
}
.nav-mobile.open { display: flex; }
.nav-mobile a { padding: 12px 0; color: var(--text-muted); text-decoration: none; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,0.04); }

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at top right, rgba(34,211,238,0.15), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(168,85,247,0.1), transparent 55%),
    linear-gradient(to bottom, rgba(13,17,23,0.6), var(--bg-background) 90%);
}
.hero-inner { position: relative; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; margin-bottom: 24px;
  background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.2); color: var(--primary);
}
.hero-title { font-size: 52px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 8px; }
.gradient-text {
  background: linear-gradient(90deg, var(--primary), #c084fc, var(--primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 30px; font-weight: 400; color: var(--text-muted); margin-bottom: 20px; }
.hero-desc { max-width: 640px; margin: 0 auto 32px; color: var(--text-muted); font-size: 15px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 56px; flex-wrap: wrap; }

/* Hero 四步卡片 */
.hero-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hero-step-card {
  position: relative; text-align: center; padding: 24px 16px;
  background: rgba(28,34,46,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.hero-step-card:hover { border-color: rgba(34,211,238,0.4); transform: translateY(-3px); }
.step-num-tag { position: absolute; top: 10px; right: 14px; font-family: Consolas, monospace; font-size: 13px; color: rgba(255,255,255,0.25); }
.step-icon {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 10px;
  background: rgba(34,211,238,0.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.step-icon.primary { background: rgba(34,211,238,0.12); }
.step-icon.accent { background: rgba(168,85,247,0.12); color: #c084fc; }
.step-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.step-desc { font-size: 13px; color: var(--text-muted); }

/* ============ 通用区块 ============ */
.section { padding: 72px 0; }
.section-alt { background: rgba(255,255,255,0.02); border-top: 1px solid rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.04); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head .badge { margin-bottom: 14px; }
.section-title { font-size: 32px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.section-sub { color: var(--text-muted); font-size: 15px; }

/* 卡片 */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(4px);
}
.card-head { margin-bottom: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.card-title svg { color: var(--primary); }
.card-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid-settings { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.grid-generate { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; margin-top: 24px; }
.grid-tutorial { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; align-items: start; }
.col-left, .col-right { display: flex; flex-direction: column; gap: 20px; }
.generate-center { text-align: center; margin-top: 8px; }

/* ============ 上传区 ============ */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  min-height: 240px; display: flex; align-items: center; justify-content: center;
  transition: all .2s; cursor: pointer; margin-bottom: 16px; overflow: hidden;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: rgba(34,211,238,0.05); }
.upload-empty { text-align: center; padding: 30px; }
.upload-icon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  background: rgba(34,211,238,0.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.upload-main { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.upload-sub { font-size: 13px; color: var(--text-muted); }
.upload-preview { position: relative; width: 100%; }
.upload-preview img { max-height: 280px; object-fit: contain; width: 100%; background: rgba(0,0,0,0.25); }
.close-btn {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.6); border: none; color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.recognize-badge {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(46,160,67,0.9); color: #fff; font-size: 12px;
  padding: 3px 10px; border-radius: 999px;
}

/* 识别结果 */
.recognize-result { min-height: 300px; }
.result-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.result-empty-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: rgba(34,211,238,0.06); color: var(--text-muted); display: flex; align-items: center; justify-content: center; opacity: 0.7; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.field-block { background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.field-block.wide { grid-column: span 2; }
.field-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.field-value { font-size: 16px; font-weight: 600; word-break: break-all; }
.field-detail-box { background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 13px; max-height: 140px; overflow-y: auto; font-family: Consolas, monospace; white-space: pre-wrap; color: var(--text-muted); }

/* 手动输入 */
.manual-input { background: rgba(34,211,238,0.04); border: 1px solid rgba(34,211,238,0.2); border-radius: 8px; padding: 12px 14px; margin-top: 12px; }
.manual-input input {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--bg-background); border: 1px solid var(--border); color: var(--text-foreground); font-size: 14px;
}
.manual-input input:focus { outline: none; border-color: var(--primary); }

/* ============ 音源信息 ============ */
.info-placeholders { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.ph-card {
  text-align: center; padding: 20px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: rgba(0,0,0,0.15); opacity: 0.5;
}
.ph-card svg { color: var(--text-muted); margin-bottom: 8px; }
.ph-card div { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.ph-card span { font-size: 12px; color: var(--text-muted); }
.info-loading { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 24px; color: var(--text-muted); }
.info-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.info-raw { background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 13px; max-height: 180px; overflow-y: auto; font-family: Consolas, monospace; white-space: pre-wrap; color: var(--text-muted); }
.info-source { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-top: 14px; }

/* ============ 表单控件 ============ */
.param-group { margin-bottom: 18px; }
.param-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.param-group select, .param-group input[type="number"], textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-background); border: 1px solid var(--border); color: var(--text-foreground);
  font-size: 14px; font-family: inherit; transition: border-color .2s;
}
.param-group select:focus, .param-group input:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; min-height: 160px; background: var(--bg-background); border: 1px solid var(--border); color: var(--text-foreground); font-size: 14px; font-family: inherit; padding: 12px; border-radius: var(--radius-sm); width: 100%; }
textarea:focus { outline: none; border-color: var(--primary); }

/* BPM 滑块 */
.bpm-value { float: right; color: var(--primary); font-family: Consolas, monospace; font-weight: 600; }
input[type="range"] { -webkit-appearance: none; width: 100%; height: 5px; border-radius: 3px; background: var(--border); outline: none; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); cursor: pointer; border: 3px solid var(--bg-background);
  box-shadow: 0 0 0 2px var(--primary);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 3px solid var(--bg-background);
  box-shadow: 0 0 0 2px var(--primary);
}
.range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ============ Stepper ============ */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stepper-item {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 10px; border-radius: 10px; font-size: 13px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-muted);
  transition: all .3s;
}
.stepper-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.stepper-item.active { background: rgba(34,211,238,0.1); border-color: rgba(34,211,238,0.4); color: var(--primary); }
.stepper-item.active .stepper-dot { background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.stepper-item.done { background: rgba(46,160,67,0.06); border-color: rgba(46,160,67,0.25); color: var(--success); }
.stepper-item.done .stepper-dot { background: var(--success); }

/* ============ 方案区 ============ */
.plan-empty { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.plan-loading { text-align: center; padding: 40px; }
.plan-content { display: flex; flex-direction: column; gap: 14px; max-height: 500px; overflow-y: auto; padding-right: 4px; }
.plan-title { font-size: 19px; font-weight: 700; color: var(--primary); }
.plan-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-meta span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(34,211,238,0.1); color: var(--primary); border: 1px solid rgba(34,211,238,0.25); }
.plan-analysis, .plan-tips { background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 13px; color: var(--text-foreground); line-height: 1.7; }
.plan-analysis b, .plan-tips b { color: var(--primary); }
.plan-chords { display: flex; gap: 8px; flex-wrap: wrap; }
.chord-item { padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; background: linear-gradient(135deg, rgba(168,85,247,0.18), rgba(34,211,238,0.18)); border: 1px solid rgba(168,85,247,0.35); }

/* ============ 音符表格 ============ */
.table-wrap { overflow-x: auto; }
.note-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.note-table th { text-align: left; padding: 8px 10px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
.note-table td { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,0.04); font-family: Consolas, monospace; }
.note-table tr:hover td { background: rgba(34,211,238,0.04); }
.note-more { font-size: 13px; color: var(--text-muted); padding: 10px; text-align: center; }

/* ============ 播放器 ============ */
.match-hint { font-size: 12px; color: var(--primary); margin-top: 6px; }
.player-box { border-radius: var(--radius); background: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(168,85,247,0.08)); border: 1px solid rgba(34,211,238,0.2); padding: 24px; text-align: center; }
.player-empty { color: var(--text-muted); padding: 16px 0; }
.player-icon { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: rgba(34,211,238,0.08); color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.play-btn {
  width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--primary); color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(34,211,238,0.3);
  transition: transform .15s;
}
.play-btn:hover { transform: scale(1.05); }
.play-btn:active { transform: scale(0.95); }
.player-status { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.player-info { font-size: 12px; color: var(--text-muted); }

/* ============ 导出区 ============ */
.export-note { font-size: 12px; color: var(--text-muted); margin-top: 14px; line-height: 1.6; }

/* ============ 教程 ============ */
.tutorial-list { display: flex; flex-direction: column; gap: 8px; }
.tutorial-item {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: all .2s;
}
.tutorial-item:hover { background: rgba(255,255,255,0.03); }
.tutorial-item.active { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.3); }
.tut-num {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.tutorial-item.active .tut-num { background: var(--primary); color: var(--primary-foreground); }
.tut-text { flex: 1; min-width: 0; }
.tut-title { font-size: 14px; font-weight: 600; }
.tut-desc { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tut-arrow { color: var(--text-muted); font-size: 18px; }

.tut-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.tut-detail-num {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--purple)); color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
}
.tut-detail-title { font-size: 18px; font-weight: 700; }
.tut-detail-head .badge-green { margin-left: auto; }
.tut-illustration {
  height: 180px; border-radius: 10px; margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(34,211,238,0.06), rgba(168,85,247,0.06)),
    repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(255,255,255,0.04) 20px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(255,255,255,0.04) 20px);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.tut-illustration::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 60%, rgba(34,211,238,0.15), transparent 55%);
}
.tut-detail-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 18px 20px; font-size: 14px; line-height: 1.9; }
.tut-detail-box ol { padding-left: 20px; }
.tut-detail-box li { margin-bottom: 6px; }
.tut-detail-box b { color: var(--primary); }

/* ============ Footer ============ */
.footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 28px 0; background: rgba(28,34,46,0.5); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.footer-tag { font-size: 12px; color: var(--text-muted); }

/* ============ Toast ============ */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-foreground);
  padding: 12px 24px; border-radius: 10px; font-size: 14px; z-index: 999;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5); max-width: 85%; text-align: center;
  border-top: 2px solid var(--primary);
}
.toast.error { border-top-color: var(--error); color: #ff9a94; }
.toast.success { border-top-color: var(--success); color: #7ee787; }

/* Spinner */
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin 0.8s linear infinite; display: inline-block;
}
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .hero-title { font-size: 40px; }
  .hero-sub { font-size: 24px; }
  .hero-steps { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-settings, .grid-generate, .grid-tutorial { grid-template-columns: 1fr; }
  .info-placeholders { grid-template-columns: repeat(2, 1fr); }
  .stepper { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 48px 0; }
  .hero { padding: 60px 0 48px; }
  .hero-title { font-size: 30px; }
  .hero-sub { font-size: 20px; }
  .section-title { font-size: 24px; }
  .info-feature-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero-steps { grid-template-columns: 1fr; }
  .info-placeholders { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* ============ 音源预设库 ============ */
.preset-library { margin-top: 14px; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.preset-chip {
  background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.35);
  color: #cbb8ff; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; cursor: pointer; transition: .16s;
}
.preset-chip:hover { background: rgba(139,92,246,.25); color: #fff; transform: translateY(-1px); }

/* ============ 钢琴卷帘 ============ */
.piano-roll-wrap { overflow-x: auto; padding: 4px 0; }
#pianoRoll { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 10px; background: #0d1020; }

/* ============ 打包按钮 ============ */
.btn-accent {
  background: linear-gradient(90deg, #f59e0b, #ef4444); color: #fff;
  border: none; border-radius: 12px; padding: 13px 18px; font-size: 15px;
  font-weight: 600; cursor: pointer; width: 100%; transition: .16s;
}
.btn-accent:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-accent:disabled { opacity: .45; cursor: not-allowed; }

/* ============ 作品历史 ============ */
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-empty { text-align: center; color: var(--text-dim, #9aa3b2); padding: 30px 0; font-size: 14px; }
.history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #171b2b; border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 14px 16px; flex-wrap: wrap;
}
.history-info { min-width: 0; flex: 1; }
.history-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.history-meta { font-size: 12px; color: #9aa3b2; }
.history-actions { display: flex; gap: 8px; flex: none; }
.btn-sm { padding: 7px 14px; font-size: 13px; width: auto; }
.btn-danger { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.35); }
.btn-danger:hover { background: rgba(239,68,68,.28); }
