:root {
  --gold-1: #ffd24d;
  --gold-2: #ffb400;
  --bg: #111114;
  --card: #1a1a1f;
  --accent: #ff2222;
  --glass: rgba(255, 255, 255, 0.04);
  --muted: #cfd3d8;
  --shadow: 0 8px 30px rgba(3, 3, 6, 0.6);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background: radial-gradient(
      1200px 500px at 10% 10%,
      rgba(255, 210, 77, 0.06),
      transparent
    ),
    linear-gradient(180deg, #0f0f13 0%, #0a0a0d 100%);
  background-attachment: fixed;
  color: var(--muted);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.container {
  width: min(980px, 95%);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 540px 1fr;
  gap: 24px;
  align-items: start;
  min-width: 415px;
}

.radio-card {
  background: linear-gradient(
    180deg,
    rgba(255, 180, 20, 0.06),
    rgba(255, 180, 20, 0.02)
  );
  border-radius: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 180, 20, 0.12);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.8), transparent),
    conic-gradient(from 0.63turn at 10%, white -60deg, #222 230deg);
  padding: 10px 10px;
  border-radius: 10px;
  box-shadow: 0px 0px 8px 1px rgba(255, 255, 255, 0.8);
  width: 315px;
  align-self: center;
}
.pokeball {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
  flex: 0 0 56px;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.25),
    0 6px 18px rgba(0, 0, 0, 0.35);
  background: linear-gradient(#ff2222 50%, white 50%);
  border: 3px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
  transition: transform 500ms ease-in-out;
}
.pokeball::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  background: #333;
  transform: translateY(-50%);
}
.pokeball .center {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #333;
  z-index: 2;
}

h1 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--gold-1);
  letter-spacing: 0.6px;
  text-align: center;
}

h1 small {
  font-size: 0.5rem;
  display: block;
}
p.lead {
  margin: 0;
  font-size: 0.4rem;
  color: var(--muted);
  text-align: right;
  display: inline;
}

.now-playing-wrap {
  margin-top: 6px;
  padding: 12px;
  border-radius: 12px;
  background: var(--glass);
  display: flex;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.now-playing-waffle {
  position: absolute;
  width: calc(100% - 40px);
  margin-inline: 8px;
  text-align: center;
  backdrop-filter: blur(6px);
  height: 80%;
  border-radius: 10px;
  justify-content: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  transition: opacity 240ms ease-in-out;
}
#now-playing-box {
  font-weight: 600;
  color: #fff;
}

.controls {
  display: flex;
  margin-top: 8px;
  flex-direction: column;
  align-items: center;
  background: var(--glass);
  justify-content: center;
  border-radius: 12px;
  gap: 6px;
  padding-block: 12px;
}
.control-options {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 10px;
}

/* Volume Slider */
.volume-container {
  -webkit-appearance: none;
  height: 40px;
  background: var(--card);
  box-shadow: 0 0 5px white;
  border: solid 1px var(--card);
  outline: none;
  transition: 0.2s;
  margin-left: -45px;
  padding-left: 45px;
  border-radius: 20px 3px 3px 20px;
  box-sizing: content-box;
}

.volume-slider {
  -webkit-appearance: none;
  width: 105px;
  height: 100%;
  background: linear-gradient(159deg, transparent 48%, var(--gold-2) 50%);
  margin: 0;
  outline: none;
  transition: 0.2s;
  border-radius: 0 3px 3px 0;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 5px;
  height: 45px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 3px black;
  cursor: pointer;
  transition: transform 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scaleX(1.2);
}
.btn {
  display: flex;
  padding: 0;
  border-radius: 100%;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  color: rgba(10, 10, 10, 0.5);
  transition: transform 0.14s ease, opacity 0.12s ease;
  height: 30px;
  width: 30px;
  text-align: center;
  font-size: 25px;
  justify-content: center;
  align-items: flex-end;
  z-index: 1;
}
.btn:active {
  transform: translateY(2px);
}
.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 600;
}
.btn[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

/* Visualizer canvas */
.visualizer-wrap {
  width: 100%;
  border-radius: 12px;
  padding: 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
}
canvas#visualizer {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(11, 11, 16, 0.6),
    rgba(11, 11, 16, 0.3)
  );
}

@keyframes bounce {
  0% {
    transform: scaleY(0.25);
  }
  50% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(0.25);
  }
}

.program {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.01),
    rgba(255, 255, 255, 0.02)
  );
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.program h2 {
  margin: 0;
  color: var(--gold-2);
  text-align: center;
  margin-bottom: 10px;
}
.program ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  text-align: center;
}
.program ul li {
  background: rgba(0, 0, 0, 0.25);
  margin-block: 5px;
  padding: 5px;
  border-radius: 10px;
  box-shadow: 0 0 3px rgba(10, 10, 10, 0.8);
  transition: scale 240ms ease-in-out;
}
.program ul li.running {
  background: var(--gold-2);
  color: #222;
  text-shadow: 0 0 3px var(--gold-1), 0 0 3px var(--muted);
  font-weight: 500;
  scale: 1.05;
}

#info-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--glass);
  border-radius: 10px;
  margin-top: 25px;
  padding-block: 20px;
  gap: 20px;
}

#radio-person-name-info {
  color: var(--gold-2);
  text-shadow: 0 1px 0 var(--accent), 0 2px 0 var(--bg);
  margin: 0;
}

#radio-person-img-info,
#radio-person-img-info-back {
  border-radius: 100%;
  height: 150px;
  aspect-ratio: 1;
  justify-self: center;
  box-shadow: 1px 1px var(--bg), -1px -1px var(--muted), 3px 3px 3px var(--bg);
  -webkit-user-drag: element;
  position: absolute;
  filter: blur(0) brightness(1);
  transition: filter 350ms ease-in;
}

.swap #radio-person-img-info,
.swap #radio-person-img-info-back {
  filter: blur(2px) brightness(0.4);
  transition: filter 300ms ease-out;
}

#radio-person-img-info-back {
  transform: translateZ(-1px) rotateY(180deg);
}
#radio-person-img-info-wrapper {
  position: relative;
  border-radius: 100%;
  height: 150px;
  justify-self: center;
  aspect-ratio: 1;
  transition: transform 350ms ease-in;
  perspective: 3000px;
  transform-style: preserve-3d;
  animation: coin-land 180ms cubic-bezier(0.17, 0.84, 0.44, 1);
  animation-fill-mode: none;
  animation-delay: 351ms;
}

#radio-person-img-info-wrapper.swap {
  transform: scale(1.5) translateZ(500px) rotateY(520deg);
  transition: transform 300ms ease-out;
  animation: dummy 0.1ms;
  animation-fill-mode: none;
}

@keyframes coin-land {
  0% {
    transform: scale(0.56) rotateZ(0deg) rotateX(30deg);
    opacity: 0.98;
  }
  36% {
    /* impact moment - over-scale to create squash */
    transform: scale(1.12) rotateZ(0deg) rotateX(22deg);
    opacity: 1;
  }
  52% {
    /* bounce back up a little */
    transform: scale(0.94) rotateZ(0deg) rotateX(14deg);
  }
  72% {
    /* smaller rebound */
    transform: scale(1.04) rotateZ(0deg) rotateX(6deg);
  }
  88% {
    /* approaching rest */
    transform: scale(0.995) rotateZ(0deg) rotateX(2deg);
  }
  100% {
    /* final settled coin - flat */
    transform: scale(1) rotateZ(0deg) rotateX(0deg);
  }
}

@keyframes dummy {
  0%,
  100% {
    opacity: 1;
  }
}

#sponsors {
  background: var(--glass);
  width: 100%;
  aspect-ratio: 3 / 1;
  border-radius: 5px;
  padding: 5px;
}

#sponsors a {
  background-color: var(--bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  width: 100%;
  aspect-ratio: 3 / 1;
  border-radius: 5px;
  display: block;
  transition: background-image 200ms ease-in-out;
}

#sponsors a.ad1 {
  background-image: url(./assets/img/ads/ad_pokemon_center.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  width: 100%;
  aspect-ratio: 3 / 1;
  border-radius: 5px;
  display: block;
}

#sponsors a.ad2 {
  background-image: url(./assets/img/ads/ad_johto_travels.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  width: 100%;
  aspect-ratio: 3 / 1;
  border-radius: 5px;
  display: block;
}

#radio-person-desc-info {
  border-radius: 10px;
  background: var(--glass);
  width: 90%;
  justify-self: center;
  padding: 10px;
  font-size: 14px;
  hyphens: auto;
  text-align: justify;
  min-height: 140px;
}

.radio-bubble {
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 10px 7px;
  margin-top: 36px;
  border-radius: 4px;
  z-index: 15;
  width: 520px;
  justify-self: center;
  pointer-events: none;
  transform: translateY(0);
  font-weight: 600;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial;
  opacity: 1;
  transition: opacity 300ms ease, transform 300ms ease;
}
.radio-bubble.show {
  opacity: 1;
}
.bubble-person {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd24d, #ffb400);
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.12);
  flex: 0 0 46px;
}
.bubble {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  padding: 10px;
  border-radius: 12px;
  flex: 1;
}
.bubble-text {
  display: block;
  color: #fff;
  font-weight: 600;
}

.radio-bubble .bubble {
  overflow: hidden;
  width: 500px;
  position: relative;
}
.radio-bubble .bubble-text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  --par-width: attr(data-par-width px);
}
.radio-bubble .bubble-text.scroller {
  animation: scroll-left linear infinite;
  animation-delay: 1500ms;
}
.radio-bubble .bubble-person {
  position: absolute;
  backdrop-filter: blur(6px);
  left: 30px;
  top: -25%;
  background: rgba(255, 255, 255, 0.85);
  border: solid 5px rgba(10, 10, 10, 0.85);
  color: #222;
  padding: 5px 12px;
  padding-left: 25px;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  font-size: 10px;
  height: auto;
  width: auto;
}
#radio-person-img {
  width: 40px;
  aspect-ratio: 1;
  border-radius: 100%;
  backdrop-filter: blur(6px);
  position: absolute;
  top: -8.5px;
  left: -26px;
  border: solid 5px rgba(10, 10, 10, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
#now-playing {
  display: block;
  color: white;
  position: absolute;
  top: -14px;
  font-size: 12px;
  right: 10px;
  background: inherit;
  padding: 5px;
  border: solid 4px;
  border-radius: 5px;
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
  width: 220px;
  text-align: center;
  height: 32px;
  transition: opacity 240ms ease, width 240ms ease;
}
#now-playing:empty {
  opacity: 0;
  width: 0;
}
@keyframes scroll-left {
  0%,
  25% {
    transform: translateX(0%);
  }
  75%,
  100% {
    transform: translateX(calc(-100% + var(--par-width)));
  }
}

.meta {
  font-size: 0.55rem;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

.tiny {
  font-size: 0.8rem;
  color: #aeb3b9;
}

@media (max-width: 1100px) {
  body {
    align-items: flex-start;
    padding:0;
  }
  .container {
    grid-template-columns: 1fr;
  }

  .program {
    overflow: auto;
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .bubble-box {
    overflow: overlay;
    height: 70px;
    position: relative;
  }

  .bubble-box > .radio-bubble {
    scale: 0.6;
  }

  .radio-bubble {
    width: auto;
    position: absolute;
    top: -25px;
    left: -85px;
  }

  .bubble.bubble {
    width: 375px;
  }
}
