:root {
  color-scheme: dark;
  --page-background: #000000;
  --panel-background: #050505;
  --text-primary: #ffffff;
  --text-muted: #b9b9b9;
  --focus-color: #8ab4f8;
  --error-color: #ffb4ab;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--page-background);
  color: var(--text-primary);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.player-container {
  width: min(100%, 640px);
  text-align: center;
}

.video-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid #181818;
  border-radius: 10px;
  background: var(--panel-background);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 8px 24px rgb(255 255 255 / 7%);
  transition: transform 160ms ease, border-color 160ms ease;
}

.video-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #343434;
}

.video-card:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 4px;
}

.video-card:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.play-button-icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 0 0 0 rgb(255 255 255 / 35%);
  animation: pulse 2s infinite;
}

.play-button-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 26px solid #000000;
}

.video-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.redirect-notice,
.status-message {
  margin: 14px 12px 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.status-message:empty {
  display: none;
}

.error-message {
  color: var(--error-color);
}

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

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(255 255 255 / 35%);
  }
  70% {
    box-shadow: 0 0 0 16px rgb(255 255 255 / 0%);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(255 255 255 / 0%);
  }
}

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

  .play-button-icon {
    animation: none;
  }
}
