/* ============================================
   Testi & Traduzioni — pagine dei testi
   ============================================ */

.lyrics-page { background:#13141a; color:#f0ede8; min-height:100vh; }

.lyrics-container { max-width:720px; margin:2.4rem auto 5rem; padding:0 1.4rem; box-sizing:border-box; }

.back-link { display:inline-block; margin-bottom:1.6rem; color:#8b8fa8; font-size:1.3rem; text-decoration:none; }
.back-link:hover { color:#f0ede8; }

.lyrics-title-row {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.5rem 1rem;
}
.lyrics-title-row .lyrics-title {
  flex:1 1 auto;
  min-width:0;
}

.lyrics-platforms-btn {
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  padding:.7rem 1.4rem;
  border-radius:999px;
  background:#168d54;
  border:1px solid #1cab67;
  color:#fff;
  text-decoration:none;
  font-size:1.1rem;
  font-weight:700;
  line-height:1.3;
  white-space:nowrap;
  flex-shrink:0;
  margin-left:auto;
  box-shadow:0 4px 16px rgba(22,141,84,.4);
  transition:background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.lyrics-platforms-btn:hover {
  background:#1aa863;
  box-shadow:0 6px 20px rgba(22,141,84,.55);
  transform:translateY(-1px);
  color:#fff;
}
.lyrics-platforms-btn svg {
  flex-shrink:0;
  background:rgba(255,255,255,.22);
  border-radius:50%;
  padding:.2rem;
  box-sizing:content-box;
}

@media screen and (max-width:480px) {
  .lyrics-platforms-btn {
    white-space:normal;
    text-align:center;
    font-size:1.05rem;
    padding:.65rem 1.1rem;
  }
}

.lyrics-demo-badge {
  display:inline-block; margin:0 0 1.2rem; padding:.5rem 1rem;
  background:rgba(223,178,33,.15); border:1px solid rgba(223,178,33,.4);
  color:#dfb221; border-radius:8px; font-size:1.2rem;
}

.lyrics-header { display:flex; gap:1.2rem; align-items:center; margin-bottom:.8rem; flex-wrap:wrap; }
.lyrics-cover { width:8.5rem; height:8.5rem; border-radius:12px; object-fit:cover; flex-shrink:0; }
.lyrics-header-info { min-width:0; flex:1; }
.lyrics-title { font-size:1.9rem; margin:0 0 .3rem; line-height:1.25; }

.lyrics-meta {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.3rem 1rem;
  color:#8b8fa8;
  font-size:1.2rem;
  font-weight:600;
}
.lyrics-subtitle { margin:0; }

.lyrics-hint { font-size:1.2rem; color:#8b8fa8; margin:1.4rem 0 1.2rem; }
.lyrics-intro { font-size:1.3rem; color:#8b8fa8; max-width:52rem; margin:0.6rem auto 0; }

.lyrics-columns-label { display:none; }

.lyrics-section-title {
  font-size:1.15rem; text-transform:uppercase; letter-spacing:.1em;
  color:#8b8fa8; margin:2.2rem 0 .8rem; font-weight:600;
}
.lyrics-section:first-child .lyrics-section-title { margin-top:1rem; }

.lyrics-line {
  display:flex; flex-direction:column; gap:.15rem;
  padding:.15rem 0;
}
.lyrics-orig { margin:0; font-size:1.55rem; line-height:1.55; }
.lyrics-it { margin:0; font-size:1.25rem; line-height:1.45; color:#8b8fa8; font-style:italic; }

/* Highlighted phrase with a citation / explanation note */
.lyric-note {
  background:rgba(22,141,84,.22);
  border-bottom:2px dotted #168d54;
  border-radius:3px;
  padding:0 .15em;
  cursor:pointer;
  color:inherit;
  font-style:normal;
}
.lyric-note:hover,
.lyric-note:focus-visible,
.lyric-note.is-active {
  background:rgba(22,141,84,.42);
  outline:none;
}
.lyric-note--sample { cursor:default; }

.lyrics-song-intro {
  flex-basis: 100%;
  margin-bottom: .9rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #c7c9dc;
  font-size: 1.2rem;
  line-height: 1.55;
}
.lyrics-song-intro p:first-child { margin-top: 0; }
.lyrics-song-intro p:last-child { margin-bottom: 0; }

.lyrics-index-list { display:flex; flex-direction:column; gap:.9rem; margin-top:1.8rem; }
.lyrics-demo-hint { margin-top:2.2rem; font-size:1.25rem; color:#8b8fa8; }
.lyrics-demo-hint a { font-weight:600; }

/* Popover shown when a highlighted phrase is tapped/clicked */
.lyric-popover {
  position:fixed;
  max-width:320px;
  background:#1e2030;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  padding:1.1rem 2.4rem 1.1rem 1.3rem;
  box-shadow:0 8px 30px rgba(0,0,0,.45);
  z-index:50;
  font-size:1.3rem;
  line-height:1.5;
}
.lyric-popover[hidden] { display:none; }
.lyric-popover-text { margin:0; }
.lyric-popover-close {
  position:absolute; top:.3rem; right:.6rem;
  background:none; border:none; color:#8b8fa8; font-size:1.8rem;
  cursor:pointer; line-height:1; padding:.3rem;
}
.lyric-popover-close:hover { color:#f0ede8; }

/* Desktop: original and translation side by side */
@media screen and (min-width:700px) {
  .lyrics-container { max-width:920px; }

  .lyrics-cover { width:11rem; height:11rem; }

  .lyrics-columns-label {
    display:flex; justify-content:space-between;
    color:#8b8fa8; text-transform:uppercase; letter-spacing:.08em;
    font-size:1.1rem; margin-bottom:.5rem; font-weight:600;
  }
  .lyrics-columns-label span { width:48%; }

  .lyrics-line { flex-direction:row; align-items:flex-start; gap:2%; }
  .lyrics-orig, .lyrics-it { width:49%; flex-shrink:0; margin-top:.1rem; }
  .lyrics-it { border-left:1px solid rgba(255,255,255,.08); padding-left:1.3rem; font-size:1.3rem; }

  .lyric-popover { position:absolute; }
}

/* Small phones: popover becomes a comfortable bottom sheet */
@media screen and (max-width:480px) {
  .lyric-popover {
    left:1rem !important;
    right:1rem;
    bottom:1rem !important;
    top:auto !important;
    max-width:none;
  }
}

/* Small embedded player (YouTube / Spotify / SoundCloud / plain audio) —
   sits top-right of the header, level with the cover art and title, and
   simply wraps onto its own (right-aligned) line on narrow screens since
   .lyrics-header already wraps. */
.lyrics-header-player {
  margin: .5rem 0 0;
  width: 100%;
  max-width: 260px;
}

.lyrics-player-embed {
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.lyrics-player-embed--youtube,
.lyrics-player-embed--generic {
  aspect-ratio: 16 / 9;
}
.lyrics-player-embed--spotify { max-width: 280px; height: 80px; }
.lyrics-player-embed--soundcloud { max-width: 280px; height: 120px; }

.lyrics-player-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.lyrics-player-audio {
  width: 100%;
  max-width: 260px;
  height: 2.6rem;
  display: block;
}

/* Audio-only "no video" widget for a YouTube source: a hidden YouTube
   player (via the official IFrame API) driven by a small play/pause
   button + progress bar, so only audio is heard, never a video frame. */
.lyrics-player-yt-audio {
  position: relative;
  display: flex;
  align-items: center;
  gap: .8rem;
  background: #1e2030;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  padding: .5rem .9rem .5rem .5rem;
  max-width: 260px;
}
.yt-audio-toggle {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: #168d54;
  color: #fff;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.yt-audio-toggle:hover { opacity: .85; }
.yt-audio-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.yt-audio-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f0ede8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yt-audio-progress {
  height: .4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.yt-audio-progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: #168d54;
  border-radius: 999px;
}
/* The actual YouTube iframe: present in the DOM (so it keeps playing) but
   visually hidden — never shown, never taking up layout space. */
.yt-audio-iframe-mount {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
