:root {
  --cyan: #29e5ef;
  --purple: #9258ff;
  --text: #f4f7ff;
  --muted: #91a1c2;
  --panel: rgba(7, 17, 46, 0.82);
  --line: rgba(115, 171, 255, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 78% 18%, rgba(43, 90, 255, 0.38), transparent 24%),
    radial-gradient(circle at 42% 100%, rgba(133, 48, 255, 0.24), transparent 34%),
    #020615;
}

.screen-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  isolation: isolate;
}

.screen-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 54px 54px;
}

.beam {
  position: absolute;
  z-index: -1;
  top: -12%;
  right: 6%;
  width: 34%;
  height: 120%;
  transform: skewX(-12deg);
  background: linear-gradient(90deg, transparent, rgba(19, 103, 255, 0.4), rgba(41, 229, 239, 0.24), rgba(154, 52, 255, 0.4));
  filter: blur(42px);
}

.screen-header {
  min-height: 92px;
  padding: 18px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(2, 6, 21, 0.66);
  backdrop-filter: blur(18px);
}

.screen-brand-cluster,
.screen-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.back-to-site {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid rgba(41, 229, 239, 0.42);
  border-radius: 12px;
  color: #eaffff;
  background: linear-gradient(135deg, rgba(24, 139, 229, 0.38), rgba(74, 66, 219, 0.34));
  box-shadow: 0 8px 24px rgba(28, 155, 223, 0.18), inset 0 1px rgba(255,255,255,.06);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
  transition: 0.2s ease;
}

.back-to-site:hover {
  transform: translateX(-2px);
  border-color: rgba(41, 229, 239, 0.72);
  box-shadow: 0 10px 30px rgba(28, 155, 223, 0.28), inset 0 1px rgba(255,255,255,.08);
}

.back-arrow {
  font-size: 20px;
  line-height: 1;
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.brand b {
  font-size: 20px;
  font-style: italic;
}

.brand span {
  color: #dce7ff;
}

.screen-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 5px;
  border: 1px solid rgba(115, 171, 255, 0.18);
  border-radius: 999px;
  color: #60708f;
  background: rgba(5, 14, 39, 0.76);
}

.screen-lang-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.screen-lang-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(24, 141, 255, 0.58), rgba(125, 72, 255, 0.46));
}

.live-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #32e4b2;
  box-shadow: 0 0 0 5px rgba(50,228,178,.08), 0 0 18px rgba(50,228,178,.65);
}

.screen-main {
  min-height: 0;
  padding: 30px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}

.stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(8, 20, 54, 0.85), rgba(3, 9, 28, 0.72));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.46);
  display: grid;
  place-items: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.stage::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  border: 1px solid rgba(44, 220, 255, 0.15);
  right: -220px;
  top: -260px;
  box-shadow: 0 0 90px rgba(50, 80, 255, 0.16);
}

.waiting {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
}

.waiting img {
  width: 170px;
  height: 170px;
  object-fit: cover;
  object-position: center 42%;
  border-radius: 36px;
  border: 1px solid rgba(42, 228, 239, 0.28);
  mask-image: radial-gradient(circle at center, #000 55%, transparent 76%);
}

.waiting h1 {
  margin: 14px 0 8px;
  font-size: clamp(32px, 4.6vw, 64px);
  color: #fff;
}

.waiting p {
  margin: 0;
  font-size: 18px;
}

.question-popup {
  width: min(920px, 94%);
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(48, 219, 255, 0.44);
  border-radius: 30px;
  padding: 40px 46px;
  background: linear-gradient(145deg, rgba(13, 34, 79, 0.96), rgba(16, 12, 54, 0.94));
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.58), inset 0 1px rgba(255,255,255,.07);
  transform: translate(-50%, -42%) scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition: 0.42s cubic-bezier(.2,.86,.22,1.05);
}

.question-popup.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.popup-kicker {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .16em;
}

.question-popup blockquote {
  margin: 24px 0;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 720;
}

.popup-meta {
  color: var(--muted);
  font-size: 16px;
}

.queue-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: rgba(6, 16, 43, 0.78);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-rows: auto 1fr;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.queue-head h2 {
  margin: 0;
  font-size: 19px;
}

.count {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #071326;
  background: var(--cyan);
  font-weight: 800;
}

.queue-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 9px;
}

.queue-item {
  border: 1px solid rgba(122, 165, 255, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: rgba(9, 22, 54, 0.72);
  transition: .2s ease;
}

.queue-item.active {
  border-color: rgba(41, 229, 239, 0.52);
  background: rgba(26, 80, 116, 0.26);
}

.queue-item p {
  margin: 7px 0 0;
  color: #d7e1f6;
  font-size: 13px;
  line-height: 1.5;
}

.queue-meta {
  color: var(--muted);
  font-size: 10px;
}

.screen-controls {
  min-height: 78px;
  padding: 12px 34px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.control-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: #dce6fb;
  background: rgba(10, 24, 57, 0.84);
}

.control-btn.primary {
  color: #061327;
  border: 0;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), #7888ff);
}

.control-btn.danger {
  color: #ffb2c0;
  border-color: rgba(255, 113, 138, 0.24);
}

.connection-note {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 30;
  transform: translate(-50%, 14px);
  opacity: 0;
  padding: 11px 15px;
  border: 1px solid rgba(41,229,239,.28);
  border-radius: 12px;
  background: rgba(3, 12, 34, .94);
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .screen-header { align-items: flex-start; gap: 14px; }
  .screen-brand-cluster { align-items: flex-start; flex-direction: column; gap: 10px; }
  .screen-header-actions { align-items: flex-end; flex-direction: column-reverse; gap: 10px; }
  .brand span { display: none; }
  .back-to-site { min-height: 38px; padding: 0 12px; }
  .screen-main { grid-template-columns: 1fr; padding: 16px; }
  .stage { min-height: 68vh; }
  .queue-panel { min-height: 360px; }
  .screen-header, .screen-controls { padding-left: 18px; padding-right: 18px; }
  .question-popup { padding: 26px; }
  .question-popup blockquote { font-size: clamp(25px, 7vw, 42px); }
}