:root {
  color-scheme: dark;
  font-family: Arial, sans-serif;
  background: #0d121f;
  color: #eeebf3;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  padding: 0 20px 32px;
  background: radial-gradient(ellipse at 50% 0%, rgba(68, 47, 93, 0.2), transparent 36rem);
}

.site-header {
  display: flex;
  width: min(100%, 1000px);
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(191, 168, 230, 0.17);
}

.wordmark {
  color: #bfa8e6;
  font-family: "Dokdo", cursive;
  font-size: 2.1rem;
  line-height: 1;
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-details {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
}

.stream-title {
  overflow: hidden;
  max-width: min(56vw, 420px);
  margin: 0;
  color: #a19cab;
  font-size: 0.72rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(196, 191, 205, 0.22);
  border-radius: 999px;
  color: #c4bfcd;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1;
  text-transform: uppercase;
}

.live-badge__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8c8796;
}

.live-badge[data-state="live"] {
  border-color: rgba(255, 91, 109, 0.35);
  color: #ff8290;
}

.live-badge[data-state="live"] .live-badge__dot {
  background: #ff5368;
  box-shadow: 0 0 9px rgba(255, 83, 104, 0.65);
}

.live-badge[data-state="offline"] .live-badge__dot {
  background: #9e98aa;
}

.live-badge[data-state="unavailable"] {
  color: #aaa4b4;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav__icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
}

.site-nav__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.site-nav__icon[href] {
  color: #c4bfcd;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav__placeholder {
  color: #777281;
  cursor: default;
}

.site-nav__icon[href]:hover {
  color: #d0baff;
}

.site-nav__icon[href]:focus-visible,
.wordmark:focus-visible {
  outline: 2px solid #bfa8e6;
  outline-offset: 5px;
}

.stream {
  width: min(100%, 1440px);
  margin: clamp(28px, 5vh, 52px) auto 32px;
}

.stream-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.chat-toggle {
  padding: 7px 11px;
  border: 1px solid rgba(191, 168, 230, 0.25);
  border-radius: 6px;
  background: #151a29;
  color: #c4bfcd;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.chat-toggle:hover {
  border-color: #bfa8e6;
  color: #d0baff;
}

.chat-toggle:focus-visible {
  outline: 2px solid #bfa8e6;
  outline-offset: 3px;
}

.site-footer {
  display: flex;
  width: min(100%, 1000px);
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  border-top: 1px solid rgba(191, 168, 230, 0.17);
  color: #a19cab;
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #bfa8e6;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: #d0baff;
}

.site-footer a:focus-visible {
  outline: 2px solid #bfa8e6;
  outline-offset: 5px;
}

.stream-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 310px);
  gap: 14px;
}

.stream-layout[data-chat-visible="false"] {
  grid-template-columns: minmax(0, 1fr);
}

.stream-layout[data-chat-visible="false"] .chat {
  display: none;
}

.player {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(191, 168, 230, 0.2);
  background: #121929;
}

.player iframe,
.chat iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.chat {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(191, 168, 230, 0.2);
  background: #121929;
}

@media (max-width: 480px) {
  body {
    padding-inline: 14px;
  }

  .site-header {
    min-height: 66px;
    flex-wrap: wrap;
    padding-block: 12px;
    row-gap: 8px;
  }

  .site-nav__icon {
    width: 36px;
    height: 36px;
  }

  .brand {
    gap: 8px;
  }

  .stream-title {
    max-width: 48vw;
    font-size: 0.65rem;
  }

  .live-badge {
    min-height: 22px;
    gap: 5px;
    padding-inline: 7px;
    font-size: 0.6rem;
  }

  .site-footer {
    font-size: 0.72rem;
  }
}

@media (max-width: 800px) {
  .stream-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat {
    height: 420px;
  }
}
