:root {
  color: #241c2d;
  background: #ffffff;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-synthesis: none;
  --purple: #a846f2;
  --purple-bright: #b85cff;
  --purple-dark: #8126c7;
  --purple-deep: #2c1940;
  --purple-soft: #f1ebf7;
  --purple-faint: #faf7ff;
  --ink: #241c2d;
  --muted: #7c7483;
  --line: #e8e2ed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(168 70 242 / 25%);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 30px;
  border-bottom: 1px solid #eeeaf1;
  background: #ffffff;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: #211827;
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.brand-logo {
  display: inline-block;
  width: 32px;
  height: 29px;
  object-fit: contain;
}

.brand-symbol {
  position: relative;
  display: inline-block;
  width: 39px;
  height: 27px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 15px 15px 15px 5px;
  background: linear-gradient(135deg, var(--purple-bright), var(--purple-dark));
  transform: skewX(-10deg);
}

.brand-symbol::after {
  position: absolute;
  top: 8px;
  left: 12px;
  width: 20px;
  height: 10px;
  content: "";
  border-radius: 8px;
  background: #ffffff;
  transform: rotate(-6deg);
}

.language-pill {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #625a69;
  background: #ffffff;
  font-size: 12px;
}

.landing {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(400px, 1fr);
  min-height: calc(100vh - 74px);
}

.landing-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(40px, 4vw, 66px) clamp(30px, 3.8vw, 62px) 32px;
  background:
    radial-gradient(circle at 82% 18%, rgb(184 92 255 / 8%), transparent 30%),
    var(--purple-soft);
}

.intro-content {
  max-width: 710px;
}

.eyebrow {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 0 22px;
  color: #6f5d7c;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 1px;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  background: var(--purple);
}

.landing h1 {
  margin: 0;
  color: #211827;
  font-size: clamp(37px, 3.35vw, 53px);
  font-weight: 780;
  line-height: 1.25;
  letter-spacing: -2px;
}

.landing h1 em {
  color: var(--purple);
  font-style: normal;
}

.hero-description {
  margin: 22px 0 0;
  color: #746a7c;
  font-size: 13px;
  line-height: 2;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.feature-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  scroll-margin-top: 25px;
}

.feature-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgb(168 70 242 / 30%);
  border-radius: 8px;
  color: var(--purple);
  background: rgb(255 255 255 / 45%);
  font-size: 12px;
  font-weight: 700;
}

.feature-item strong,
.feature-item small {
  display: block;
}

.feature-item strong {
  margin: 1px 0 6px;
  color: #3b2e46;
  font-size: 12px;
}

.feature-item small {
  color: #8a7e92;
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 25px;
  margin-top: 27px;
}

.quick-links a {
  color: var(--purple-dark);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.quick-links a span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 150ms ease;
}

.quick-links a:hover span {
  transform: translateX(3px);
}

.live-preview {
  width: min(100%, 650px);
  margin-top: 40px;
  overflow: hidden;
  border: 1px solid rgb(91 57 114 / 8%);
  border-radius: 10px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 18px 45px rgb(63 33 85 / 10%);
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 17px;
  border-bottom: 1px solid #f0ebf3;
  color: #75667f;
  font-size: 10px;
}

.preview-top > span {
  display: flex;
  gap: 7px;
  align-items: center;
  font-weight: 650;
}

.preview-top i,
.status-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 0 4px rgb(184 92 255 / 10%);
}

.preview-top strong {
  color: #65546f;
  font-size: 10px;
  font-weight: 500;
}

.preview-top b {
  margin: 0 7px;
  color: var(--purple);
  font-size: 14px;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 45px;
}

.waveform span {
  width: 3px;
  height: 8px;
  border-radius: 4px;
  background: var(--purple);
  transform-origin: center;
}

.waveform span:nth-child(3n) {
  height: 22px;
}

.waveform span:nth-child(4n) {
  height: 30px;
}

.waveform span:nth-child(5n) {
  height: 15px;
}

.waveform span:nth-child(7n) {
  height: 36px;
}

.waveform[data-active="true"] span {
  animation: sound-wave 900ms ease-in-out infinite alternate;
}

.waveform[data-active="true"] span:nth-child(2n) {
  animation-delay: -300ms;
}

.waveform[data-active="true"] span:nth-child(3n) {
  animation-delay: -600ms;
}

@keyframes sound-wave {
  from { transform: scaleY(0.45); opacity: 0.45; }
  to { transform: scaleY(1); opacity: 1; }
}

.preview-wave {
  height: 62px;
  border-bottom: 1px solid #f0ebf3;
}

.preview-conversation {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.preview-conversation article {
  min-width: 0;
  padding: 16px 18px 18px;
}

.preview-conversation article + article {
  border-left: 1px solid #f0ebf3;
}

.preview-conversation small {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #9a8da2;
  font-size: 9px;
}

.preview-conversation small i,
.line-meta i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}

.preview-conversation small i.speaker-two,
.transcript-line[data-speaker="2"] .line-meta i {
  background: #d18bf5;
}

.preview-conversation p {
  margin: 11px 0 7px;
  color: #85798d;
  font-size: 10px;
}

.preview-conversation strong {
  color: var(--purple-dark);
  font-size: 11px;
  line-height: 1.6;
}

.preview-link {
  display: block;
  padding: 11px 17px;
  border-top: 1px solid #f0ebf3;
  color: var(--purple);
  font-size: 10px;
  font-weight: 650;
  text-align: right;
  text-decoration: none;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 45px 35px;
  background: #ffffff;
}

.login-card {
  width: min(100%, 365px);
  text-align: center;
}

.login-symbol {
  width: 58px;
  height: 40px;
  margin-bottom: 21px;
  border-radius: 22px 22px 22px 7px;
  box-shadow: 0 10px 24px rgb(168 70 242 / 15%);
}

.login-symbol::after {
  top: 12px;
  left: 17px;
  width: 30px;
  height: 15px;
}

.login-card h2 {
  margin: 0;
  color: #251b2d;
  font-size: 27px;
  letter-spacing: -1px;
}

.login-subtitle {
  margin: 10px 0 27px;
  color: #98909e;
  font-size: 11px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.form-field {
  display: block;
  padding: 9px 13px 8px;
  border: 1px solid #e2dce7;
  border-radius: 9px;
  background: #ffffff;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgb(168 70 242 / 10%);
}

.form-field span {
  display: block;
  color: #817788;
  font-size: 9px;
}

.form-field input {
  width: 100%;
  margin-top: 3px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #372c40;
  background: transparent;
  font-size: 13px;
}

.form-field input::placeholder {
  color: #b8b0be;
}

.login-button {
  height: 49px;
  margin-top: 2px;
  border: 0;
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple-bright), var(--purple));
  box-shadow: 0 12px 25px rgb(168 70 242 / 22%);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgb(168 70 242 / 28%);
}

.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.login-links button,
.register-row button {
  padding: 0;
  border: 0;
  color: #8c8195;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.login-links button:first-child,
.register-row button {
  color: var(--purple-dark);
}

.login-links button:hover,
.register-row button:hover {
  text-decoration: underline;
}

.register-row {
  margin: 30px 0 0;
  color: #9a919f;
  font-size: 10px;
}

.register-row button {
  margin-left: 8px;
}

.login-notice {
  min-height: 18px;
  margin: 12px 0 -4px;
  color: var(--purple-dark);
  font-size: 10px;
  line-height: 1.6;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: #aaa1af;
  font-size: 9px;
}

.divider::before,
.divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: #eee9f1;
}

.social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.social-button {
  height: 46px;
  border: 1px solid #e3dce8;
  border-radius: 8px;
  color: #44374d;
  background: #ffffff;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.social-button:hover {
  border-color: #cda9e4;
  background: var(--purple-faint);
}

.social-button b {
  margin-right: 6px;
  color: var(--purple);
}

.social-button-dark {
  border-color: var(--purple-deep);
  color: #ffffff;
  background: var(--purple-deep);
}

.social-button-dark:hover {
  border-color: #4b2b68;
  background: #4b2b68;
}

.privacy-note {
  margin: 16px 0 0;
  color: #b2a9b7;
  font-size: 8px;
}

.workspace-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px 80px;
  scroll-margin-top: 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--purple);
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -1px;
}

.section-heading p:not(.section-kicker) {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #e5ddea;
  border-radius: 30px;
  color: #887d90;
  background: var(--purple-faint);
  font-size: 10px;
  white-space: nowrap;
}

.status-badge i {
  background: #b5abb9;
  box-shadow: none;
}

.status-badge[data-active="true"] {
  border-color: rgb(168 70 242 / 22%);
  color: var(--purple-dark);
  background: #f3e8fb;
}

.status-badge[data-active="true"] i {
  background: var(--purple-bright);
  box-shadow: 0 0 0 4px rgb(184 92 255 / 12%);
  animation: status-pulse 1.2s ease-in-out infinite;
}

@keyframes status-pulse {
  50% { opacity: 0.4; }
}

.interpretation-shell {
  overflow: hidden;
  border: 1px solid #e5ddea;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 16px 45px rgb(44 25 64 / 7%);
}

.control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.language-controls,
.demo-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.language-controls label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #94899a;
  font-size: 10px;
}

.language-controls select {
  min-width: 105px;
  padding: 9px 28px 9px 11px;
  border: 1px solid #e1d8e7;
  border-radius: 7px;
  color: #4c3b58;
  background: var(--purple-faint);
  font-size: 11px;
  cursor: pointer;
}

.swap-button {
  width: 34px;
  height: 34px;
  border: 1px solid #e4d9eb;
  border-radius: 50%;
  color: var(--purple);
  background: #ffffff;
  font-size: 17px;
  cursor: pointer;
}

.swap-button:hover {
  background: var(--purple-faint);
}

.demo-actions button {
  padding: 10px 15px;
  border-radius: 7px;
  font-size: 11px;
  cursor: pointer;
}

.primary-action {
  border: 1px solid var(--purple);
  color: #ffffff;
  background: var(--purple);
  box-shadow: 0 7px 16px rgb(168 70 242 / 16%);
}

.primary-action:hover {
  background: var(--purple-dark);
}

.secondary-action {
  border: 1px solid #ddd2e4;
  color: var(--purple-dark);
  background: #ffffff;
}

.secondary-action:hover {
  background: var(--purple-faint);
}

.clear-action {
  border: 0;
  color: #9b919f;
  background: transparent;
}

.clear-action:hover {
  color: #b43766;
}

.stream-status {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 66px;
  padding: 8px 20px;
  border-top: 1px solid #eee8f1;
  border-bottom: 1px solid #eee8f1;
  background: var(--purple-faint);
}

.demo-wave {
  justify-content: flex-start;
  height: 40px;
}

.demo-wave[data-active="false"] span {
  opacity: 0.25;
}

.stream-status p {
  margin: 0;
  color: #85798d;
  font-size: 11px;
}

#line-counter {
  color: #a196a7;
  font-family: Georgia, serif;
  font-size: 10px;
  white-space: nowrap;
}

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

.transcript-panel {
  min-width: 0;
}

.translated-panel {
  border-left: 1px solid #eae3ee;
  background: #fdfbff;
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 21px;
  border-bottom: 1px solid #eee8f1;
}

.transcript-header h3 {
  margin: 0;
  color: #493653;
  font-size: 13px;
}

.transcript-header span {
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--purple-dark);
  background: #f0e5f8;
  font-size: 9px;
}

.transcript-content {
  height: 330px;
  overflow-y: auto;
  padding: 12px 21px;
  scroll-behavior: smooth;
}

.transcript-empty {
  display: grid;
  height: 100%;
  place-content: center;
  color: #a397a9;
  text-align: center;
}

.transcript-empty span {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid #e2d7e8;
  border-radius: 50%;
  color: #b498c4;
  background: var(--purple-faint);
  font-size: 12px;
}

.transcript-empty p {
  margin: 0;
  font-size: 10px;
}

.transcript-line {
  padding: 15px 0 16px;
  border-bottom: 1px dashed #e9e1ed;
  animation: line-arrive 240ms ease-out;
}

.transcript-line:last-child {
  border-bottom: 0;
}

@keyframes line-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.line-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #a092a7;
  font-size: 9px;
}

.line-meta i {
  display: inline-block;
}

.line-meta time {
  margin-left: auto;
  color: #b4aab9;
  font-family: Georgia, serif;
}

.transcript-line p {
  margin: 9px 0 0;
  color: #4a3a54;
  font-size: 13px;
  line-height: 1.8;
}

.translated-panel .transcript-line p {
  color: var(--purple-dark);
  font-weight: 600;
}

.demo-note {
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid #eee8f1;
  color: #aaa0af;
  background: #fdfbff;
  font-size: 9px;
  text-align: center;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 35px 24px;
  color: #d7c6e3;
  background: var(--purple-deep);
  text-align: center;
  scroll-margin-top: 20px;
}

.footer .brand-symbol {
  width: 34px;
  height: 24px;
}

.footer .brand-symbol::after {
  top: 7px;
  left: 10px;
  width: 18px;
  height: 9px;
  background: var(--purple-deep);
}

.footer p {
  margin: 13px 0 6px;
  font-size: 12px;
  letter-spacing: 1px;
}

.footer small {
  color: #9b83ac;
  font-size: 9px;
}

@media (max-width: 1080px) {
  .feature-list {
    gap: 12px;
  }

  .feature-item small {
    white-space: normal;
  }

  .landing-intro {
    padding-right: 32px;
    padding-left: 32px;
  }

  .control-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .demo-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .landing {
    grid-template-columns: 1fr;
  }

  .landing-intro {
    min-height: calc(100vh - 74px);
  }

  .intro-content,
  .live-preview {
    margin-right: auto;
    margin-left: auto;
  }

  .login-panel {
    min-height: 720px;
  }
}

@media (max-width: 700px) {
  .transcript-grid {
    grid-template-columns: 1fr;
  }

  .translated-panel {
    border-top: 1px solid #eae3ee;
    border-left: 0;
  }

  .transcript-content {
    height: 260px;
  }

  .stream-status {
    grid-template-columns: 110px 1fr;
  }

  #line-counter {
    display: none;
  }
}

@media (max-width: 620px) {
  .site-header {
    height: 66px;
    padding: 0 20px;
  }

  .brand {
    font-size: 17px;
  }

  .brand-logo {
    width: 28px;
    height: 26px;
  }

  .brand-symbol {
    width: 34px;
    height: 24px;
  }

  .brand-symbol::after {
    top: 7px;
    left: 10px;
    width: 18px;
    height: 9px;
  }

  .landing {
    min-height: calc(100vh - 66px);
  }

  .landing-intro {
    min-height: auto;
    padding: 38px 20px 24px;
  }

  .landing h1 {
    font-size: 36px;
    letter-spacing: -1.5px;
  }

  .hero-description {
    font-size: 12px;
  }

  .hero-description br {
    display: none;
  }

  .feature-list {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 27px;
  }

  .feature-item small {
    margin-top: -3px;
  }

  .quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .live-preview {
    margin-top: 32px;
  }

  .preview-conversation article {
    padding: 14px 12px;
  }

  .preview-conversation strong {
    font-size: 10px;
  }

  .login-panel {
    min-height: auto;
    padding: 55px 20px;
  }

  .workspace-section {
    padding: 50px 16px 55px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .control-bar {
    padding: 16px;
  }

  .language-controls {
    display: grid;
    grid-template-columns: 1fr 34px 1fr;
    width: 100%;
  }

  .language-controls label {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-controls select {
    width: 100%;
    min-width: 0;
  }

  .swap-button {
    align-self: end;
    margin-bottom: 1px;
  }

  .demo-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .stream-status {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px 16px;
  }

  .demo-wave {
    display: none;
  }

  .stream-status p {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .transcript-content {
    scroll-behavior: auto;
  }

  .waveform[data-active="true"] span,
  .status-badge[data-active="true"] i,
  .transcript-line {
    animation: none;
  }
}
