:root {
  --bg: #060811;
  --panel: rgba(9, 14, 32, 0.78);
  --panel-strong: rgba(6, 10, 24, 0.86);
  --panel-soft: rgba(10, 16, 36, 0.58);
  --line: rgba(125, 231, 255, 0.18);
  --text: #f7fbff;
  --muted: rgba(221, 231, 246, 0.82);
  --cyan: #55e7ff;
  --pink: #ff3eb7;
  --lime: #dfff45;
  --blue: #3f9bff;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
  --radius: 28px;
  --font: Inter, Roboto, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(26, 96, 235, 0.24), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(255, 62, 183, 0.14), transparent 26%),
    linear-gradient(180deg, #090b16 0%, #06070f 55%, #030409 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent);
}

.page-shell {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2.4rem;
}

.hero {
  display: grid;
  gap: 1rem;
}

.header-banner {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  background: #070911;
  box-shadow: var(--shadow);
}

.header-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 6, 14, 0.08), rgba(4, 6, 14, 0.22)),
    linear-gradient(90deg, rgba(40, 119, 255, 0.08), rgba(255, 62, 183, 0.08));
}

.header-banner-art {
  display: block;
  width: 100%;
  height: auto;
}

.section-tag,
.stream-meta span,
.panel-text,
.chat-note,
.chat-statusbar p,
.seo-copy p {
  color: var(--muted);
}

.section-tag {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.2rem;
  align-items: start;
}

.player-panel,
.chat-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(12, 22, 58, 0.9), rgba(7, 12, 29, 0.82));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-player {
  padding: 1.8rem;
}

.hero-chat {
  padding: 0.85rem;
  background:
    linear-gradient(180deg, rgba(10, 13, 31, 0.88), rgba(7, 11, 25, 0.9)),
    radial-gradient(circle at top right, rgba(85, 231, 255, 0.08), transparent 28%);
}

.panel-head,
.stream-meta,
.participant-head,
.admin-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.player-panel h1,
.player-panel h2,
.chat-statusbar strong,
.participant-copy strong,
.chat-note strong,
.seo-copy h2 {
  margin: 0;
  font-weight: 800;
}

.player-panel h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.panel-text {
  margin: 0 0 1.2rem;
  line-height: 1.55;
  max-width: 34rem;
  font-size: 1.02rem;
}

.live-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.4rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
}

.live-pill {
  background: rgba(255, 62, 183, 0.16);
  color: #ff94d6;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.status-pill {
  background: rgba(10, 20, 42, 0.92);
  color: var(--cyan);
  font-size: 0.98rem;
}

.stream-meta {
  margin-bottom: 1rem;
}

.stream-meta span:last-child {
  text-align: right;
}

audio {
  width: 100%;
  accent-color: var(--blue);
}

.chat-app {
  position: relative;
  min-height: 42rem;
  padding: 2px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(105, 236, 255, 0.28);
  background: linear-gradient(90deg, rgba(255, 44, 183, 0.94), rgba(0, 225, 255, 0.92), rgba(216, 255, 67, 0.7));
  box-shadow:
    0 0 0 1px rgba(255, 44, 183, 0.16),
    0 0 26px rgba(255, 44, 183, 0.18),
    0 0 34px rgba(0, 225, 255, 0.16);
}

.chat-app::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 44, 183, 0.55), rgba(0, 225, 255, 0.55));
  filter: blur(18px);
  opacity: 0.34;
}

.chat-frame {
  position: relative;
  min-height: calc(42rem - 4px);
  border-radius: 28px;
  overflow: hidden;
  background: url("./chat-bg-neo.webp") left top/cover no-repeat;
}

.chat-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 4, 12, 0.12) 0%, rgba(4, 7, 16, 0.08) 30%, rgba(4, 6, 16, 0.04) 100%),
    radial-gradient(circle at 82% 18%, rgba(85, 231, 255, 0.08), transparent 20%),
    radial-gradient(circle at 14% 76%, rgba(255, 62, 183, 0.08), transparent 24%);
}

.chat-stage,
.chat-sidebar,
.chat-conversation,
.admin-drawer {
  position: relative;
  z-index: 1;
}

.chat-stage {
  min-height: calc(42rem - 4px);
}

.chat-landing,
.chat-workspace {
  min-height: calc(42rem - 4px);
}

.chat-landing {
  display: grid;
  place-items: center;
  padding: 1.4rem 1.2rem 1.4rem 17rem;
}

.chat-landing-card {
  width: min(100%, 29rem);
  display: grid;
  gap: 0.95rem;
  padding: 1.55rem;
  border-radius: 1.75rem;
  background: rgba(7, 11, 27, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.28);
}

.chat-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: #56d37d;
  box-shadow: 0 0 0 8px rgba(86, 211, 125, 0.12);
}

.chat-workspace {
  display: block;
  padding-left: 16rem;
}

.chat-sidebar {
  position: absolute;
  top: 11.3rem;
  left: 0.8rem;
  width: 14.1rem;
  display: grid;
  gap: 0.8rem;
  padding: 1rem 0.9rem;
  border-radius: 1.35rem;
  background: rgba(3, 6, 18, 0.58);
  border: 1px solid rgba(97, 236, 255, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(128, 241, 255, 0.12),
    0 0 0 1px rgba(255, 44, 183, 0.08),
    0 0 12px rgba(0, 225, 255, 0.26),
    0 0 18px rgba(0, 225, 255, 0.22),
    0 0 24px rgba(255, 44, 183, 0.12);
}

.participant-head {
  justify-content: flex-start;
  gap: 0.55rem;
}

.participant-head-top {
  margin-bottom: 0.1rem;
}

.participant-head span {
  color: #ffffff;
  font-weight: 700;
}

.participant-head strong,
#online-count {
  color: var(--cyan);
  font-size: 0.95rem;
  min-width: 1.25rem;
}

.chat-profile,
.participant-item,
.participant-empty,
.message-empty,
.admin-message-item,
.ban-item {
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(6, 11, 28, 0.62);
}

.chat-profile,
.participant-item,
.participant-empty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
}

.profile-avatar,
.participant-avatar {
  display: inline-grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #0e7cff, #5eb8ff);
  font-weight: 800;
  font-size: 1.35rem;
}

.participant-avatar {
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1rem;
}

.participant-copy {
  display: grid;
  gap: 0.15rem;
}

.participant-copy strong,
#profile-name {
  color: #ffffff;
}

.participant-copy span,
#profile-role {
  color: rgba(110, 232, 255, 0.9);
}

.participant-list,
.messages,
.admin-message-list,
.ban-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-participant-list {
  display: grid;
  gap: 0.7rem;
  max-height: 11.5rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.chat-conversation {
  width: 100%;
  min-height: calc(42rem - 1.8rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.chat-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.85rem 0.85rem 0;
  padding: 0.95rem 1.05rem;
  border-radius: 1.3rem;
  background: rgba(4, 8, 22, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 16px rgba(0, 225, 255, 0.08);
}

#chat-status[data-tone="ok"] {
  color: #5fe390;
}

#chat-status[data-tone="error"] {
  color: #ff7ca5;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0.85rem;
  min-height: 0;
  height: 100%;
  padding: 0.95rem 1rem 1.2rem;
  overflow-y: auto;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(4, 8, 22, 0.52);
  backdrop-filter: blur(2px);
}

.message-item {
  display: flex;
  width: 100%;
}

.message-item.is-own {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(84%, 29rem);
  padding: 0.9rem 1rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(9, 15, 35, 0.62);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.16);
}

.message-item.is-own .message-bubble {
  background: linear-gradient(135deg, #0e7cff, #39d4ff);
}

.message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.message-head strong,
.message-head span,
.message-bubble p {
  color: #f6fbff;
}

.message-name.is-offline {
  color: #9caaca;
}

.message-bubble p {
  margin: 0;
  line-height: 1.5;
}

.message-form {
  margin: 1.15rem 0.85rem 0.2rem;
  padding: 0.95rem 1rem 1.05rem;
  border-radius: 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(4, 8, 22, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 44, 183, 0.06),
    0 0 16px rgba(0, 225, 255, 0.08);
}

.nickname-form label,
.message-form label,
.admin-unlock label,
.admin-ban-form label {
  color: #f4f8ff;
  font-size: 0.9rem;
  font-weight: 700;
}

.message-form .message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: stretch;
  width: 100%;
}

.message-form .message-row input,
.message-form .message-row button {
  min-height: 4.7rem;
  border-radius: 1.5rem;
}

.message-form .message-row input {
  padding: 1.35rem 1.25rem;
  font-size: 1.05rem;
}

.message-form .message-row button {
  min-width: 9.25rem;
  padding: 1.2rem 1.35rem;
}

.input-row,
.unlock-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.input-row input,
.unlock-row input,
.message-row input {
  width: 100%;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 19, 43, 0.72);
  color: #f6fbff;
  font: 500 0.95rem/1 var(--font);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.input-row input::placeholder,
.unlock-row input::placeholder,
.message-row input::placeholder {
  color: rgba(220, 230, 255, 0.44);
}

button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
  font: 700 0.98rem/1 var(--font);
}

button {
  padding: 0.95rem 1.2rem;
  background: linear-gradient(135deg, var(--lime), var(--pink));
  color: #180716;
}

.ghost-button {
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbff;
  border: 1px solid rgba(108, 202, 255, 0.16);
}

button:hover,
button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.admin-drawer {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1rem 1rem 1rem 0;
}

.admin-drawer-head,
.admin-section,
.admin-section-head,
.admin-message-copy,
.admin-message-item {
  display: grid;
  gap: 0.35rem;
}

.admin-message-list,
.ban-list {
  display: grid;
  gap: 0.7rem;
}

.admin-message-item,
.ban-item,
.message-empty {
  padding: 0.85rem;
}

.admin-message-actions {
  display: flex;
  gap: 0.55rem;
}

.ban-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.admin-stats span {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(44, 187, 255, 0.12);
  color: #f4fbff;
}

.seo-copy {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(108, 202, 255, 0.12);
  background: rgba(5, 9, 20, 0.56);
}

.seo-copy h2 {
  font-size: 1rem;
  color: #ffffff;
}

.seo-copy p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-main {
    grid-template-columns: 1fr;
  }

  .chat-landing {
    padding-left: 15.4rem;
  }

  .chat-workspace {
    padding-left: 14.5rem;
  }

  .chat-sidebar {
    width: 12.6rem;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 1rem, 1240px);
  }

  .hero-main {
    gap: 1rem;
  }

  .player-panel,
  .chat-panel {
    border-radius: 22px;
  }

  .hero-player {
    padding: 1.2rem;
  }

  .chat-app,
  .chat-frame,
  .chat-stage,
  .chat-landing,
  .chat-workspace {
    min-height: auto;
  }

  .chat-frame {
    border-radius: 22px;
  }

  .chat-workspace {
    padding-left: 0;
  }

  .chat-sidebar {
    position: static;
    width: auto;
    margin: 1rem 1rem 0;
  }

  .chat-landing {
    padding: 1rem;
  }

  .chat-landing-card {
    width: 100%;
    padding: 1.2rem;
  }

  .messages {
    max-height: 19rem;
  }

  .message-form {
    margin-bottom: 0.85rem;
  }

  .admin-drawer {
    padding: 0 0.9rem 0.9rem;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: calc(100% - 0.6rem);
    padding-bottom: 1rem;
  }

  .chat-panel {
    padding: 0.7rem;
  }

  .chat-app {
    border-radius: 24px;
  }

  .chat-sidebar,
  .chat-statusbar,
  .messages,
  .message-form {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
  }

  .messages {
    min-height: 14rem;
  }

  .message-form .message-row {
    grid-template-columns: 1fr;
  }

  .message-form .message-row input,
  .message-form .message-row button,
  .ghost-button,
  button {
    width: 100%;
  }
}
