/* Rainbow Player — same visual language as rainbow-radio.co.uk */

:root {
  --purple: #9900ff;
  --purple-dark: #7a00d0;
  --purple-soft: #f4e9ff;
  --blue: #1b2fd6;
  --ink: #14151a;
  --copy: #41454e;
  --muted: #71757f;
  --bg: #ffffff;
  --soft: #f5f6fa;
  --line: #e4e6ed;
  --line-strong: #d3d6e0;
  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1140px;
  --display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 30px rgba(16, 24, 40, .07);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .14);
}

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

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

body.rp {
  margin: 0;
  background: var(--bg);
  color: var(--copy);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.rp-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------- header */

.rp-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.rp-top::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), #ffd23f, var(--blue));
}

.rp-top-inner {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px 0 14px;
}

.rp-brand { display: flex; align-items: center; gap: 11px; }
.rp-brand img { border-radius: 9px; }
.rp-brand span { display: grid; line-height: 1.15; }
.rp-brand strong { font-family: var(--display); font-size: 17.5px; color: var(--ink); letter-spacing: -.01em; }
.rp-brand em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}

.rp-site-nav { display: flex; gap: 20px; margin-left: 8px; }
.rp-site-nav a { font-size: 14px; font-weight: 500; color: var(--copy); }
.rp-site-nav a:hover { color: var(--purple); }

.rp-tabs {
  margin-left: auto;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
}
.rp-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.rp-tabs button:hover { color: var(--purple); }
.rp-tabs button.is-active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 6px 16px rgba(153, 0, 255, .24);
}

/* ---------------------------------------------------------------- layout */

.rp-main {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
  padding: 30px 0 60px;
}

.rp-panel[hidden] { display: none; }

.rp-hero {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: center;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, #f8f0ff, #eef1ff 70%);
  box-shadow: var(--shadow);
}

.rp-cover { position: relative; }
.rp-cover img {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #fff;
  box-shadow: var(--shadow-lg);
  background: var(--purple-soft);
}

.rp-on-air {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffe9f3;
  border: 1px solid #ffc2dd;
  color: #c4006c;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.rp-on-air i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e6007a;
  animation: rp-pulse 1.8s ease-in-out infinite;
}
@keyframes rp-pulse { 50% { opacity: .35; } }

.rp-eyebrow {
  margin: 0 0 8px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--purple-dark);
}

.rp-now h1 {
  font-size: clamp(28px, 4.2vw, 44px);
  margin: 0 0 8px;
}

.rp-sub { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

.rp-show {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  max-width: 470px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .04);
}
.rp-show img { width: 54px; height: 54px; object-fit: cover; border-radius: 9px; }
.rp-show div { display: grid; gap: 2px; min-width: 0; }
.rp-show span { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.rp-show em { font-style: normal; color: var(--muted); font-size: 12.5px; }

.rp-controls { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.rp-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--purple);
  box-shadow: 0 10px 24px rgba(153, 0, 255, .3);
  transition: background .15s ease, transform .15s ease;
}
.rp-play:hover { background: var(--purple-dark); transform: translateY(-1px); }
.rp-play:active { transform: scale(.97); }

.rp-volume { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.rp-volume input { width: 112px; accent-color: var(--purple); }

.rp-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple-dark);
  border-bottom: 1px solid rgba(153, 0, 255, .3);
  padding-bottom: 2px;
}

.rp-status { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); min-height: 18px; }

/* ---------------------------------------------------------------- ads */

.rp-ad-slot { margin: 26px 0; display: flex; justify-content: center; }

.rp-ad {
  display: block;
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
  box-shadow: var(--shadow);
}
.rp-ad img { display: block; width: 100%; max-height: 180px; object-fit: cover; }

.rp-ad-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  background: rgba(20, 21, 26, .78);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- lower */

.rp-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 22px;
  margin-top: 26px;
}

.rp-last, .rp-about {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rp-last h2, .rp-about h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.rp-last ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.rp-last li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 6px;
  border-radius: 11px;
  border-bottom: 1px solid var(--line);
}
.rp-last li:last-child { border-bottom: 0; }
.rp-last li:hover { background: var(--soft); }

.rp-lp-art {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
  background: var(--purple-soft) url('/assets/logo.jpg') center / 60% no-repeat;
  border: 1px solid var(--line);
}
.rp-lp-art img { width: 100%; height: 100%; object-fit: cover; }

.rp-lp-copy { display: grid; gap: 1px; min-width: 0; }
.rp-lp-artist { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-lp-title { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rp-about p { color: var(--copy); font-size: 14px; line-height: 1.65; margin: 0 0 10px; }
.rp-about a { color: var(--purple-dark); font-weight: 600; }
.rp-muted { color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- podcasts */

.rp-panel-head { margin: 4px 0 22px; }
.rp-panel-head h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 6px; }

.rp-podcast-player {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
  border: 1px solid #e2ccff;
  background: var(--purple-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 22px;
}
.rp-podcast-player[hidden] { display: none; }
.rp-podcast-player h2 { margin: 0; font-size: 17px; }
.rp-podcast-player audio, .rp-podcast-player video { width: min(520px, 100%); }

.rp-episodes { display: grid; gap: 12px; }

.rp-episode {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .05);
  transition: box-shadow .15s ease, transform .15s ease;
}
.rp-episode:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.rp-episode img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--soft); }

.rp-episode-copy { min-width: 0; }
.rp-episode-show {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--purple-dark);
  font-weight: 700;
}
.rp-episode h3 { margin: 3px 0 6px; font-size: 16px; line-height: 1.3; }
.rp-episode p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rp-btn {
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 9px 18px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.rp-btn:hover { background: var(--purple); border-color: var(--purple); color: #fff; }
.rp-btn-small { padding: 8px 15px; font-size: 12.5px; }

.rp-empty {
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  background: var(--soft);
}

/* ---------------------------------------------------------------- footer */

.rp-footer { background: #14151b; color: #c8cbd4; margin-top: 10px; }

.rp-footer-inner {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 24px 40px;
  align-items: center;
  padding: 34px 0 26px;
}

.rp-footer-brand { display: flex; align-items: center; gap: 12px; }
.rp-footer-brand img { border-radius: 9px; }
.rp-footer-brand strong { display: block; color: #fff; font-family: var(--display); font-size: 15.5px; }
.rp-footer-brand span { color: #a5a9b5; font-size: 12.5px; }

.rp-footer-links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; }
.rp-footer-links a:hover { color: #fff; }

.rp-copy {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 16px;
  margin-top: 4px;
  color: #8b8f9c;
  font-size: 12px;
}

/* ---------------------------------------------------------------- pre-roll */

.rp-preroll {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 12, 18, .82);
  backdrop-filter: blur(6px);
}
.rp-preroll[hidden] { display: none; }

.rp-preroll-card {
  position: relative;
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .5);
}
.rp-preroll-card video { width: 100%; border-radius: 10px; display: block; }
.rp-preroll-card audio { width: 100%; margin: 18px 0; display: block; }
.rp-preroll-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px 2px; color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .rp-site-nav { display: none; }
}

@media (max-width: 860px) {
  .rp-hero { grid-template-columns: 1fr; text-align: center; }
  .rp-cover { max-width: 260px; margin: 0 auto; }
  .rp-show { margin-left: auto; margin-right: auto; text-align: left; }
  .rp-controls { justify-content: center; }
  .rp-lower { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .rp-top-inner { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .rp-tabs { margin-left: 0; width: 100%; justify-content: center; }
  .rp-tabs button { flex: 1; }
  .rp-episode { grid-template-columns: 68px minmax(0, 1fr); }
  .rp-episode img { width: 68px; height: 68px; }
  .rp-episode .rp-btn { grid-column: 2; justify-self: start; }
  .rp-footer-inner { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- podcast catalogue */

.rp-tabs a {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  white-space: nowrap;
}
.rp-tabs a:hover { color: var(--purple); }
.rp-tabs a.is-active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 6px 16px rgba(153, 0, 255, .24);
}

.rp-pod-hero { padding: 4px 0 0; }
.rp-pod-hero h1 { font-size: clamp(32px, 4.4vw, 46px); margin-bottom: 8px; }

.rp-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  max-width: 560px;
}
.rp-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-size: 14.5px;
  background: #fff;
  color: var(--ink);
}
.rp-search input:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
.rp-search-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.rp-rail { margin: 32px 0; }
.rp-rail[hidden] { display: none; }
.rp-rail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.rp-rail-head h2 { font-size: 21px; }
.rp-rail-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.rp-rail-nav { display: flex; gap: 6px; flex: none; }
.rp-rail-nav button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
}
.rp-rail-nav button:hover { background: var(--purple); border-color: var(--purple); color: #fff; }

.rp-rail-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px 2px 8px;
}
.rp-rail-track::-webkit-scrollbar { display: none; }

.rp-pod-card {
  flex: 0 0 196px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.rp-pod-card[hidden] { display: none; }
.rp-pod-art { display: block; }
.rp-pod-art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--soft);
  transition: box-shadow .15s ease, transform .15s ease;
}
.rp-pod-card:hover .rp-pod-art img { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rp-pod-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rp-pod-body strong {
  font-family: var(--display);
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rp-pod-body em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-pod-cats { display: flex; gap: 4px; flex-wrap: wrap; }

.rp-chip {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--purple-soft);
  color: var(--purple-dark);
  border-radius: 999px;
  padding: 3px 9px;
}
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.rp-all { margin-top: 40px; }
.rp-pod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px 18px; }
.rp-pod-grid .rp-pod-card { flex: none; }

/* ---------------------------------------------------------------- podcast show */

.rp-back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple-dark);
}
.rp-back:hover { color: var(--purple); }

.rp-show-hero {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, #f8f0ff, #eef1ff 75%);
  box-shadow: var(--shadow);
}
.rp-show-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #fff;
  box-shadow: var(--shadow-lg);
  background: var(--soft);
}
.rp-show-info h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 2px 0 6px; }
.rp-show-desc { margin: 12px 0 16px; max-width: 70ch; font-size: 14px; color: var(--copy); }
.rp-btn-play { background: var(--purple); border-color: var(--purple); color: #fff; }
.rp-btn-play:hover { background: var(--purple-dark); border-color: var(--purple-dark); }

.rp-episodes { margin-top: 34px; display: grid; gap: 12px; }
.rp-podcast-now { min-width: 0; }

@media (max-width: 760px) {
  .rp-show-hero { grid-template-columns: 1fr; }
  .rp-show-cover { max-width: 220px; }
  .rp-pod-card { flex-basis: 168px; }
  .rp-pod-hero h1 { font-size: 34px; }
}

