/* Antena web player - zajednički stilovi (mobile + desktop) */
:root {
  --a-pink: #ff0079;
  --a-orange: #ff6833;
  --a-live: #c8003f;
  --a-brand-gradient: linear-gradient(81.43deg, var(--a-pink) 6.84%, var(--a-orange) 93.16%);
  --a-text: #000;
  --a-text-2: #4f4c4a;
  --a-text-3: #767270;
  --a-line: #edeae8;
  --a-list-bg: #faf8f7;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: "Poppins", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
p, h1, h2, ol { margin: 0; padding: 0; }
img { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--a-brand-gradient); }
.deco { position: absolute; z-index: -1; pointer-events: none; animation: lebdi-a 4.8s ease-in-out infinite; }
.deco img { height: auto; transform: rotate(var(--rot)); }
.deco--b { animation-name: lebdi-b; animation-delay: -1.9s; }
.deco--c { animation-delay: -3.1s; }
@keyframes lebdi-a { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(6deg); } }
@keyframes lebdi-b { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(10px) rotate(-6deg); } }

.tagline { font-weight: 500; letter-spacing: 0.88px; color: rgba(255,255,255,.85); white-space: nowrap; }

.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px; background: #fff;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,.18));
  font-weight: 600; font-size: 10px; letter-spacing: .8px; color: var(--a-live); white-space: nowrap;
}
.live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(80deg, var(--a-pink), var(--a-orange)); }

.station-name { font-weight: 900; color: #fff; }

/* ---------- Kanali (do 8) ---------- */
.chan {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 0; min-height: 40px; padding: 0 8px; border-radius: 999px;
  font-weight: 600; font-size: 11px; letter-spacing: .6px; text-decoration: none;
  white-space: nowrap; overflow: hidden; transition: background .2s, color .2s, border-color .2s;
}
.chan--live::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Kartica: logo <-> cover (flip svakih 5 s) ---------- */
.card { position: relative; perspective: 1300px; flex: 0 0 auto; }
.card__inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.45,.15,.2,1); }
.card.is-cover .card__inner { transform: rotateY(180deg); }
.card__face {
  position: absolute; inset: 0; overflow: hidden; border-radius: 28px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 18px 36px rgba(70,0,35,.35);
}
.card__face--logo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(140deg, var(--a-orange) 0%, var(--a-pink) 100%);
  border: 3px solid rgba(255,255,255,.9);
}
.card__face--logo .card__star { position: absolute; height: auto; }
.card__face--logo .card__star--1 { right: -18%; bottom: -15%; width: 78%; opacity: .22; transform: rotate(-14deg); }
.card__face--logo .card__star--2 { left: -9%; top: -7%; width: 33%; opacity: .14; transform: rotate(18deg); }
.card__logo { position: relative; width: 70%; height: auto; }
.card__freq { position: relative; font-weight: 600; font-size: 11px; letter-spacing: 1.6px; color: rgba(255,255,255,.92); }
.card__face--cover { transform: rotateY(180deg); background: #24182f; }
.card__face--cover img { width: 100%; height: 100%; object-fit: cover; }
.card__face--cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.58)); }
.card__caption { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; color: #fff; }
.card__caption span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__caption .t { font-weight: 600; font-size: 14px; }
.card__caption .a { font-size: 11px; opacity: .88; }

.dots { display: flex; gap: 6px; }
.dots span { display: block; width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); transition: width .3s, background .3s; }
.dots span.is-on { width: 18px; background: #fff; }

/* ---------- Play gumb ---------- */
.play { position: relative; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.play__pulse { position: absolute; inset: 0; border-radius: 50%; opacity: 0; pointer-events: none; }
.play__pulse--inner { background: rgba(255,255,255,.28); }
.play__pulse--outer { background: rgba(255,255,255,.14); }
.play__inner { position: absolute; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.play__icon--pause { display: none; }
.is-playing .play__icon--pause { display: block; }
.is-playing .play__icon--play { display: none; }

@keyframes puls { 0% { transform: scale(.55); opacity: 1; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes beat { 0%,100% { transform: scale(1); } 10% { transform: scale(1.04); } 21% { transform: scale(1); } }
.is-playing .play__pulse { animation: puls 2.4s cubic-bezier(.2,.6,.3,1) infinite; }
.is-playing .play__pulse--outer { animation-delay: .5s; }
.is-playing .play__inner { animation: beat 2.4s ease-out infinite; }
@keyframes loading { 50% { opacity: .55; } }
.is-loading .play__inner img { animation: loading 1s ease-in-out infinite; }

/* ---------- Sada svira ---------- */
.now { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 18px; border-radius: 20px; background: #fff; filter: drop-shadow(0 8px 10px rgba(0,0,0,.14)); }
.now__label { font-weight: 600; font-size: 10px; letter-spacing: 1.2px; color: #d6006a; }
.now__line { max-width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wave { display: flex; align-items: center; gap: 2px; height: 18px; }
.wave span { display: block; width: 3px; height: var(--h); border-radius: 2px; background: var(--a-pink); }
@keyframes wave { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.35); } }
.is-playing .wave span { animation: wave .9s ease-in-out infinite; }
.is-playing .wave span:nth-child(3n) { animation-duration: .7s; }
.is-playing .wave span:nth-child(3n+1) { animation-duration: 1.1s; }
.is-playing .wave span:nth-child(2n) { animation-delay: -.3s; }
.is-playing .wave span:nth-child(5n) { animation-delay: -.6s; }

/* ---------- Sviralo prije (10) ---------- */
.hist__title { font-weight: 600; color: var(--a-text); padding-bottom: 8px; }
.hist__list { list-style: none; }
.hist__item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--a-line); }
.hist__time { flex: 0 0 42px; font-size: 12px; color: var(--a-text-3); }
.hist__meta { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.hist__song, .hist__artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist__song { font-weight: 500; font-size: 13px; color: var(--a-text); }
.hist__artist { font-size: 11px; color: var(--a-text-2); }
.hist__dur { font-size: 12px; color: var(--a-text-3); white-space: nowrap; }

/* ---------- Banneri ---------- */
.ad { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad > * { max-width: 100%; }
.ad--top { margin: 0 auto; max-height: 280px; } /* 970x250, slot drži do 280 px visine */
.banner-footer {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; justify-content: center; padding: 8px 16px;
  background: rgba(255,255,255,.95); box-shadow: 0 -6px 20px rgba(0,0,0,.08);
}
/* Placeholder dok nema pravog oglasa (makni klasu .ad--ph kad se ubaci kod oglasa) */
.ad--ph { border: 1px dashed rgba(255,255,255,.6); border-radius: 10px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); font-weight: 600; font-size: 11px; letter-spacing: 1px; text-align: center; }
.banner-footer .ad--ph { border-color: #cfc9c5; background: #f3f0ee; color: #767270; }

/* ---------- Developed by V ---------- */
.credit { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--a-text-2); opacity: .3; transition: opacity .2s; }
.credit:hover, .credit:focus-within { opacity: .8; }
.credit a { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
.credit img { width: 20px; height: 20px; }

/* Tab skriven -> animacije stoje */
.is-hidden *, .is-hidden *::before, .is-hidden *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .deco, .play__pulse, .play__inner, .wave span, .play__inner img { animation: none !important; }
  .card__inner { transition: none; }
}
