:root {
  --bg: #eef3f7;
  --card: rgba(255, 255, 255, 0.78);
  --line: #d5dfeb;
  --text: #111827;
  --muted: #65748b;
  --green: #0f9f6e;
  --blue: #1d65f0;
  --red: #d64242;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(29, 101, 240, 0.15), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(15, 159, 110, 0.16), transparent 26%),
    linear-gradient(180deg, #fbfdff, var(--bg));
}

.video-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.hero-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.pill-link {
  flex: 0 0 auto;
  border: 1px solid #cfd9e8;
  border-radius: 999px;
  padding: 10px 16px;
  color: #20314f;
  text-decoration: none;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(36, 53, 93, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.preview-card,
.plan-card,
.log-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 22px 60px rgba(58, 76, 112, 0.12);
  backdrop-filter: blur(14px);
}

.preview-card {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  overflow: hidden;
  background: #101827;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(135deg, rgba(29, 101, 240, 0.36), rgba(15, 159, 110, 0.26)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
}

.preview-placeholder span {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.preview-placeholder strong {
  font-size: 24px;
}

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

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 10px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  color: #fff;
  background: #27364f;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

button.primary {
  background: linear-gradient(135deg, var(--green), var(--blue));
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

#hangupBtn {
  background: var(--red);
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: #24304a;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd6e5;
  border-radius: 14px;
  padding: 11px 12px;
  color: #1d293d;
  background: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  outline: none;
}

textarea {
  resize: vertical;
}

.switch-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.switch-row input {
  width: 42px;
  height: 22px;
  accent-color: var(--green);
}

.plan-card,
.log-card {
  margin-top: 18px;
  padding: 20px;
}

ol {
  margin: 0 0 12px 20px;
  padding: 0;
  color: #334155;
  line-height: 1.8;
}

code {
  border-radius: 8px;
  padding: 2px 6px;
  color: #144f3d;
  background: rgba(15, 159, 110, 0.12);
}

.sdk-state {
  margin: 0;
  color: var(--muted);
}

.log {
  min-height: 120px;
  max-height: 260px;
  overflow: auto;
  border: 1px dashed #ccd7e6;
  border-radius: 16px;
  padding: 12px;
  background: rgba(248, 251, 255, 0.76);
  display: grid;
  gap: 8px;
}

.log p {
  margin: 0;
  padding: 9px 10px;
  border-radius: 12px;
  color: #25324a;
  background: rgba(29, 101, 240, 0.08);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
