:root {
  --app-height: 100vh;
  --ink: #ffffff;
  --muted: rgba(55, 39, 8, .74);
  --line: rgba(22, 122, 47, .28);
  --panel: rgba(255, 207, 54, .88);
  --accent: #ffd400;
  --accent-2: #ff2020;
  --green: #167a2f;
  --green-bright: #2eb845;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  font-family: "Trebuchet MS", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
}

body {
  height: var(--app-height);
  min-height: var(--app-height);
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .84)),
    url("../../img/radiobg.jpg") center / cover no-repeat;
}

.shell {
  width: min(100%, 430px);
  height: var(--app-height);
  margin: 0 auto;
  padding:
    max(12px, env(safe-area-inset-top))
    clamp(14px, 5vw, 20px)
    max(12px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.player {
  width: 100%;
  max-width: 390px;
  max-height: calc(var(--app-height) - 24px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(22px, 7vw, 28px);
  padding: clamp(20px, 4svh, 30px) clamp(18px, 5vw, 24px);
  background:
    linear-gradient(180deg, rgba(255, 223, 76, .94), rgba(255, 187, 34, .9)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.logo-wrap {
  width: min(clamp(200px, 36vh, 260px), 74vw);
  width: min(clamp(200px, 36svh, 260px), 74vw);
  height: min(clamp(200px, 36vh, 260px), 74vw);
  height: min(clamp(200px, 36svh, 260px), 74vw);
  flex: 0 0 auto;
  margin: 0 auto clamp(20px, 4svh, 30px);
  border-radius: 999px;
  padding: 0;
  background: transparent;
  box-shadow: 0 22px 46px rgba(0, 0, 0, .34);
  overflow: hidden;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  background: #101010;
}

.controls {
  margin: 0 auto clamp(16px, 3svh, 22px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 5vw, 22px);
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #167a2f;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-button img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(145deg, #2eb845 0%, #167a2f 58%, #0d5f24 100%);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform .18s ease;
}

.play-button:active {
  transform: scale(.96);
}

.play-icon,
.pause-icon {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.pause-icon {
  display: none;
}

.loader-icon {
  width: 34px;
  height: 34px;
  display: none;
  border: 4px solid rgba(255, 255, 255, .35);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spin .8s linear infinite;
}

.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.is-loading .play-icon,
.is-loading .pause-icon {
  display: none;
}

.is-loading .loader-icon {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes liveBlink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .28;
    transform: scale(.72);
  }
}

.now {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  min-height: 88px;
  padding: 15px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .36);
  text-align: center;
}

.now span {
  width: fit-content;
  min-width: 96px;
  color: #ffffff;
  background: #ff2020;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.now span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ffffff;
  animation: liveBlink 1.1s ease-in-out infinite;
}

.now strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #2c1c03;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: clamp(12px, 3svh, 20px);
}

.store-links a {
  min-width: 0;
  aspect-ratio: 280 / 81;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(22, 122, 47, .28);
  -webkit-touch-callout: none;
}

button,
a {
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  touch-action: manipulation;
  user-select: none;
}

button:focus,
a:focus {
  outline: none;
}

.store-links img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (max-width: 360px) {
  .shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .player {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-height: 700px) {
  .player {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .logo-wrap {
    width: min(178px, 54vw);
    height: min(178px, 54vw);
    margin-bottom: 16px;
  }

  .controls {
    margin-bottom: 12px;
  }

  .play-button {
    width: 72px;
    height: 72px;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .now {
    gap: 7px;
    min-height: 76px;
    padding: 10px 12px;
  }

  .store-links {
    margin-top: 12px;
  }

  .now span {
    padding: 6px 14px;
  }

  .now strong {
    font-size: 12px;
    min-height: 33px;
  }
}

@media (max-height: 580px) {
  .store-links {
    display: none;
  }

  .logo-wrap {
    width: min(145px, 45vw);
    height: min(145px, 45vw);
    margin-bottom: 12px;
  }

  .controls {
    gap: 14px;
  }
}
