:root {
  --bg: #0e0e0e;
  --surface: #161616;
  --surface2: #1c1c1c;
  --border: #272727;
  --gold: #c8a84b;
  --gold-light: #e8c96b;
  --text: #e8e4dc;
  --text-muted: #7a7268;
  --text-dim: #3e3a36;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

/* HEADER */
header {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 200;
}
#category-legend {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  color: var(--chip-color);
  border: 1px solid var(--chip-color);
  opacity: 0.75;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
}
.btn-summary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.btn-summary:hover { border-color: var(--gold); color: var(--gold); }
.btn-feedback { border-color: rgba(200,168,75,.4); color: var(--gold); }
.btn-feedback:hover { background: rgba(200,168,75,.08); }

/* FEEDBACK FORM */
.feedback-notice {
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  line-height: 1.6;
}
#feedback-form { display: flex; flex-direction: column; gap: 12px; }
#feedback-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color .15s;
}
#feedback-text:focus { outline: none; border-color: var(--gold); }
#feedback-text::placeholder { color: var(--text-dim); }
#feedback-submit {
  align-self: flex-end;
  background: var(--gold);
  border: none;
  border-radius: 4px;
  color: #000;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  transition: opacity .15s;
}
#feedback-submit:hover { opacity: .85; }
#feedback-submit:disabled { opacity: .5; cursor: default; }
.feedback-success-msg {
  color: #6fcf97;
  font-size: 14px;
  text-align: center;
  padding: 20px 0;
}
.feedback-error-msg {
  color: #e87c7c;
  font-size: 13px;
  margin-top: 4px;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: min(600px, 90vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
  animation: modalIn .18s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.modal-sub {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color .12s;
}
.btn-modal-close:hover { color: #fff; }
.modal-body {
  padding: 22px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* HERO */
.hero {
  background: linear-gradient(160deg, #1c1610 0%, #0e0e0e 60%);
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 36px;
  align-items: flex-start;
}
.hero-left { display: flex; gap: 28px; align-items: flex-end; flex: 1; min-width: 0; }

/* YT EMBED */
.yt-wrapper {
  width: 320px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  position: relative;
  align-self: center;
}
.yt-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface2);
}
.yt-placeholder-icon { font-size: 28px; opacity: .4; }
.yt-placeholder-label { font-size: 11px; color: var(--text-dim); }
.yt-wrapper iframe {
  width: 100%; height: 100%;
  border: none;
  display: block;
}
.cover {
  width: 110px; height: 110px;
  flex-shrink: 0;
  background: #1a1510;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-tag { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.hero-title { font-family: 'Playfair Display', serif; font-size: 46px; font-weight: 900; color: #fff; line-height: 1; letter-spacing: -1px; margin-bottom: 6px; }
.hero-artist { font-size: 18px; color: var(--gold); margin-bottom: 12px; }
.hero-details { font-size: 11px; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }
.hero-details span { color: var(--text); }

/* PAGE */
.page {
  max-width: 580px;
  margin: 0 auto;
  padding: 40px 40px 120px;
}

/* SECTIONS */
.section-block { margin-bottom: 44px; }
.section-title {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  padding: 5px 0 5px 12px;
  border-left: 2px solid var(--gold);
  margin-bottom: 14px;
}

/* LYRIC LINES */
.lyric-line {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  margin-left: -12px;
  padding-left: 10px;
  border-radius: 3px;
  border-left: 2px solid transparent;
  font-size: 16px;
  color: var(--text);
  line-height: 1.65;
  user-select: none;
  transition: background .12s;
}
.lyric-line.annotated {
  cursor: pointer;
  border-left-color: rgba(200,168,75,.45);
  background: rgba(200,168,75,.08);
}
.lyric-line.annotated:hover {
  background: rgba(200,168,75,.15);
  color: #fff;
}
.lyric-line.active {
  border-left-color: var(--gold-light) !important;
  background: rgba(200,168,75,.2) !important;
  color: #fff;
}
.lyric-line:not(.annotated) { cursor: default; }

.pips {
  display: flex;
  gap: 4px;
  margin-left: 10px;
  flex-shrink: 0;
}
.note-pip {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.empty { height: 12px; }

/* FLOATING ANNOTATION PANEL */
#anno-float {
  position: fixed;
  width: 320px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.65);
  z-index: 150;
  display: none;
  flex-direction: column;
  gap: 10px;
}
#anno-float::before {
  content: '';
  position: absolute;
  left: -7px; top: 18px;
  width: 12px; height: 12px;
  background: var(--surface2);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
#anno-float.visible { display: flex; animation: popIn .16s ease; }

@keyframes popIn {
  from { opacity: 0; transform: translateX(8px) scale(.97); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.anno-line-ref {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid var(--gold);
  padding: 6px 10px;
  background: rgba(0,0,0,.3);
  border-radius: 0 3px 3px 0;
  line-height: 1.5;
}
#anno-notes-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.anno-note-block {
  border-left: 2px solid var(--note-color);
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.anno-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--note-color);
}
.anno-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}
