.live-player {
  --player-green: #10b981;
  --player-green-bright: #34d399;
  position: relative;
  width: min(92vw, 980px);
  margin: clamp(18px, 3vw, 30px) auto 0;
  isolation: isolate;
  opacity: 0;
  transform: translateY(16px);
}

.live-player--ready {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease 100ms, transform 700ms cubic-bezier(0.22, 1, 0.36, 1) 100ms;
}

.live-player__glow {
  position: absolute;
  z-index: -1;
  inset: 8% 4% -5%;
  border-radius: 30%;
  background: rgb(16 185 129 / 16%);
  filter: blur(34px);
}

.live-player__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgb(52 211 153 / 48%);
  border-radius: clamp(14px, 2vw, 22px);
  background:
    radial-gradient(circle at 50% 45%, rgb(16 185 129 / 9%), transparent 34%),
    linear-gradient(145deg, rgb(4 17 24 / 96%), rgb(2 8 15 / 98%));
  box-shadow:
    0 24px 70px rgb(0 0 0 / 48%),
    0 0 0 1px rgb(255 255 255 / 4%) inset,
    0 0 28px rgb(16 185 129 / 12%);
}

.live-player__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 34%, rgb(255 255 255 / 4%) 50%, transparent 66%);
  transform: translateX(-100%);
  animation: player-reflection 8s ease-in-out infinite 1.8s;
}

.live-player__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #02060b;
  object-fit: contain;
}

.live-player__placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgb(52 211 153 / 8%) 4px
  );
  mask-image: linear-gradient(to bottom, transparent, black 22%, black 78%, transparent);
  pointer-events: none;
}

.live-player__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 42px);
  background:
    radial-gradient(circle at 50% 45%, rgb(16 185 129 / 9%), transparent 34%),
    linear-gradient(145deg, rgb(4 17 24 / 96%), rgb(2 8 15 / 98%));
  text-align: center;
  transition: opacity 350ms ease, visibility 350ms ease;
}

.live-player__placeholder--hidden {
  visibility: hidden;
  opacity: 0;
}

.live-player__logo {
  width: clamp(58px, 11vw, 108px);
  height: clamp(58px, 11vw, 108px);
  margin-bottom: clamp(10px, 2vw, 20px);
  object-fit: contain;
  opacity: 0.76;
  filter: drop-shadow(0 0 18px rgb(52 211 153 / 25%));
}

.live-player__label {
  color: #6ee7b7;
  font-size: clamp(0.58rem, 1.4vw, 0.74rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
}

.live-player__message {
  margin-top: 7px;
  color: #f8fafc;
  font-size: clamp(1rem, 3.2vw, 1.7rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgb(16 185 129 / 22%);
}

.live-player__format {
  margin-top: clamp(8px, 1.5vw, 13px);
  color: #94a3b8;
  font-size: clamp(0.62rem, 1.5vw, 0.78rem);
  letter-spacing: 0.08em;
}

.live-player__controls {
  position: absolute;
  right: clamp(10px, 2vw, 18px);
  bottom: clamp(10px, 2vw, 18px);
  left: clamp(10px, 2vw, 18px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgb(52 211 153 / 22%);
  border-radius: 12px;
  background: rgb(2 8 15 / 78%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 30%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 250ms ease, transform 250ms ease;
}

.live-player__frame:hover .live-player__controls,
.live-player__controls:focus-within,
.live-player__controls--visible {
  opacity: 1;
  transform: translateY(0);
}

.live-player__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgb(52 211 153 / 28%);
  border-radius: 8px;
  background: rgb(16 185 129 / 10%);
  color: #d1fae5;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.live-player__button:hover {
  border-color: rgb(52 211 153 / 65%);
  background: rgb(16 185 129 / 20%);
}

.live-player__button:active {
  transform: scale(0.97);
}

.live-player__button:focus-visible {
  outline: 2px solid var(--player-green-bright);
  outline-offset: 2px;
}

.live-player__status {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-player__status--online {
  color: #6ee7b7;
}

.live-player__status--error {
  color: #fca5a5;
}

.live-player__corner {
  position: absolute;
  z-index: 2;
  width: clamp(18px, 3vw, 34px);
  height: clamp(18px, 3vw, 34px);
  border-color: var(--player-green-bright);
  filter: drop-shadow(0 0 5px rgb(52 211 153 / 65%));
  opacity: 0.82;
  pointer-events: none;
}

.live-player__corner--top-left {
  top: 10px;
  left: 10px;
  border-top: 2px solid;
  border-left: 2px solid;
  border-radius: 7px 0 0;
}

.live-player__corner--top-right {
  top: 10px;
  right: 10px;
  border-top: 2px solid;
  border-right: 2px solid;
  border-radius: 0 7px 0 0;
}

.live-player__corner--bottom-left {
  bottom: 10px;
  left: 10px;
  border-bottom: 2px solid;
  border-left: 2px solid;
  border-radius: 0 0 0 7px;
}

.live-player__corner--bottom-right {
  right: 10px;
  bottom: 10px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  border-radius: 0 0 7px;
}

@keyframes player-reflection {
  0%, 72% { transform: translateX(-100%); }
  92%, 100% { transform: translateX(100%); }
}

@media (max-width: 560px) {
  .live-player {
    width: calc(100vw - 24px);
    margin-top: 14px;
  }

  .live-player__frame {
    border-radius: 14px;
  }

  .live-player__corner {
    display: none;
  }

  .live-player__controls {
    padding: 6px;
  }

  .live-player__button {
    min-width: 36px;
    padding-inline: 8px;
  }

  .live-player__button span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-player,
  .live-player--ready {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .live-player__frame::before {
    animation: none;
  }
}
