/* 萌新科技官网基础样式 */
:root {
  --bg: #0b0f19;
  --surface: #111827;
  --surface-alt: #1a2130;
  --text: #f1f5f9;
  --muted: rgba(241, 245, 249, 0.75);
  --primary: #4f46e5;
  --primary-2: #8b5cf6;
  --border: rgba(241, 245, 249, 0.15);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --max-width: 1080px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(circle at top, #1e293b 0%, #06070d 80%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 2rem 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 7, 13, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(241, 245, 249, 0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}

.brand p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-weight: 500;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(241, 245, 249, 0.2);
  background: rgba(15, 23, 42, 0.5);
  color: rgba(241, 245, 249, 0.8);
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.lang-btn:hover {
  background: rgba(79, 70, 229, 0.18);
}

.lang-btn[aria-pressed="true"] {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.32);
  color: #fff;
}

.nav a {
  position: relative;
  padding: 0.25rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 2px;
  background: transparent;
  transition: background 150ms ease;
}

.nav a:hover::after {
  background: var(--primary);
}

.hero {
  padding: 6rem 0 5rem;
  text-align: center;
}

.hero h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 1rem;
}

.hero p {
  max-width: 55ch;
  margin: 0 auto 2.5rem;
  color: var(--muted);
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 18px 30px rgba(79, 70, 229, 0.28);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(79, 70, 229, 0.35);
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background: rgba(15, 23, 42, 0.72);
}

.section h2 {
  margin: 0 0 1.5rem;
  text-align: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 19, 30, 0.75);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.features {
  max-width: 780px;
  margin: 1.5rem auto 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.features li {
  background: rgba(79, 70, 229, 0.1);
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.chat-panel {
  max-width: 860px;
  margin: 2rem auto 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: rgba(15, 19, 30, 0.80);
  border: 1px solid rgba(241, 245, 249, 0.12);
  box-shadow: var(--shadow);
}

.chat-messages {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid rgba(241, 245, 249, 0.08);
  border-radius: calc(var(--radius) / 1.2);
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  margin-bottom: 1rem;
  display: grid;
  gap: 0.75rem;
}

.chat-bubble {
  max-width: 78%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble.user {
  justify-self: end;
  background: rgba(79, 70, 229, 0.22);
  border: 1px solid rgba(79, 70, 229, 0.35);
}

.chat-bubble.bot {
  justify-self: start;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(241, 245, 249, 0.12);
}

.chat-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chat-input {
  flex: 1 1 0;
  min-width: 220px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(241, 245, 249, 0.15);
  background: rgba(6, 7, 13, 0.6);
  color: var(--text);
}

.chat-input::placeholder {
  color: rgba(241, 245, 249, 0.5);
}

.chat-tip {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: rgba(241, 245, 249, 0.65);
}

.contact-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: rgba(16, 24, 40, 0.8);
  border: 1px solid rgba(241, 245, 249, 0.12);
}

.contact-card h3 {
  margin: 0 0 0.5rem;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
}

.footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(241, 245, 249, 0.1);
  text-align: center;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
