:root {
  --bg: #12121a;
  --panel: #1a1a2e;
  --border: #33334f;
  --text: #eee;
  --accent: #ffd23f;
}
* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Tahoma", sans-serif;
  margin: 0;
  padding-bottom: 80px;
}
header {
  background: var(--panel);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
header h1 { margin: 0 0 4px; font-size: 20px; color: var(--accent); }
.hint { color: #888; font-size: 12px; }
main {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  max-width: 1300px;
  margin: 0 auto;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  flex: 1 1 380px;
}
.panel.wide { flex: 1 1 100%; }
.panel h2 { margin-top: 0; font-size: 15px; color: var(--accent); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: #aaa; margin-bottom: 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
input[type=text], input[type=file], textarea, select {
  background: #222; color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 6px 8px; font-size: 13px;
}
textarea { width: 100%; resize: vertical; }
button {
  background: #2a2a40; color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 6px 12px; cursor: pointer; font-size: 13px;
}
button:hover { background: #3a3a55; }
button.primary {
  background: var(--accent); color: #111; font-weight: bold;
  position: fixed; bottom: 16px; right: 16px; padding: 10px 20px; z-index: 10;
}
button.primary:hover { background: #ffdd6a; }

#stage {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, #1a1a2e, #0d0d16);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 0 10px;
}
.lyric-box {
  position: absolute;
  left: 8%; top: 80%;
  width: 84%;
  max-width: 100%;
  padding: 8px;
  text-align: center;
  font-size: clamp(16px, 4vw, 44px);
  color: var(--accent);
  text-shadow: 0 2px 6px rgba(0,0,0,.8);
  cursor: grab;
  user-select: none;
  border: 1px dashed transparent;
  box-sizing: border-box;
}
.lyric-box:hover, .lyric-box.dragging {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.03);
}
.lyric-box.dragging { cursor: grabbing; }

#lrcResults { margin-bottom: 12px; }
.lrc-result {
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px;
  margin-bottom: 4px; cursor: pointer; font-size: 13px;
}
.lrc-result:hover { background: #2a2a40; }

#lines { max-height: 400px; overflow-y: auto; }
.line {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  border-radius: 5px; margin-bottom: 2px; cursor: pointer; font-size: 14px;
}
.line:hover { background: #22223a; }
.line.active { background: #33334f; box-shadow: inset 3px 0 0 var(--accent); }
.line .t { font-variant-numeric: tabular-nums; color: #8fd3ff; font-size: 11px; width: 56px; }
.line .txt { flex: 1; }
.nudge button { padding: 2px 6px; font-size: 11px; }
