:root {
  --surface: rgba(91, 25, 44, 0.82);
  --surface-hover: rgba(25, 8, 17, 0.38);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.82);
  --border: rgba(255, 255, 255, 0.9);
  --focus: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

.background-artwork {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
}

.top-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  min-height: 80px;
}

.clock {
  position: absolute;
  top: max(28px, env(safe-area-inset-top));
  left: 32px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.82);
}

.online {
  position: absolute;
  top: max(28px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.82);
  white-space: nowrap;
}

.online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #37ee75;
  box-shadow: 0 0 8px rgba(55, 238, 117, 0.5);
  animation: online-pulse 1.8s ease-in-out infinite;
}

@keyframes online-pulse {
  0%,
  100% {
    opacity: 0.72;
    box-shadow: 0 0 5px rgba(55, 238, 117, 0.38);
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(55, 238, 117, 0.72);
    transform: scale(1.06);
  }
}

.top-actions {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 14px/1 Arial, Helvetica, sans-serif;
  text-decoration: none;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: background-color 180ms ease;
}

button.button {
  appearance: none;
}

.button:hover,
.button:active {
  background: var(--surface-hover);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button:focus-visible,
.control-button:focus-visible,
.play-button:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.player {
  position: fixed;
  right: 0;
  bottom: max(48px, calc(env(safe-area-inset-bottom) + 20px));
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 160px;
  align-items: center;
  gap: 16px;
  width: min(calc(100% - 32px), 680px);
  min-height: 100px;
  margin: 0 auto;
  padding: 9px 18px 9px 9px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 52px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(20, 0, 8, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.album-art {
  width: 82px;
  height: 82px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: #090909;
  box-shadow: 0 5px 14px rgba(20, 0, 8, 0.32);
}

.disc {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: disc-spin 4.5s linear infinite;
  animation-play-state: paused;
  user-select: none;
}

.player:has(.play-button[aria-pressed="true"]) .disc {
  animation-play-state: running;
}

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

.player-info {
  min-width: 0;
}

.player-info h2,
.player-info p {
  margin: 0;
}

.player-info h2 {
  overflow: hidden;
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress {
  position: relative;
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  touch-action: none;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ff8eba;
  pointer-events: none;
}

.time-progress {
  margin-top: 5px !important;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.control-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.control-button {
  width: 40px;
  height: 40px;
  background: transparent;
  color: var(--text);
}

.control-button svg {
  width: 22px;
  height: 22px;
}

.play-button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--text);
  color: #681e38;
  box-shadow: 0 5px 16px rgba(30, 0, 12, 0.24);
}

.play-button svg {
  width: 27px;
  height: 27px;
}

.pause-icon {
  display: none;
}

.play-button[aria-pressed="true"] .play-icon {
  display: none;
}

.play-button[aria-pressed="true"] .pause-icon {
  display: block;
}

.modal {
  width: min(90%, 400px);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(71, 22, 38, 0.96);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.modal h2 {
  margin: 0 0 12px;
}

.modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.about-byline {
  margin-top: 6px !important;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: var(--text);
  transition: background-color 180ms ease;
}

.instagram-link:hover,
.instagram-link:active {
  background: rgba(255, 255, 255, 0.12);
}

.instagram-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.instagram-link svg {
  width: 22px;
  height: 22px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .top-bar {
    display: block;
    min-height: 144px;
    padding: 0;
  }

  .clock {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    left: 10px;
    font-size: 14px;
  }

  .online {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    left: 50%;
    font-size: 14px;
    transform: translateX(-50%);
  }

  .online-dot {
    width: 9px;
    height: 9px;
  }

  .top-actions {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: 8px;
    gap: 2px;
  }

  .button {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
  }

  .button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .player {
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
    grid-template-columns: 56px minmax(0, 1fr) 120px;
    gap: 8px;
    width: min(calc(100% - 16px), 560px);
    min-height: 0;
    padding: 8px;
    border-radius: 44px;
  }

  .album-art {
    width: 56px;
    height: 56px;
  }

  .player-info h2 {
    margin-bottom: 2px;
    font-size: 14px;
  }

  .artist {
    font-size: 12px;
  }

  .progress {
    height: 3px;
    margin-top: 6px;
  }

  .time-progress {
    margin-top: 3px !important;
    font-size: 10px;
  }

  .player-controls {
    justify-content: center;
    gap: 4px;
  }

  .control-button {
    width: 32px;
    height: 32px;
  }

  .control-button svg {
    width: 17px;
    height: 17px;
  }

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

@media (max-width: 350px) {
  .clock,
  .online {
    font-size: 13px;
  }

  .button {
    width: 34px;
    height: 38px;
  }

  .player {
    grid-template-columns: 52px minmax(0, 1fr) 108px;
  }

  .album-art {
    width: 52px;
    height: 52px;
  }

  .player-controls {
    gap: 2px;
  }

  .control-button {
    width: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }

  .online-dot {
    animation: none;
  }

  .disc {
    animation: none;
  }
}
