/*==============================================================
	POEZII RECITATE
==============================================================*/

/*---------- lista ----------*/
.poezii-hero {
  position: relative;
  margin-top: 70px;
  padding: 50px 0 40px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,85,165,0.28) 0%, rgba(255,85,165,0) 55%),
    radial-gradient(ellipse at 90% 100%, rgba(120,90,255,0.2) 0%, rgba(120,90,255,0) 55%),
    #1c1b22;
}
.poezii-hero .container { position: relative; z-index: 1; }
.poezii-hero .page-hero__title { margin-top: 14px; }
/* unda decorativa care "respira" in fundal */
.poezii-hero__waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
}
.poezii-hero__waves i {
  width: 6px;
  height: 20%;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #ff55a5 0%, rgba(255,85,165,0.1) 100%);
  animation: poezii-wave 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.13s);
}
@keyframes poezii-wave {
  0%, 100% { height: 14%; }
  50% { height: 85%; }
}
.poezii-search {
  display: block;
  max-width: 640px;
  margin-top: 22px;
}
.poezii-search input { height: 54px; }

.poezii-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.poezii-filters__label {
  width: 70px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8d8d96;
}
.poezii-filters .film-chip b { margin-left: 4px; opacity: 0.7; }
.poezii-filters .film-chip.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #ff5860 0%, #ff55a5 100%);
}

.poezii-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.poezie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 20px;
  border-radius: 18px;
  color: #c7c7c7;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255,85,165,0.14) 0%, rgba(255,85,165,0) 60%),
    #26262c;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.poezie-card.is-video {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(120,90,255,0.18) 0%, rgba(120,90,255,0) 60%),
    #26262c;
}
.poezie-card:hover {
  color: #c7c7c7;
  transform: translateY(-6px);
  border-color: rgba(255,85,165,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.45);
}
.poezie-card__top { display: flex; justify-content: space-between; align-items: center; }
.poezie-card__type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff8cc2;
}
.poezie-card.is-video .poezie-card__type { color: #a99bff; }
.poezie-card__type svg { width: 16px; height: 16px; fill: currentColor; }
.poezie-card__time { font-size: 13px; font-variant-numeric: tabular-nums; color: #8d8d96; }
/* mini-unda: se misca la hover, ca si cum ar canta */
.poezie-card__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 46px;
  margin: 14px 0 8px;
}
.poezie-card__wave i {
  flex: 1;
  height: var(--h);
  border-radius: 2px;
  background-color: rgba(255,85,165,0.45);
  transition: background-color 0.3s ease;
}
.poezie-card.is-video .poezie-card__wave i { background-color: rgba(169,155,255,0.45); }
.poezie-card:hover .poezie-card__wave i {
  background-color: #ff55a5;
  animation: poezii-bar 0.9s ease-in-out infinite alternate;
  animation-delay: var(--d);
}
.poezie-card.is-video:hover .poezie-card__wave i { background-color: #a99bff; }
@keyframes poezii-bar {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1.1); }
}
.poezie-card__play {
  position: absolute;
  right: 18px;
  top: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5860 0%, #ff55a5 100%);
  box-shadow: 0 8px 22px rgba(255,85,165,0.5);
  opacity: 0;
  transform: scale(0.6) rotate(-30deg);
  transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.poezie-card__play svg { width: 20px; height: 20px; margin-left: 3px; fill: #fff; }
.poezie-card:hover .poezie-card__play { opacity: 1; transform: none; }
.poezie-card__title {
  font-family: Georgia, Cambria, 'Palatino Linotype', 'Book Antiqua', 'DejaVu Serif', 'Liberation Serif', serif;
  font-size: 22px;
  line-height: 1.25;
  color: #fff;
}
.poezie-card__author { font-size: 14px; color: #ff8cc2; }
.poezie-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.poezie-card__tags em { font-style: normal; font-size: 12px; color: #8d8d96; }
.poezii-grid--small .poezie-card { padding: 16px; }
.poezii-grid--small .poezie-card__title { font-size: 18px; margin-top: 10px; }

/*---------- pagina poeziei ----------*/
.poem-hero {
  position: relative;
  margin-top: 70px;
  padding: 44px 0 30px;
  overflow: hidden;
  background-color: #1c1b22;
}
.poem-hero__glow {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,85,165,0.25) 0%, rgba(255,85,165,0) 35%),
    radial-gradient(circle at 70% 60%, rgba(120,90,255,0.2) 0%, rgba(120,90,255,0) 35%);
  animation: poem-glow 18s ease-in-out infinite alternate;
}
@keyframes poem-glow {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(25deg) scale(1.15); }
}
.poem-hero .container { position: relative; z-index: 1; }
.poem-hero__head { margin-top: 24px; }
.poem-hero__title {
  font-family: Georgia, Cambria, 'Palatino Linotype', 'Book Antiqua', 'DejaVu Serif', 'Liberation Serif', serif;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 10px;
}
.poem-hero__author { font-size: 18px; color: #c7c7c7; margin-bottom: 18px; }
.poem-hero__author a { color: #ff8cc2; }
.poem-hero__author span { color: #8d8d96; font-size: 15px; }
.poem-hero__chips { justify-content: flex-start; }
.poem-edit { height: 36px; padding: 0 14px; font-size: 12px; }

.poem-main { padding: 40px 0 60px; background-color: #1f1e25; }
.poem-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  max-width: 820px;
  margin: 0 auto;
}
/* la video: imaginea in stanga, textul in dreapta (pe ecrane late) */
@media (min-width: 1200px) {
  .poem-main.is-video .poem-layout {
    max-width: none;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }
  .poem-main.is-video .poem-stage { position: sticky; top: 90px; }
  .poem-main.is-video .poem-text-wrap { max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 10px; scrollbar-width: thin; }
}
.poem-main.no-text .poem-layout { max-width: 980px; }

.poem-video {
  border-radius: 16px;
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06);
}
.poem-video video { display: block; width: 100%; max-height: 72vh; background: #000; }

/* playerul audio: disc cu vizualizator + unda */
.poem-player {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 0% 50%, rgba(255,85,165,0.18) 0%, rgba(255,85,165,0) 60%),
    #26252d;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
}
@media (max-width: 640px) {
  .poem-player { flex-direction: column; padding: 20px; }
}
.poem-player__disc {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  height: 160px;
}
.poem-player__viz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.poem-player__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff5860 0%, #ff55a5 100%);
  box-shadow: 0 12px 34px rgba(255,85,165,0.55);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.poem-player__play:hover { transform: scale(1.08); }
.poem-player__play svg { width: 34px; height: 34px; fill: #fff; }
.poem-player__play .i-play { margin-left: 5px; }
.poem-player .i-pause,
.poem-mini .i-pause { display: none; }
.is-playing .poem-player__play .i-play,
.is-playing .poem-mini__play .i-play { display: none; }
.is-playing .poem-player__play .i-pause,
.is-playing .poem-mini__play .i-pause { display: block; }
/* inainte de prima redare, butonul pulseaza discret */
.poem-player:not(.is-started) .poem-player__play { animation: poem-pulse 2.2s ease-out infinite; }
@keyframes poem-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,85,165,0.6), 0 12px 34px rgba(255,85,165,0.55); }
  70% { box-shadow: 0 0 0 22px rgba(255,85,165,0), 0 12px 34px rgba(255,85,165,0.55); }
  100% { box-shadow: 0 0 0 0 rgba(255,85,165,0), 0 12px 34px rgba(255,85,165,0.55); }
}
.poem-player__body { flex: 1; min-width: 0; width: 100%; }
.poem-player__wave {
  position: relative;
  height: 90px;
  cursor: pointer;
  outline: none;
}
.poem-player__wave canvas { width: 100%; height: 100%; display: block; }
.poem-player__wave:focus-visible { box-shadow: 0 0 0 2px rgba(255,85,165,0.6); border-radius: 8px; }
.poem-player__hover {
  position: absolute;
  top: -26px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #fff;
  background-color: #1b1b20;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.poem-player__wave:hover .poem-player__hover { opacity: 1; }
.poem-player__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.poem-player__time { font-size: 14px; font-variant-numeric: tabular-nums; color: #8d8d96; }
.poem-player__time b { color: #fff; font-weight: 500; }
.poem-player__tools { display: flex; align-items: center; gap: 6px; }
.poem-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  margin: 0;
  border-radius: 8px;
  font-size: 13px;
  color: #c7c7c7;
  background-color: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transition: 0.2s ease;
}
.poem-tool:hover { color: #fff; border-color: rgba(255,85,165,0.5); }
.poem-tool svg { width: 16px; height: 16px; fill: currentColor; }
.poem-tool--vol input { width: 70px; accent-color: #ff55a5; }

/* textul poeziei */
.poem-text {
  padding: 10px 0;
  font-family: Georgia, Cambria, 'Palatino Linotype', 'Book Antiqua', 'DejaVu Serif', 'Liberation Serif', serif;
  font-size: 22px;
  line-height: 1.75;
  color: #d9d9e0;
  text-align: center;
}
.poem-main.is-video .poem-text { text-align: left; font-size: 20px; }
.poem-strofa { margin-bottom: 1.2em; }
.vers {
  margin: 0;
  padding: 2px 10px;
  border-radius: 8px;
  /* fundalul versului trece repede la urmatorul; marirea si estomparea raman line */
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, background-color 0.25s ease;
}
/* karaoke: versurile care nu se recita acum sunt estompate; cel curent e marit si luminat */
.poem-text.is-karaoke.is-active .vers { opacity: 0.38; cursor: pointer; }
.poem-text.is-karaoke .vers { cursor: pointer; }
.poem-text.is-karaoke .vers:hover { background-color: rgba(255,255,255,0.03); }
.poem-text.is-karaoke.is-active .vers.is-past { opacity: 0.6; }
.poem-text.is-karaoke .vers.is-current {
  opacity: 1;
  transform: scale(1.06);
  background-color: rgba(255,85,165,0.07);
}
/* culoarea "curge" pe fiecare cuvant rostit (--p de la 0 la 1, pus din poezii.js) */
.poem-text.is-karaoke .cuv {
  --p: 0;
  background-image: linear-gradient(90deg, #ff6fb4 0%, #ffd1e6 calc(var(--p) * 100%), currentColor calc(var(--p) * 100%));
  -webkit-background-clip: text;
  background-clip: text;
}
.poem-text.is-karaoke.is-active .cuv { color: rgba(217,217,224,0.95); -webkit-text-fill-color: transparent; }
.poem-text.is-karaoke .vers.is-current .cuv.is-on { text-shadow: 0 0 18px rgba(255,85,165,0.35); }
.poem-note { margin-top: 10px; text-align: center; font-size: 13px; color: #8d8d96; }
.poem-hidden-text {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  background-color: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.12);
}
.poem-hidden-text svg { width: 26px; height: 26px; fill: #8d8d96; flex-shrink: 0; }
.poem-hidden-text p { margin: 0; font-size: 15px; }

/* mini-player: apare jos cand playerul mare iese din ecran */
.poem-mini {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, calc(100% - 32px));
  padding: 10px 16px 10px 10px;
  border-radius: 40px;
  background-color: rgba(30,29,36,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,85,165,0.3);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  transform: translate(-50%, 140%);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.poem-mini.is-visible { transform: translate(-50%, 0); }
.poem-mini__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff5860 0%, #ff55a5 100%);
}
.poem-mini__play svg { width: 18px; height: 18px; fill: #fff; }
.poem-mini__play .i-play { margin-left: 3px; }
.poem-mini__title { flex: 1; min-width: 0; font-family: Georgia, serif; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poem-mini__title small { font-family: 'Open Sans', sans-serif; font-size: 12px; color: #ff8cc2; margin-left: 6px; }
.poem-mini__progress { width: 90px; height: 4px; border-radius: 2px; background-color: rgba(255,255,255,0.1); overflow: hidden; }
.poem-mini__progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff5860 0%, #ff55a5 100%); }

.poem-more { background-color: #1c1b22; }

@media (prefers-reduced-motion: reduce) {
  .poezii-hero__waves i, .poem-hero__glow, .poem-player__play, .poezie-card:hover .poezie-card__wave i { animation: none; }
  .vers { transition: none; }
}
/* video fara text: imaginea centrata, pe toata latimea */
@media (min-width: 1200px) {
  .poem-main.is-video.no-text .poem-layout { grid-template-columns: minmax(0, 1fr); }
  .poem-main.is-video.no-text .poem-stage { position: static; }
}
/* textul aliniat la stanga (langa video): versul curent se mareste din marginea stanga,
   ca sa nu iasa din coloana si sa nu-i fie taiata prima litera */
.poem-main.is-video .vers { transform-origin: 0 50%; }
.poem-main.is-video .poem-text.is-karaoke .vers.is-current { transform: scale(1.04); }
@media (min-width: 1200px) {
  .poem-main.is-video .poem-text-wrap { padding-left: 6px; padding-right: 18px; overflow-x: hidden; }
}
