/* ===== Radio Jashn – colours taken from the logo ===== */
:root {
  --plum-900: #14071c;
  --plum-800: #1c0b26;
  --plum-700: #2a1238;
  --plum-500: #4a1f5c;
  --berry: #b0184e;
  --magenta: #d62f6b;
  --orange: #f07a2e;
  --gold: #f7b733;
  --text: #fff7f0;
  --muted: rgba(255, 240, 230, .66);
  --glass: rgba(255, 255, 255, .06);
  --glass-border: rgba(255, 255, 255, .12);
  --grad: linear-gradient(135deg, var(--plum-500) 0%, var(--berry) 38%, var(--orange) 75%, var(--gold) 100%);
  --grad-warm: linear-gradient(135deg, var(--magenta), var(--orange) 60%, var(--gold));
  --disc: clamp(210px, 64vw, 300px);
  --play: 92px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(120% 80% at 50% 0%, var(--plum-700) 0%, var(--plum-800) 45%, var(--plum-900) 100%);
  background-color: var(--plum-800);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* ===== Ambient background ===== */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .45;
  animation: drift 18s ease-in-out infinite alternate;
}
.b1 { width: 70vmax; height: 70vmax; left: -30vmax; top: -30vmax; background: var(--berry); }
.b2 { width: 55vmax; height: 55vmax; right: -25vmax; bottom: -20vmax; background: var(--orange); opacity: .28; animation-delay: -6s; }
.b3 { width: 40vmax; height: 40vmax; left: 30%; top: 40%; background: var(--plum-500); opacity: .5; animation-delay: -12s; }
@keyframes drift {
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
}

/* ===== App shell ===== */
.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 460px;
  min-height: 100vh; min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(14px + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    calc(14px + env(safe-area-inset-bottom))
    calc(20px + env(safe-area-inset-left));
  gap: 14px;
}

/* ===== Top bar ===== */
.topbar {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .3s, border-color .3s;
}
.live-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff4d6d;
  box-shadow: 0 0 0 0 rgba(255, 77, 109, .6);
}
[data-state="playing"] .live-pill { background: rgba(214, 47, 107, .22); border-color: rgba(214, 47, 107, .5); }
[data-state="playing"] .live-pill .dot { animation: pulse-dot 1.6s infinite; }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, .7); }
  70% { box-shadow: 0 0 0 9px rgba(255, 77, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); }
}

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .2s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn.small { width: 40px; height: 40px; flex: none; }
@media (hover: hover) { .icon-btn:hover { background: rgba(255, 255, 255, .12); } }

/* ===== Logo disc ===== */
.stage { flex: 1 1 auto; display: grid; place-items: center; width: 100%; min-height: calc(var(--disc) + 40px); }
.disc { position: relative; width: var(--disc); height: var(--disc); }
.disc-inner {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #fff6ee 70%, #ffe9d9 100%);
  display: grid; place-items: center;
  padding: 14%;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .06),
    0 24px 60px -12px rgba(0, 0, 0, .6),
    0 0 80px -10px rgba(214, 47, 107, .55);
  transition: transform .6s var(--ease), box-shadow .6s;
}
.disc-inner img { width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
[data-state="playing"] .disc-inner { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

.ring {
  position: absolute; inset: -14px; border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg, var(--plum-500), var(--berry), var(--orange), var(--gold), var(--berry), var(--plum-500));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55;
}
.ring.r2 { inset: -28px; opacity: 0; padding: 2px; }
[data-state="playing"] .ring.r1 { opacity: 1; animation: spin 8s linear infinite; }
[data-state="playing"] .ring.r2 { animation: ripple 2.6s ease-out infinite; }
[data-state="loading"] .ring.r1 { opacity: .9; animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple {
  0% { transform: scale(.92); opacity: .7; }
  100% { transform: scale(1.12); opacity: 0; }
}

/* ===== Info ===== */
.info { text-align: center; width: 100%; min-height: 92px; }
.status {
  margin: 0 0 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title {
  margin: 0;
  font-size: clamp(22px, 6.4vw, 28px); font-weight: 700; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.subtitle { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* ===== Equalizer ===== */
.eq {
  display: flex; align-items: flex-end; justify-content: center; gap: 4px;
  height: 34px; width: 100%;
}
.eq span {
  width: 4px; height: 100%; border-radius: 4px;
  background: var(--grad-warm);
  transform-origin: bottom; transform: scaleY(.12);
  transition: transform .4s var(--ease);
}
[data-state="playing"] .eq span { animation: eq 1s ease-in-out infinite alternate; }
.eq span:nth-child(3n)   { animation-duration: .8s !important; }
.eq span:nth-child(3n+1) { animation-duration: 1.15s !important; }
.eq span:nth-child(4n)   { animation-delay: -.3s; }
.eq span:nth-child(5n)   { animation-delay: -.6s; }
.eq span:nth-child(2n)   { animation-delay: -.45s; }
@keyframes eq {
  0% { transform: scaleY(.15); }
  50% { transform: scaleY(.9); }
  100% { transform: scaleY(.35); }
}

/* ===== Controls ===== */
.controls { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; }

.play {
  position: relative;
  width: var(--play); height: var(--play); border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad);
  box-shadow: 0 14px 34px -8px rgba(214, 47, 107, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .25s var(--ease), box-shadow .25s;
  touch-action: manipulation;
}
.play:active { transform: scale(.93); }
@media (hover: hover) { .play:hover { transform: scale(1.05); box-shadow: 0 18px 44px -8px rgba(240, 122, 46, .75); } }
.play:focus-visible, .icon-btn:focus-visible, .install:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.play .ico { width: 40px; height: 40px; fill: #fff; position: absolute; transition: opacity .2s, transform .3s var(--ease); }
.ico-play { transform: translateX(2px); }
.ico-pause { opacity: 0; transform: scale(.6); }
[data-state="playing"] .ico-play, [data-state="loading"] .ico-play { opacity: 0; transform: scale(.6); }
[data-state="playing"] .ico-pause, [data-state="loading"] .ico-pause { opacity: 1; transform: scale(1); }
[data-state="loading"] .ico-pause { opacity: .55; }

.spinner {
  position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px);
  opacity: 0; transition: opacity .2s;
}
.spinner circle {
  fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 80 220;
  transform-origin: 50% 50%;
}
[data-state="loading"] .spinner { opacity: 1; }
[data-state="loading"] .spinner circle { animation: spin 1s linear infinite; }

.volume {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 300px;
}
.volume .vol-off { display: none; }
.volume.muted .vol-on { display: none; }
.volume.muted .vol-off { display: block; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 28px; background: transparent; cursor: pointer;
  --val: 80%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, var(--magenta), var(--orange) var(--val), rgba(255, 255, 255, .16) var(--val));
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .16); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--magenta), var(--orange)); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%; margin-top: -7px;
  background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}

.timer {
  margin: -4px 0 0; font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: .06em;
  opacity: 0; transition: opacity .3s;
}
[data-state="playing"] .timer { opacity: 1; }

/* ===== Install ===== */
.install {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  background: var(--glass); border: 1px solid var(--glass-border);
  transition: background .2s, transform .2s var(--ease);
}
.install svg { width: 18px; height: 18px; fill: var(--gold); }
.install:active { transform: scale(.96); }
@media (hover: hover) { .install:hover { background: rgba(255, 255, 255, .12); } }

/* ===== WhatsApp ===== */
.whatsapp {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px 12px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: #fff; text-decoration: none;
  background: #25d366;
  box-shadow: 0 10px 26px -10px rgba(37, 211, 102, .7);
  transition: transform .2s var(--ease), background .2s;
  touch-action: manipulation;
}
.whatsapp svg { width: 24px; height: 24px; fill: #fff; flex: none; }
.whatsapp:active { transform: scale(.96); }
.whatsapp:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
@media (hover: hover) { .whatsapp:hover { background: #1ebe5b; transform: translateY(-1px); } }

.foot .credit { margin-top: 6px; }
.foot a {
  color: var(--gold); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(247, 183, 51, .4);
  padding: 4px 0;
}
@media (hover: hover) { .foot a:hover { color: #ffd27a; border-bottom-color: #ffd27a; } }
.foot a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.foot { margin-top: auto; text-align: center; font-size: 12px; color: rgba(255, 240, 230, .45); }
.foot p { margin: 4px 0 0; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  max-width: calc(100% - 40px);
  padding: 12px 18px; border-radius: 14px;
  background: rgba(20, 7, 28, .92); border: 1px solid var(--glass-border);
  font-size: 14px; text-align: center;
  opacity: 0; pointer-events: none; z-index: 20;
  transition: opacity .25s, transform .25s var(--ease);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== iOS sheet ===== */
.sheet {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(10, 3, 14, .6);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.sheet-card {
  width: 100%; max-width: 420px;
  background: var(--plum-700); border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 20px; font-size: 15px; line-height: 1.55;
  animation: up .3s var(--ease);
}
.sheet-card p { margin: 0 0 10px; }
.kbd { padding: 1px 8px; border-radius: 6px; background: rgba(255, 255, 255, .12); font-weight: 600; white-space: nowrap; }
.sheet-close {
  width: 100%; margin-top: 6px; padding: 12px; border-radius: 12px;
  background: var(--grad); font-weight: 600;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }

/* ===== Responsive ===== */
/* Short phones (landscape or small screens) */
@media (max-height: 640px) {
  :root { --disc: clamp(150px, 34vh, 220px); --play: 78px; }
  .app { gap: 10px; }
  .info { min-height: 0; }
  .eq { height: 26px; }
  .timer { display: none; }
  .stage { min-height: calc(var(--disc) + 24px); }
}
@media (max-height: 480px) and (orientation: landscape) {
  .app {
    max-width: 820px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "top top" "stage info" "stage eq" "stage controls" "stage wa" "stage install" "foot foot";
    align-items: center; column-gap: 32px; row-gap: 8px;
  }
  .topbar { grid-area: top; }
  .stage { grid-area: stage; min-height: 0; padding: 30px; }
  .info { grid-area: info; min-height: 0; }
  .eq { grid-area: eq; }
  .controls { grid-area: controls; flex-direction: row; justify-content: center; }
  .install { grid-area: install; justify-self: center; }
  .whatsapp { grid-area: wa; justify-self: center; padding: 9px 18px 9px 14px; }
  .foot { grid-area: foot; }
  .timer { display: none; }
  :root { --disc: 52vh; --play: 70px; }
}

/* Tablets & desktop – glass card */
@media (min-width: 768px) and (min-height: 700px) {
  body { display: grid; place-items: center; padding: 32px; }
  .app {
    min-height: auto;
    padding: 28px 36px 24px;
    border-radius: 32px;
    background: rgba(28, 11, 38, .55);
    border: 1px solid var(--glass-border);
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    gap: 18px;
  }
  .stage { padding: 30px 0 14px; }
  :root { --disc: 280px; --play: 96px; }
  .foot { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
