/* /generate — visualizer link generator. Inherits base.css tokens + header/shell. */

.gen-wrap { max-width: 640px; margin-inline: auto; }

.gen-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  padding: 20px;
}

.gen-field { margin-bottom: 18px; }
.gen-field > label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.gen-card select,
.gen-card input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
}
.gen-card select:focus,
.gen-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
}

/* scene preview thumbnail */
.scene-thumb {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 16 / 9;
}
.scene-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* album header (artwork + meta) */
.album-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.album-art {
  width: 88px; height: 88px; flex-shrink: 0; border-radius: 3px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line);
}
.album-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-meta__title { font-size: 15px; font-weight: 600; color: var(--fg); }
.album-meta__artist { font-size: 13px; color: var(--muted); }

/* selectable track list */
.track-list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
}
.track-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; cursor: pointer;
  border-top: 1px solid var(--line); border-left: 3px solid transparent; transition: background 0.12s;
}
.track-item:first-child { border-top: none; }
.track-item:hover { background: rgba(34, 211, 238, 0.05); }
.track-item.selected { background: rgba(34, 211, 238, 0.08); border-left-color: var(--accent); }
.sel-dot {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--line); position: relative;
}
.track-item.selected .sel-dot { border-color: var(--accent); box-shadow: var(--accent-glow); }
.track-item.selected .sel-dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
}
.play-btn {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); color: var(--fg);
  font-size: 12px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.play-btn:hover { border-color: var(--accent); color: var(--accent); }
.play-btn.playing { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.play-spacer { width: 30px; flex-shrink: 0; }
.t-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--fg); }
.t-whole { font-weight: 600; }
.t-sub { color: var(--muted); font-size: 12px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 3px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
  text-decoration: none; border-bottom: 1px solid transparent; text-shadow: none;
}
.btn:hover { border-bottom: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--bg); width: 100%; box-shadow: var(--accent-glow); }
.btn-primary:hover { color: var(--bg); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: var(--panel); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { color: var(--fg); border-color: rgba(34, 211, 238, 0.35); }
.btn-x { background: #000; color: #fff; border-color: var(--line); }
.btn-x:hover { color: #fff; border-color: rgba(34, 211, 238, 0.35); }

/* result */
.hidden { display: none !important; }
.gen-result { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.url-row { display: flex; gap: 8px; margin-bottom: 8px; }
.url-row input { font-size: 13px; min-width: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.qr-box { text-align: center; padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; }
.qr-box img { width: 220px; max-width: 100%; height: auto; aspect-ratio: 1 / 1; image-rendering: pixelated; border-radius: 3px; background: #fff; }
.qr-cap { color: var(--muted); font-size: 12px; margin-top: 10px; }
.toast { color: var(--accent); text-shadow: var(--accent-glow); font-size: 12px; min-height: 16px; }
.gen-empty { padding: 8px 0; }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 16px; }
