html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  cursor: none;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
}

body.tools-visible {
  cursor: default;
}

.stage {
  position: fixed;
  inset: 0;
  background: #000;
}

.hidden {
  display: none !important;
}

.media-host,
.media-host img,
.media-host video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-host img,
.media-host video {
  object-fit: contain;
  background: #000;
}

.activation,
.empty,
.offline {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: #000;
}

.activation-box {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.activation-box span,
.activation-box small,
.empty span,
.offline span {
  color: #9ca3af;
  font-size: clamp(18px, 2.4vw, 30px);
  letter-spacing: 0;
}

.activation-box strong {
  font-size: clamp(58px, 9vw, 126px);
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
}

.offline {
  background: rgba(0, 0, 0, 0.84);
}

.control-edge {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 8;
  width: 28px;
  cursor: default;
}

.control-edge.left {
  left: 0;
}

.control-edge.right {
  right: 0;
}

.player-tools {
  position: fixed;
  top: 50%;
  right: 14px;
  z-index: 9;
  display: grid;
  gap: 8px;
  width: 104px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(4, 8, 12, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate(130px, -50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

body.tools-visible .player-tools {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.player-tools button,
.dialog-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.player-tools button:hover,
.dialog-actions button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.player-tools button:disabled {
  opacity: 0.46;
  cursor: default;
}

.player-tools button.danger,
.dialog-actions button.danger {
  background: rgba(185, 28, 28, 0.82);
}

.player-dialog {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
  cursor: default;
}

.player-dialog-card {
  width: min(480px, 100%);
  max-height: min(82vh, 680px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 18, 0.96);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.player-dialog-card h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.player-dialog-card p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.45;
}

.info-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  color: #e5e7eb;
  font-size: 14px;
}

.info-grid dt {
  color: #9ca3af;
}

.info-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions button {
  min-width: 92px;
  padding: 0 12px;
}

.player-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 13;
  max-width: min(520px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(8, 13, 18, 0.9);
  color: #fff;
  font-size: 14px;
  cursor: default;
}

@media (max-width: 720px) {
  .player-tools {
    top: auto;
    right: 10px;
    bottom: 10px;
    width: auto;
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    transform: translateY(120px);
  }

  body.tools-visible .player-tools {
    transform: translateY(0);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}
