/*
 * Radiovipfm Music
 * ================
 *
 * Paleta porneste din logo: galbenul #FECE21 al castilor si al ".ro".
 * Fundalul e un negru cu urma de albastru-cerneala, nu gri neutru - galbenul
 * iese mult mai puternic pe el.
 *
 * Elementul care da caracter paginii e spectrul audio din bara de jos: bare
 * care se misca dupa sunetul care chiar canta, nu o animatie facuta sa para
 * asa. Restul e tinut linistit, ca sa nu se bata cu el.
 */

/* ============================================================ variabile == */
:root {
  /* din logo */
  --brand:      #FECE21;
  --brand-hi:   #FFDD5C;
  --brand-deep: #D9A800;
  --brand-ink:  #17120A;               /* text pe galben */

  /* fundaluri */
  --bg:      #0A0C11;
  --bg-2:    #0E1117;
  --surface: #13161E;
  --raised:  #191D27;
  --line:    #222733;
  --hair:    rgba(255, 255, 255, .07);

  /* text */
  --text:  #F4F5F7;
  --mid:   #9AA0AC;
  --dim:   #666D7A;

  --glow: rgba(254, 206, 33, .16);

  --sans:    'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', var(--sans);

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;

  --side-w: 280px;
  --bar-h:  92px;

  --ease:  cubic-bezier(.4, 0, .2, 1);
  --sprng: cubic-bezier(.34, 1.4, .64, 1);
}

/* ================================================================ baza == */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Lumina difuza de fundal - da adancime fara sa incarce */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(760px 420px at 12% -8%,  rgba(254, 206, 33, .07), transparent 62%),
    radial-gradient(680px 380px at 92% 4%,   rgba(96, 130, 255, .05), transparent 60%);
}

body.has-bar { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

h1, h2, h3 { margin: 0; font-weight: 600; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; top: -100px; left: 14px; z-index: 100;
  padding: 11px 18px; background: var(--brand); color: var(--brand-ink);
  border-radius: var(--r); font-weight: 700;
}
.skip:focus { top: 14px; }

.dot {
  display: inline-block; width: 3px; height: 3px;
  margin: 0 8px; vertical-align: middle;
  border-radius: 50%; background: var(--dim);
}

/* ---------------------------------------------------------- bara laterala */
.side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: min(86vw, var(--side-w));
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 16px calc(var(--bar-h) + 26px);
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 42%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  transform: translateX(-100%);
  transition: transform .3s var(--ease);
}
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

body.menu-open .side { transform: translateX(0); }

.scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(0, 0, 0, .66);
  backdrop-filter: blur(3px);
  animation: fade .2s var(--ease);
}

@keyframes fade { from { opacity: 0; } }

.menu-btn {
  position: fixed; top: 14px; left: 14px; z-index: 65;
  display: grid; place-content: center; gap: 5px;
  width: 44px; height: 44px;
  background: rgba(19, 22, 30, .9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.menu-btn span {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .25s var(--sprng), opacity .2s var(--ease);
}
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------- logo ----- */
.brand {
  position: relative;
  padding: 4px 0 2px 54px;
}

.brand::after {
  content: '';
  position: absolute;
  left: 40px; top: 50%;
  width: 190px; height: 78px;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, var(--glow), transparent 74%);
  pointer-events: none;
  z-index: -1;
}

.brand-logo {
  width: 100%;
  max-width: 196px;
  height: auto;
}

/* statistici */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }

.stat {
  padding: 11px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: center;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.stat:hover { border-color: rgba(254, 206, 33, .34); transform: translateY(-2px); }

.stat b {
  display: block;
  font-family: var(--display);
  font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  color: var(--brand);
}
.stat span {
  font-size: 9.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim);
}

/* cautare */
.search { position: relative; }

.search input {
  width: 100%;
  padding: 12px 13px 12px 38px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 14px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  appearance: none;
}
.search input::placeholder { color: var(--dim); }
.search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(254, 206, 33, .1);
  outline: none;
}
.search input::-webkit-search-cancel-button { filter: invert(.6); cursor: pointer; }

.search-icon {
  position: absolute; left: 14px; top: 50%;
  width: 13px; height: 13px;
  margin-top: -8px;
  border: 2px solid var(--dim);
  border-radius: 50%;
  pointer-events: none;
  transition: border-color .18s var(--ease);
}
.search-icon::after {
  content: ''; position: absolute;
  right: -5px; bottom: -4px;
  width: 6px; height: 2px;
  background: var(--dim);
  border-radius: 2px;
  transform: rotate(45deg);
  transition: background .18s var(--ease);
}
.search:focus-within .search-icon { border-color: var(--brand); }
.search:focus-within .search-icon::after { background: var(--brand); }

.side-label {
  margin: 0;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim);
}

/* categorii */
.cats { display: flex; flex-direction: column; gap: 3px; }

.cat {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--mid);
  font-size: 14px;
  overflow: hidden;
  transition: color .18s var(--ease), background .18s var(--ease);
}

/* indicatorul din stanga creste din centru cand devine activ */
.cat::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 3px; height: 0;
  transform: translateY(-50%);
  background: var(--brand);
  border-radius: 0 3px 3px 0;
  transition: height .28s var(--sprng);
}

.cat:hover { background: var(--raised); color: var(--text); }
.cat:hover::before { height: 40%; background: var(--dim); }

.cat.is-on {
  background: linear-gradient(90deg, rgba(254, 206, 33, .14), rgba(254, 206, 33, .03));
  color: var(--text);
  font-weight: 600;
}
.cat.is-on::before { height: 62%; background: var(--brand); }

.cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cat-num {
  flex: none;
  padding: 2px 8px;
  background: rgba(255, 255, 255, .05);
  border-radius: 999px;
  font-family: var(--display);
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--dim);
  transition: all .18s var(--ease);
}
.cat.is-on .cat-num {
  background: rgba(254, 206, 33, .18);
  color: var(--brand-hi);
}

/* ------------------------------------------------------------ continut -- */
.main { padding: 74px 14px 30px; }

/* Continutul intra cu o miscare scurta la fiecare navigare */
.main > * { animation: rise .34s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: .04s; }
.main > *:nth-child(3) { animation-delay: .08s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

body.is-loading .main { opacity: .4; transition: opacity .15s var(--ease); }

.head { margin-bottom: 20px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 0 6px;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: '';
  width: 16px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.head-title {
  font-family: var(--display);
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.05;
}

.head-meta {
  margin: 8px 0 0;
  font-size: 13px; color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.clear-search { color: var(--brand); font-weight: 500; }
.clear-search:hover { color: var(--brand-hi); text-decoration: underline; }

.head-controls {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}

.sort-group {
  display: flex; gap: 3px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chip {
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: var(--mid);
  transition: all .18s var(--ease);
}
.chip:hover { color: var(--text); }
.chip.is-on {
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 3px 12px rgba(254, 206, 33, .26);
}

.per-page select {
  padding: 8px 30px 8px 14px;
  background: var(--surface) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239AA0AC' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 9px center / 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--mid);
  appearance: none; cursor: pointer;
  transition: border-color .18s var(--ease);
}
.per-page select:hover { border-color: rgba(254, 206, 33, .34); color: var(--text); }
.per-page select:focus { border-color: var(--brand); outline: none; }

/* --------------------------------------------------------------- grila -- */
.grid { display: grid; grid-template-columns: 1fr; gap: 9px; }

.card {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s var(--ease),
              background .2s var(--ease), box-shadow .2s var(--ease);
}

/* luciu diagonal care traverseaza cardul la hover */
.card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .05) 50%, transparent 62%);
  transform: translateX(-100%);
  transition: transform .6s var(--ease);
  pointer-events: none;
}
.card:hover::after { transform: translateX(100%); }

.card:hover {
  background: var(--raised);
  border-color: rgba(254, 206, 33, .26);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .34);
}

.card.is-current {
  border-color: rgba(254, 206, 33, .5);
  background: linear-gradient(100deg, rgba(254, 206, 33, .11), var(--raised) 58%);
}

/* buton play */
.card-play {
  position: relative;
  flex: none;
  display: grid; place-content: center;
  width: 46px; height: 46px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all .22s var(--sprng);
}
.card:hover .card-play {
  border-color: var(--brand);
  color: var(--brand);
  transform: scale(1.06);
}
.card-play:active { transform: scale(.94); }

.card.is-current .card-play {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 0 0 4px rgba(254, 206, 33, .16);
}

.icon-play, .icon-pause { display: block; }

.icon-play {
  width: 0; height: 0;
  margin-left: 3px;
  border-left: 12px solid currentColor;
  border-top: 7.5px solid transparent;
  border-bottom: 7.5px solid transparent;
}

.icon-pause {
  display: none;
  width: 12px; height: 14px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.card.is-playing .card-play .icon-play  { display: none; }
.card.is-playing .card-play .icon-pause { display: block; }

/* barele care se vad cand cardul canta */
.bars {
  display: none;
  position: absolute; inset: 0;
  align-items: flex-end; justify-content: center;
  gap: 2.5px; padding-bottom: 14px;
}
.bars i {
  width: 3px; background: var(--brand-ink); border-radius: 2px;
  animation: eq .85s ease-in-out infinite;
}
.bars i:nth-child(1) { height: 8px;  animation-delay: -.4s; }
.bars i:nth-child(2) { height: 15px; animation-delay: -.2s; }
.bars i:nth-child(3) { height: 11px; }

@keyframes eq {
  0%, 100% { transform: scaleY(.35); }
  50%      { transform: scaleY(1); }
}

/* text */
.card-body { flex: 1; min-width: 0; }

.card-title {
  font-size: 14.5px; font-weight: 500;
  letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card.is-current .card-title { color: var(--brand-hi); font-weight: 600; }

.card-meta {
  margin: 3px 0 0;
  font-size: 11.5px; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-genre { transition: color .16s var(--ease); }
.card-genre:hover { color: var(--brand); }

/* descarcare */
.card-dl {
  flex: none;
  display: grid; place-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--dim);
  opacity: 0;
  transition: all .18s var(--ease);
}
.card:hover .card-dl { opacity: 1; }
.card-dl:hover { background: rgba(255, 255, 255, .07); color: var(--brand); }
.card-dl:focus-visible { opacity: 1; }

.icon-dl {
  position: relative;
  width: 13px; height: 13px;
  border-bottom: 2px solid currentColor;
}
.icon-dl::before {
  content: ''; position: absolute;
  left: 5px; top: -1px;
  width: 2px; height: 8px;
  background: currentColor;
}
.icon-dl::after {
  content: ''; position: absolute;
  left: 2.5px; top: 3px;
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

/* ----------------------------------------------------------- gol/eroare - */
.empty {
  padding: 70px 22px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty-mark {
  font-size: 46px; color: var(--line);
  margin-bottom: 12px;
  animation: float 3.4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.empty h3 {
  font-family: var(--display); font-size: 21px;
  letter-spacing: -.02em; margin-bottom: 7px;
}
.empty p { margin: 0 0 18px; color: var(--dim); font-size: 14px; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  background: var(--brand); color: var(--brand-ink);
  border-radius: var(--r); font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 16px rgba(254, 206, 33, .24);
  transition: all .2s var(--ease);
}
.btn:hover {
  background: var(--brand-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(254, 206, 33, .32);
}
.btn:active { transform: translateY(0); }

/* ------------------------------------------------------------ paginare -- */
.pager {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 5px; margin-top: 26px;
}

.page-btn {
  min-width: 38px; height: 38px;
  display: grid; place-content: center;
  padding: 0 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--display);
  font-size: 13px; font-variant-numeric: tabular-nums;
  color: var(--mid);
  transition: all .18s var(--ease);
}
.page-btn:hover {
  border-color: rgba(254, 206, 33, .4);
  color: var(--text);
  transform: translateY(-2px);
}
.page-btn.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(254, 206, 33, .26);
}

.page-gap { display: grid; place-content: center; width: 26px; color: var(--dim); }

/* ================================================== bara de redare ====== */
.bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 70;
  background: rgba(14, 17, 23, .82);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  animation: slideUp .38s var(--sprng);
}

@keyframes slideUp { from { transform: translateY(100%); } }

/* linia de lumina de sus, care se aprinde cu muzica */
.bar::before {
  content: '';
  position: absolute; inset: -1px 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: calc(.18 + var(--level, 0) * .8);
  transition: opacity .12s linear;
}

/* bara de progres, lipita de marginea de sus */
.bar-progress { position: relative; height: 4px; }

.bar-progress input[type="range"] {
  position: absolute; inset: 0;
  width: 100%; height: 4px;
  margin: 0;
  border-radius: 0;
}

.bar-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "now   extras"
    "ctl   ctl";
  align-items: center;
  gap: 6px 12px;
  padding: 9px 13px 11px;
  max-width: 1700px;
  margin: 0 auto;
}

/* ---------------------------------------------------- spectrul audio ---- */
.now {
  grid-area: now;
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}

.viz {
  position: relative;
  flex: none;
  width: 46px; height: 46px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
body.is-playing .viz {
  border-color: rgba(254, 206, 33, .4);
  box-shadow: 0 0 calc(8px + var(--level, 0) * 20px) rgba(254, 206, 33, calc(.16 + var(--level, 0) * .34));
}

.viz canvas { display: block; width: 100%; height: 100%; }

/* daca browserul nu ne da spectrul, cad inapoi pe barele animate din CSS */
.viz-fallback {
  display: none;
  position: absolute; inset: 0;
  align-items: flex-end; justify-content: center;
  gap: 3px; padding: 0 0 13px;
}
body.no-viz .viz canvas { display: none; }
body.no-viz .viz-fallback { display: flex; }

.viz-fallback i {
  width: 3px; height: 8px;
  background: var(--dim); border-radius: 2px;
}
body.no-viz.is-playing .viz-fallback i {
  background: var(--brand);
  animation: eq .85s ease-in-out infinite;
}
body.no-viz.is-playing .viz-fallback i:nth-child(1) { animation-delay: -.5s; }
body.no-viz.is-playing .viz-fallback i:nth-child(2) { animation-delay: -.3s; }
body.no-viz.is-playing .viz-fallback i:nth-child(3) { animation-delay: -.1s; }
body.no-viz.is-playing .viz-fallback i:nth-child(4) { animation-delay: -.65s; }

/* titlul care curge daca e prea lung */
.now-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }

.now-title-wrap { overflow: hidden; }

.now-text strong {
  display: block;
  font-size: 14px; font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.now-text strong.is-long {
  text-overflow: clip;
  animation: marquee 15s linear infinite;
}
@keyframes marquee {
  0%, 12%   { transform: translateX(0); }
  88%, 100% { transform: translateX(calc(-100% + 190px)); }
}

.now-text small {
  font-size: 11px; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ------------------------------------------------------------ butoane -- */
.controls {
  grid-area: ctl;
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
}

.ctl {
  position: relative;
  display: grid; place-content: center;
  border-radius: 50%;
  color: var(--mid);
  transition: color .16s var(--ease), background .16s var(--ease),
              transform .18s var(--sprng);
}
.ctl:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.ctl:active { transform: scale(.9); }
.ctl.is-on { color: var(--brand); }

.ctl-sm { width: 38px; height: 38px; }

.ctl-main {
  width: 48px; height: 48px;
  margin: 0 6px;
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 4px 18px rgba(254, 206, 33, .3);
}
.ctl-main:hover {
  background: var(--brand-hi); color: var(--brand-ink);
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(254, 206, 33, .42);
}
.ctl-main:active { transform: scale(.95); }
.ctl-main .icon-pause { display: none; }
body.is-playing .ctl-main .icon-play  { display: none; }
body.is-playing .ctl-main .icon-pause { display: block; }

/* iconite desenate din CSS, fara librarii */
.icon-prev, .icon-next {
  position: relative;
  width: 0; height: 0;
  border-top: 6.5px solid transparent;
  border-bottom: 6.5px solid transparent;
}
.icon-prev { border-right: 10px solid currentColor; }
.icon-next { border-left:  10px solid currentColor; }
.icon-prev::after, .icon-next::after {
  content: ''; position: absolute; top: -6.5px;
  width: 2.5px; height: 13px; background: currentColor; border-radius: 1px;
}
.icon-prev::after { left: -13px; }
.icon-next::after { right: -13px; }

.icon-shuffle {
  position: relative; width: 16px; height: 12px;
}
.icon-shuffle::before, .icon-shuffle::after {
  content: ''; position: absolute; left: 0;
  width: 16px; height: 2px;
  background: currentColor; border-radius: 2px;
}
.icon-shuffle::before { top: 1px; transform: rotate(21deg); }
.icon-shuffle::after  { top: 9px; transform: rotate(-21deg); }

.icon-repeat {
  position: relative;
  width: 16px; height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
  border-left-color: transparent;
}
.icon-repeat::after {
  content: ''; position: absolute;
  left: -3px; top: 1px;
  width: 4px; height: 4px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.ctl.is-one::after {
  content: '1';
  position: absolute; right: 5px; bottom: 4px;
  font-family: var(--display);
  font-size: 9px; font-weight: 700;
  color: var(--brand);
}

/* ------------------------------------------------------------- extras -- */
.extras {
  grid-area: extras;
  display: flex; align-items: center; gap: 12px;
  justify-self: end;
}

.time {
  font-family: var(--display);
  font-size: 11.5px; color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.time b { color: var(--text); font-weight: 600; }

.vol { display: flex; align-items: center; gap: 6px; }

.icon-vol, .icon-mute {
  position: relative;
  width: 0; height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 8px solid currentColor;
}
.icon-vol::after {
  content: ''; position: absolute;
  left: 2px; top: -4.5px;
  width: 6px; height: 9px;
  border-right: 2px solid currentColor;
  border-radius: 0 7px 7px 0;
}
.icon-mute { display: none; }
.icon-mute::after {
  content: ''; position: absolute;
  left: 1px; top: -1px;
  width: 11px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: rotate(-45deg);
}
body.is-muted .icon-vol  { display: none; }
body.is-muted .icon-mute { display: block; }
body.is-muted [data-mute] { color: var(--brand); }

/* slidere */
input[type="range"] {
  --fill: 0%;
  height: 5px;
  background: linear-gradient(to right,
    var(--brand) 0%, var(--brand) var(--fill),
    var(--line) var(--fill), var(--line) 100%);
  border-radius: 999px;
  appearance: none;
  cursor: pointer;
  transition: height .15s var(--ease);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 13px; height: 13px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .5);
  opacity: 0;
  transition: opacity .16s var(--ease), transform .16s var(--sprng);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.25); }

input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px;
  background: #fff; border: 0; border-radius: 50%;
  opacity: 0;
  transition: opacity .16s var(--ease);
}
input[type="range"]:hover::-moz-range-thumb { opacity: 1; }

.bar-progress:hover input[type="range"] { height: 6px; }

[data-volume] { width: 84px; }

/* pe telefon volumul se face din butoanele fizice */
.vol [data-volume] { display: none; }

/* ============================================== ecrane medii (tableta) == */
@media (min-width: 720px) {

  .main { padding: 74px 24px 34px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
  .head-controls { margin-top: 0; }

  .bar-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "now ctl extras";
    padding: 11px 20px 13px;
  }

  .vol [data-volume] { display: block; }
}

/* ================================================= ecrane mari (desktop) = */
@media (min-width: 1024px) {

  .menu-btn, .scrim { display: none; }

  .side {
    position: fixed;
    width: var(--side-w);
    transform: none;
  }

  .brand { padding-left: 4px; }
  .brand::after { left: 0; }
  .brand-logo { max-width: 210px; }

  .app { padding-left: var(--side-w); }

  .main { padding: 34px 34px 44px; max-width: 1560px; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 11px; }

  .bar { left: var(--side-w); }

  .bar-inner {
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
    padding: 12px 26px 14px;
  }

  [data-volume] { width: 96px; }
}

@media (min-width: 1440px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1840px) { .grid { grid-template-columns: repeat(5, 1fr); } }

/* ==================================================== preferinte user == */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .card::after { display: none; }
}

@media print {
  .side, .bar, .menu-btn, .pager { display: none; }
  .app { padding: 0; }
  body { background: #fff; color: #000; }
}

/* ------------------------------------------------------- retusuri mici -- */
/* .head-text vine din content.php - il lasam sa curga, tot ce e in el are
   deja stilurile lui (.eyebrow, .head-title, .head-meta). */
.head-text { min-width: 0; }
