/* =========================================================
   RADIOHOUSE
   ========================================================= */

:root {
  --cream: #f5ead5;
  --white: #ffffff;
  --muted: rgba(245, 234, 213, 0.62);
  --line: rgba(245, 234, 213, 0.22);
  --red: #ed183b;
  --yellow: #e6b74b;
  --blue-black: #07121a;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  
}

body {
  font-family: "DM Mono", monospace;
  color: var(--cream);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}


/* =========================================================
   MAIN APP
   ========================================================= */

.radiohouse {
  position: relative;
  isolation: isolate;

  width: 100vw;
  height: 100dvh;
  min-height: 560px;

  overflow: hidden;

  background: #07121a;
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.background {
  position: absolute;
  inset: -2%;

  z-index: -4;

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  

  transform: scale(1.035);

  transition:
    background-image 700ms ease,
    transform 1.2s ease;
}

.radiohouse.is-changing .background {
  transform: scale(1.08);
}





.grain {
  position: absolute;
  inset: -50%;

  z-index: 10;

  pointer-events: none;

  opacity: 0.055;

  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");

  transform: rotate(7deg);
}


/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
  position: absolute;

  z-index: 30;

  top: 22px;
  left: 24px;
  right: 24px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}


.station-meta {
  display: grid;
  gap: 8px;
}


#clock {
  color: var(--white);

  font-size: 24px;
  font-weight: 500;

  line-height: 1;
  letter-spacing: -0.04em;
}


.date {
  margin-top: -1px;

  color: rgba(245, 234, 213, 0.7);

  font-size: 10px;
  line-height: 1;

  letter-spacing: 0.15em;

  text-transform: uppercase;
}


.listeners {
  display: flex;
  align-items: center;

  gap: 8px;

  margin-top: 5px;

  color: var(--muted);

  font-size: 11px;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}


.live-dot {
  width: 8px;
  height: 8px;

  flex: 0 0 8px;

  border-radius: 50%;

  background: #15d88a;

  box-shadow:
    0 0 12px rgba(21, 216, 138, 0.65);
}


/* =========================================================
   PLAYLIST BUTTON
   ========================================================= */

.playlist-link {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-width: 112px;
  height: 40px;

  padding: 0 18px;

  border:
    1px solid
    rgba(245, 234, 213, 0.3);

  border-radius: 999px;

  color: var(--cream);

  background: rgba(5, 9, 11, 0.25);

  backdrop-filter: blur(12px);

  text-decoration: none;

  font-size: 11px;

  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}


.playlist-link:hover {
  border-color:
    rgba(245, 234, 213, 0.55);

  background:
    rgba(245, 234, 213, 0.08);

  transform: translateY(-1px);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  padding:
    90px 24px
    60px;
}


/* =========================================================
   REMOVE OLD TOP PLAY BUTTON
   ========================================================= */

.brand-mark {
  display: none !important;
}


/* =========================================================
   MAIN PLAYER
   ========================================================= */

.station-card {
  width: min(520px, 90vw);

  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;

  transform: translateY(2vh);
}


/* =========================================================
   RECORD
   ========================================================= */

.record-stage {
  position: relative;

  width: 118px;
  height: 118px;

  margin: 0 auto 21px;

  flex-shrink: 0;
}


.record-shadow {
  position: absolute;

  left: 8%;
  right: 8%;

  bottom: 0;

  height: 18%;

  border-radius: 50%;

  background: rgba(0, 0, 0, 0.65);

  filter: blur(12px);
}


.record {
  position: absolute;

  inset: 0;

  overflow: hidden;

  border-radius: 50%;

  background:
    radial-gradient(
      circle at center,
      #161616 0 7%,
      transparent 7.5%
    ),

    repeating-radial-gradient(
      circle at center,
      #0c0c0c 0 1px,
      #171717 2px 3px
    );

  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.5),

    inset 0 0 0 1px
      rgba(255, 255, 255, 0.08);

  animation:
    spin 12s linear infinite;

  animation-play-state: paused;
}


.record.is-playing {
  animation-play-state: running;
}


.record__art {
  position: absolute;

  inset: 12%;

  overflow: hidden;

  border-radius: 50%;

  background:
    center / cover no-repeat,
    linear-gradient(
      135deg,
      #273c43,
      #8f593d
    );

  box-shadow:
    inset 0 0 0 1px
      rgba(255, 255, 255, 0.18);
}


.record__art::after {
  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.2),
      transparent 38%,
      rgba(0, 0, 0, 0.22)
    );
}


.record__label {
  position: absolute;

  inset: 38%;

  z-index: 2;

  display: grid;

  place-content: center;

  gap: 1px;

  border:
    1px solid
    #c39a46;

  border-radius: 50%;

  background: #12100c;

  color: var(--cream);

  font-family: "DM Mono", monospace;

  font-size: 4px;

  letter-spacing: 0.1em;

  line-height: 1.1;
}


.record__label strong {
  font-size: 5px;
}


.record__hole {
  position: absolute;

  z-index: 3;

  top: 50%;
  left: 50%;

  width: 4px;
  height: 4px;

  transform:
    translate(-50%, -50%);

  border-radius: 50%;

  background: #e7dfce;

  box-shadow:
    0 0 0 2px #111;
}


/* =========================================================
   YOUTUBE PLAYER
   ========================================================= */

.youtube-player-shell {
  position: fixed;

  width: 300px;
  height: 300px;

  left: -10000px;
  top: 0;

  opacity: 0;

  pointer-events: none;
}


.youtube-player-shell iframe {
  width: 300px !important;
  height: 300px !important;

  border: 0;
}


/* =========================================================
   SONG INFORMATION
   ========================================================= */

.player-info {
  width: min(500px, 86vw);

  margin: 0 auto;
}


.track-line {
  display: flex;

  align-items: baseline;
  justify-content: center;

  width: 100%;

  gap: 7px;

  color:
    rgba(245, 234, 213, 0.58);

  font-family: "DM Mono", monospace;

  font-size: 10px;

  line-height: 1.2;

  white-space: nowrap;

  overflow: hidden;
}


.track-line strong {
  max-width: 58%;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  color: var(--white);

  font-size: 12px;

  font-weight: 500;
}


#songArtist {
  max-width: 30%;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}


/* =========================================================
   PROGRESS BAR
   ========================================================= */

.progress-row {
  display: flex;

  align-items: center;

  width: 100%;

  gap: 8px;

  margin-top: 10px;
}


.progress-track {
  position: relative;

  flex: 1;

  height: 2px;

  overflow: hidden;

  border-radius: 999px;

  background:
    rgba(245, 234, 213, 0.22);

  cursor: pointer;
}


.progress-fill {
  position: absolute;

  top: 0;
  left: 0;

  width: 0%;
  height: 100%;

  border-radius: inherit;

  background: var(--cream);

  transition: width 100ms linear;
}


.time {
  width: 28px;

  flex-shrink: 0;

  color:
    rgba(245, 234, 213, 0.42);

  font-family: "DM Mono", monospace;

  font-size: 7px;

  line-height: 1;

  font-variant-numeric:
    tabular-nums;
}


.current-time {
  text-align: right;
}


.duration {
  text-align: left;
}


/* =========================================================
   PLAYER CONTROLS
   ========================================================= */

.controls {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 28px;

  margin-top: 17px;
}


.control {
  display: grid;

  place-items: center;

  width: 40px;
  height: 40px;

  padding: 0;

  border: 0;

  border-radius: 50%;

  background: transparent;

  color: var(--cream);

  cursor: pointer;

  transition:
    transform 150ms ease,
    background 150ms ease;
}


.control:hover {
  background:
    rgba(245, 234, 213, 0.08);

  transform: scale(1.07);
}


.control:active {
  transform: scale(0.92);
}


/* =========================================================
   PLAY BUTTON
   ========================================================= */

.control--play {
  width: 52px;
  height: 52px;

  background: var(--red);

  box-shadow:
    0 8px 24px
    rgba(237, 24, 59, 0.25);
}


.control--play:hover {
  background: #f52b4b;
}


/* =========================================================
   PLAY ICON
   ========================================================= */

.play-icon {
  display: block;

  width: 0;
  height: 0;

  margin-left: 3px;

  border-top:
    8px solid transparent;

  border-bottom:
    8px solid transparent;

  border-left:
    11px solid var(--cream);
}


/* =========================================================
   PREVIOUS / NEXT ICONS
   ========================================================= */

.skip-icon {
  position: relative;

  display: flex;

  align-items: center;

  width: 22px;
  height: 18px;
}


.skip-icon::after {
  content: "";

  position: absolute;

  top: 2px;

  width: 2px;
  height: 14px;

  background: var(--cream);
}


.skip-icon i {
  display: block;

  width: 0;
  height: 0;

  border-top:
    7px solid transparent;

  border-bottom:
    7px solid transparent;
}


/* =========================================================
   PREVIOUS
   ========================================================= */

.skip-icon--previous {
  justify-content: flex-start;
}


.skip-icon--previous::after {
  left: 0;
}


.skip-icon--previous i {
  border-right:
    8px solid var(--cream);
}


.skip-icon--previous i:nth-child(1) {
  margin-left: 3px;
}


.skip-icon--previous i:nth-child(2) {
  margin-left: -2px;
}


/* =========================================================
   NEXT
   ========================================================= */

.skip-icon--next {
  justify-content: flex-end;
}


.skip-icon--next::after {
  right: 0;
}


.skip-icon--next i {
  border-left:
    8px solid var(--cream);
}


.skip-icon--next i:nth-child(1) {
  margin-right: -2px;
}


.skip-icon--next i:nth-child(2) {
  margin-right: 3px;
}


/* =========================================================
   STATION NAVIGATION
   ========================================================= */

.station-nav {
  position: absolute;

  top: 50%;

  z-index: 30;

  display: grid;

  width: 52px;
  height: 72px;

  place-items: center;

  transform:
    translateY(-50%);

  border:
    1px solid
    rgba(245, 234, 213, 0.2);

  border-radius: 14px;

  background:
    rgba(3, 7, 9, 0.25);

  backdrop-filter:
    blur(10px);

  cursor: pointer;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}


.station-nav:hover {
  border-color:
    rgba(245, 234, 213, 0.48);

  background:
    rgba(245, 234, 213, 0.08);
}


.station-nav:active {
  transform:
    translateY(-50%)
    scale(0.95);
}


.station-nav span {
  margin-top: -4px;

  font-family: Arial, sans-serif;

  font-size: 44px;

  font-weight: 200;

  line-height: 1;

  color: var(--cream);
}


.station-nav--left {
  left: 20px;
}


.station-nav--right {
  right: 20px;
}


/* =========================================================
   FULLSCREEN
   ========================================================= */

.fullscreen-button {
  position: absolute;

  right: 24px;
  bottom: 22px;

  z-index: 30;

  display: grid;

  width: 40px;
  height: 40px;

  place-items: center;

  border:
    1px solid
    rgba(245, 234, 213, 0.22);

  border-radius: 50%;

  background:
    rgba(3, 7, 9, 0.3);

  backdrop-filter:
    blur(10px);

  color: var(--cream);

  cursor: pointer;

  font-size: 17px;

  transition:
    background 160ms ease,
    border-color 160ms ease;
}


.fullscreen-button:hover {
  border-color:
    rgba(245, 234, 213, 0.5);

  background:
    rgba(245, 234, 213, 0.08);
}


/* =========================================================
   STATION DOTS
   ========================================================= */

.station-dots {
  position: absolute;

  bottom: 27px;
  left: 50%;

  z-index: 30;

  display: flex;

  gap: 7px;

  transform:
    translateX(-50%);
}


.station-dot {
  width: 5px;
  height: 5px;

  padding: 0;

  border: 0;

  border-radius: 50%;

  background:
    rgba(245, 234, 213, 0.32);
}


.station-dot.is-active {
  background: var(--cream);

  transform: scale(1.35);
}


/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

  .radiohouse {
    min-height: 560px;
  }


  .topbar {
    top: 17px;
    left: 17px;
    right: 17px;
  }


  #clock {
    font-size: 17px;
  }


  .date {
    font-size: 8px;
    letter-spacing: 0.12em;
  }


  .listeners {
    font-size: 9px;
  }


  .playlist-link {
    min-width: auto;

    height: 34px;

    padding: 0 13px;

    font-size: 9px;
  }


  .hero {
    padding:
      80px 16px
      55px;
  }


  .station-card {
    width: 92vw;

    transform:
      translateY(1vh);
  }


  .record-stage {
    width: 100px;
    height: 100px;

    margin-bottom: 17px;
  }


  .player-info {
    width: 88vw;
  }


  .track-line {
    font-size: 8px;
  }


  .track-line strong {
    font-size: 10px;
  }


  .controls {
    gap: 22px;

    margin-top: 15px;
  }


  .control {
    width: 38px;
    height: 38px;
  }


  .control--play {
    width: 50px;
    height: 50px;
  }


  .station-nav {
    top: auto;
    bottom: 18px;

    width: 43px;
    height: 43px;

    border-radius: 50%;

    transform: none;
  }


  .station-nav:active {
    transform: scale(0.95);
  }


  .station-nav span {
    font-size: 32px;
  }


  .station-nav--left {
    left: 17px;
  }


  .station-nav--right {
    right: 17px;
  }


  .fullscreen-button {
    right: 17px;
    bottom: 70px;

    width: 36px;
    height: 36px;

    font-size: 15px;
  }


  .station-dots {
    bottom: 36px;
  }

}


/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 420px) {

  .record-stage {
    width: 90px;
    height: 90px;
  }


  .track-line strong {
    max-width: 52%;
  }


  #songArtist {
    max-width: 28%;
  }


  .progress-row {
    gap: 6px;
  }


  .time {
    width: 24px;
    font-size: 6px;
  }

}
/* =========================================================
   BOTTOM PLAYER
   ========================================================= */

/* Move the entire player to the bottom */
.hero {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;

  padding: 0 24px 70px !important;
}


/* Keep record + player together,
   but make the whole player sit at bottom */
.station-card {
  transform: none !important;

  width: min(620px, 90vw) !important;
}


/* Smaller record, positioned above the controls */
.record-stage {
  width: 105px !important;
  height: 105px !important;

  margin: 0 auto 16px !important;
}


/* Track information */
.player-info {
  width: min(620px, 90vw) !important;
}


/* Progress */
.progress-row {
  margin-top: 9px !important;
}


/* Controls */
.controls {
  margin-top: 15px !important;

  gap: 30px !important;
}


/* =========================================================
   REMOVE STATION DOTS
   ========================================================= */

.station-dots {
  display: none !important;
}


/* =========================================================
   KEEP STATION ARROWS ON SIDES
   ========================================================= */

.station-nav {
  top: 50% !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

  .hero {
    align-items: flex-end !important;

    padding:
      0
      16px
      55px !important;
  }

  .station-card {
    width: 92vw !important;
  }

  .record-stage {
    width: 85px !important;
    height: 85px !important;

    margin-bottom: 13px !important;
  }

  .player-info {
    width: 92vw !important;
  }

  .controls {
    margin-top: 13px !important;
    gap: 24px !important;
  }

}