:root {
  color-scheme: dark;
  --bg: #05060a;
  --line: rgba(218, 229, 255, 0.23);
  --line-bright: rgba(238, 244, 255, 0.54);
  --text: #f6f7fb;
  --soft: #d7daea;
  --muted: #969db4;
  --blue: #58b9ff;
  --green: #4bd6ae;
  --violet: #8d72ff;
  --panel: rgba(7, 9, 18, 0.82);
  --glow: 0 18px 70px rgba(56, 92, 255, 0.18);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg) url("./metal-aurora-bg.png") center top / 100% auto fixed no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 4, 9, 0.54), rgba(3, 4, 9, 0.88)),
    radial-gradient(circle at 18% 10%, rgba(88, 185, 255, 0.14), transparent 34%),
    radial-gradient(circle at 84% 20%, rgba(75, 214, 174, 0.11), transparent 30%);
}

.app-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 10px 0 52px;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 18px;
}

.hero {
  position: relative;
  height: 220px;
  min-height: 220px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 184px);
  align-items: center;
  gap: 28px;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: 28px;
  padding: 14px 58px;
  background:
    linear-gradient(90deg, rgba(4, 6, 12, 0.97) 0%, rgba(4, 6, 12, 0.78) 52%, rgba(4, 6, 12, 0.18) 100%),
    url("./hero-bg.jpg") center right / cover no-repeat;
  box-shadow: inset 0 0 90px rgba(37, 72, 158, 0.22), var(--glow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -52% 40%;
  height: 80%;
  background: url("./metal-aurora-bg.png") center / cover no-repeat;
  opacity: 0.26;
  filter: blur(18px);
  pointer-events: none;
}

.hero-copy,
.hero-object {
  position: relative;
  z-index: 1;
}

.hero-copy {
  width: min(760px, 72vw);
}

.hero-tagline {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}

.hero-yichu-link {
  display: inline-flex;
  align-items: center;
  height: 46px;
}

.hero-yichu-mark {
  width: clamp(82px, 10vw, 132px);
  max-height: 46px;
  width: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(43, 116, 255, 0.3));
}

.hero-line {
  margin: 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.6;
}

h1 {
  margin: 0;
  color: var(--text);
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: clamp(56px, 7vw, 92px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(108, 136, 255, 0.28);
}

.hero-object {
  align-self: stretch;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 184px;
  transform: translateY(20px);
}

.hero-object img {
  width: clamp(112px, 14vw, 184px);
  height: clamp(112px, 14vw, 184px);
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(74, 154, 255, 0.38));
}

.chat-panel {
  position: relative;
  min-height: clamp(300px, 34vh, 360px);
  height: auto;
  display: grid;
  grid-template-rows: auto auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 9, 18, 0.54);
  box-shadow: var(--glow);
  overflow: hidden;
}

.chat-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 40%),
    radial-gradient(circle at 82% 28%, rgba(88, 185, 255, 0.14), transparent 34%),
    radial-gradient(circle at 26% 80%, rgba(75, 214, 174, 0.08), transparent 36%);
  pointer-events: none;
}

.chat-teapot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(34vw, 370px);
  max-width: none;
  opacity: 0.28;
  transform: translate(-50%, -50%);
  filter: brightness(1.12) drop-shadow(0 0 28px rgba(88, 185, 255, 0.2));
  pointer-events: none;
  user-select: none;
}

.messages {
  position: relative;
  z-index: 1;
  min-height: 180px;
  padding: 28px;
  overflow: visible;
}

.message {
  max-width: min(780px, 78%);
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.75;
  font-size: 16px;
  white-space: pre-wrap;
}

.message.assistant {
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(238, 244, 255, 0.18);
  backdrop-filter: blur(4px);
}

.message.user {
  margin-left: auto;
  color: #06110f;
  background: linear-gradient(135deg, rgba(75, 214, 174, 0.78), rgba(88, 185, 255, 0.78));
  box-shadow: 0 10px 34px rgba(88, 185, 255, 0.16);
  backdrop-filter: blur(4px);
}

.message.contact-message {
  max-width: min(780px, 92%);
}

.contact-intro {
  margin-bottom: 12px;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-field {
  display: grid;
  gap: 6px;
}

.contact-field span {
  color: var(--soft);
  font-size: 14px;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(238, 244, 255, 0.24);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  line-height: 1.55;
  outline: none;
}

.contact-field textarea {
  resize: vertical;
  min-height: 82px;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: rgba(88, 185, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(88, 185, 255, 0.14);
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-actions button {
  min-height: 40px;
  padding: 0 18px;
}

.contact-status {
  color: var(--soft);
  font-size: 14px;
}

.chat-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(3, 4, 9, 0.32);
  backdrop-filter: blur(10px);
}

textarea {
  width: 100%;
  resize: none;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(238, 244, 255, 0.24);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.018);
  font: inherit;
  line-height: 1.55;
}

textarea::placeholder {
  color: rgba(215, 218, 234, 0.54);
}

textarea:focus {
  border-color: rgba(88, 185, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(88, 185, 255, 0.14);
}

button {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #06110f;
  background: linear-gradient(135deg, var(--green), var(--blue));
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.site-footer {
  width: 100%;
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 28px max(24px, calc((100vw - 1180px) / 2));
  color: var(--muted);
  background: rgba(3, 4, 9, 0.82);
  backdrop-filter: blur(18px);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  font-size: 16px;
}

.footer-legal a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
}

.footer-legal span {
  color: var(--text);
  font-weight: 700;
}

.footer-qrcode {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--soft);
  font-size: 12px;
}

.footer-qrcode img {
  width: 82px;
  height: 82px;
  display: block;
  border-radius: 10px;
  padding: 5px;
  background: #fff;
  object-fit: contain;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 18px;
    grid-template-rows: auto auto;
  }

  .hero {
    height: 220px;
    min-height: 220px;
    grid-template-columns: minmax(0, 1fr) minmax(84px, 132px);
    gap: 8px;
    padding: 22px 18px;
  }

  .hero-tagline {
    display: block;
  }

  .hero-line {
    margin-top: 8px;
    font-size: 14px;
  }

  .hero-yichu-mark {
    max-width: 184px;
  }

  h1 {
    font-size: clamp(42px, 15vw, 66px);
  }

  .hero-object {
    min-height: 132px;
    transform: translateY(20px);
  }

  .hero-object img {
    width: clamp(84px, 30vw, 132px);
    height: clamp(84px, 30vw, 132px);
  }

  .chat-teapot {
    left: 50%;
    top: 50%;
    width: 260px;
    opacity: 0.18;
  }

  .chat-panel {
    min-height: 360px;
  }

  .messages {
    padding: 18px;
  }

  .message {
    max-width: 92%;
    font-size: 15px;
  }

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

  button {
    min-height: 42px;
  }

  .site-footer {
    padding: 24px 18px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-legal {
    gap: 14px 20px;
    font-size: 14px;
  }
}
