:root {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #f8fafc;
  background: #070b14;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.25), transparent 34rem),
    radial-gradient(circle at 90% 90%, rgba(20, 184, 166, 0.12), transparent 28rem),
    #070b14;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 36px;
}

header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
}

.mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
}

.mark span {
  width: 18px;
  height: 12px;
  border: 2px solid #7dd3fc;
  border-radius: 3px;
  position: relative;
}

.mark span::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #5eead4;
  right: 2px;
  top: 2px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(25px, 4vw, 38px);
  letter-spacing: -0.035em;
}

h2 {
  font-size: 19px;
  font-weight: 600;
}

.eyebrow {
  margin-bottom: 5px;
  color: #67e8f9;
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.connect-card,
.viewer {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(11, 18, 32, 0.82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  border-radius: 24px;
}

.connect-card {
  padding: clamp(22px, 4vw, 36px);
  margin-bottom: 22px;
}

.lead {
  max-width: 720px;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 26px;
}

label {
  display: block;
  margin-bottom: 9px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.code-row {
  display: flex;
  gap: 12px;
}

input {
  width: min(300px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  padding: 13px 16px;
  color: white;
  background: rgba(255, 255, 255, 0.055);
  letter-spacing: 0.28em;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  outline: none;
}

input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

button {
  border: 0;
  border-radius: 13px;
  padding: 0 23px;
  color: white;
  background: #2563eb;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

button:hover {
  background: #3b82f6;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.hint,
.privacy {
  color: #718096;
  font-size: 12px;
  line-height: 1.65;
}

.hint {
  margin-top: 13px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
  cursor: pointer;
}

.consent-row input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #22d3ee;
}

.consent-row a {
  color: #67e8f9;
}

.viewer {
  overflow: hidden;
}

.viewer-head {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.ghost {
  padding: 9px 15px;
  background: rgba(255, 255, 255, 0.08);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.13);
}

.guard-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(15, 23, 42, 0.72);
}

.guard-copy h3 {
  margin-top: 4px;
  font-size: 16px;
}

.guard-copy #appDetail {
  margin-top: 5px;
  color: #94a3b8;
  font-size: 12px;
}

.guard-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.guard-actions button {
  min-height: 40px;
}

.guard-actions button:disabled {
  cursor: not-allowed;
}

.screen {
  position: relative;
  min-height: 430px;
  max-height: 72vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #02050b;
  background-size: 24px 24px;
}

video {
  display: none;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

video.live {
  display: block;
}

.screen-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: #64748b;
}

.screen-placeholder.hidden {
  display: none;
}

.pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.45);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 18px rgba(56, 189, 248, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  }
}

.privacy {
  text-align: center;
  margin-top: 18px;
}

@media (max-width: 620px) {
  .shell {
    padding-top: 28px;
  }

  .code-row {
    flex-direction: column;
  }

  input,
  #connectButton {
    width: 100%;
    min-height: 50px;
  }

  .screen {
    min-height: 320px;
  }

  .guard-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .guard-actions {
    flex-direction: column;
  }

  .guard-actions button {
    width: 100%;
  }
}

