* {
  box-sizing: border-box;
}

:root {
  --bg: #f4efe6;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffdf8;
  --text: #3b2f2f;
  --muted: #6b5f56;
  --primary: #7b4b2a;
  --primary-dark: #5f361d;
  --border: #d9c7b4;
  --success-bg: #ecfdf3;
  --success-text: #166534;
  --error-bg: #fef2f2;
  --error-text: #b91c1c;
  --info-bg: #eff6ff;
  --info-text: #1d4ed8;
  --shadow: 0 18px 45px rgba(74, 43, 19, 0.12);
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Serif SC", serif;
  background:
    linear-gradient(rgba(244, 239, 230, 0.88), rgba(244, 239, 230, 0.92)),
    radial-gradient(circle at top, rgba(184, 134, 92, 0.2), transparent 35%),
    #f4efe6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 40px;
  background: rgba(255, 249, 242, 0.94);
  border-bottom: 1px solid rgba(121, 75, 42, 0.18);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #fff8ef;
  background: linear-gradient(135deg, #6f4324, #a46d43);
  box-shadow: 0 10px 20px rgba(123, 75, 42, 0.22);
}

.brand-text strong,
.brand-text span {
  display: block;
}

.brand-text strong {
  font-size: 18px;
}

.brand-text span {
  font-size: 12px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--primary-dark);
  background: rgba(123, 75, 42, 0.12);
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.hero-banner {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 26px;
}

.hero-copy,
.hero-side,
.section-card,
.auth-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(121, 75, 42, 0.18);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 36px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.18;
}

.hero-copy p {
  margin: 0 0 16px;
  line-height: 1.9;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-side {
  padding: 28px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.hero-side h2,
.section-card h2,
.auth-card h2,
.panel h2 {
  margin: 0 0 10px;
}

.hero-side ul,
.feature-list,
.bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
}

.feature-grid,
.panel-grid,
.three-grid {
  display: grid;
  gap: 20px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-card,
.auth-card,
.panel {
  padding: 24px;
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: rgba(123, 75, 42, 0.12);
  color: var(--primary-dark);
  font-size: 22px;
}

.section-card p,
.auth-card p,
.panel p,
.auth-description {
  color: var(--muted);
  line-height: 1.85;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-weight: 700;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffdf9;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary), #9d6a41);
  color: #fffaf4;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 22px rgba(123, 75, 42, 0.18);
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(123, 75, 42, 0.24);
}

.button-link.secondary,
button.secondary {
  background: rgba(123, 75, 42, 0.08);
  color: var(--primary-dark);
  box-shadow: none;
  border: 1px solid rgba(123, 75, 42, 0.18);
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.message-box,
.code-block,
.status-block {
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-box.info {
  background: var(--info-bg);
  color: var(--info-text);
}

.message-box.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.message-box.error {
  background: var(--error-bg);
  color: var(--error-text);
}

.code-block,
.status-block {
  background: #2f241d;
  color: #f9f3ea;
  min-height: 90px;
}

.inline-switch {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.inline-switch label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.auth-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 26px;
}

.auth-illustration {
  min-height: 100%;
  padding: 30px;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(123, 75, 42, 0.78), rgba(71, 45, 29, 0.92)),
    #5d3920;
  color: #fff8ef;
  box-shadow: var(--shadow);
}

.auth-illustration h1 {
  margin-top: 0;
  font-size: clamp(28px, 4vw, 38px);
}

.auth-illustration p {
  line-height: 1.9;
  color: rgba(255, 248, 239, 0.88);
}

.auth-card + .auth-card,
.panel + .panel {
  margin-top: 20px;
}

.site-footer {
  margin-top: 34px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero-banner,
  .auth-layout,
  .feature-grid,
  .panel-grid,
  .three-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 16px 20px;
  }
}
