:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  --radius-panel: 28px;
  --radius-card: 8px;
  --radius-pill: 999px;
  --shadow-soft: 0 24px 70px rgba(8, 14, 28, 0.14);
  --max-width: 1180px;
  --bg: #e9edf2;
  --bg-layer: #e9edf2;
  --surface: #e9edf2;
  --surface-strong: #f3f6fa;
  --text: #152033;
  --muted: #637084;
  --line: rgba(92, 103, 120, 0.18);
  --accent: #2f6bff;
  --accent-2: #00a884;
  --accent-3: #e58b37;
  --button-text: #ffffff;
  --outer-shadow: 16px 16px 34px rgba(173, 181, 194, 0.74), -16px -16px 34px rgba(255, 255, 255, 0.86);
  --inner-shadow: inset 10px 10px 20px rgba(178, 186, 198, 0.68), inset -10px -10px 20px rgba(255, 255, 255, 0.86);
  --edge-line: rgba(255, 255, 255, 0.7);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(145deg, #f2f5f8 0%, #e5eaf0 44%, #dfe5eb 100%);
}

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

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 18px;
  width: min(var(--max-width), calc(100% - 32px));
  min-height: 72px;
  margin: 16px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--edge-line);
  border-radius: var(--radius-pill);
  background: var(--bg-layer);
  box-shadow: var(--outer-shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  border-color: rgba(255, 255, 255, 0.78);
}

.login-trigger,
.primary-action,
.secondary-action,
.search-shell button,
.modal-close {
  min-height: 44px;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-trigger {
  min-width: 86px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.28);
  font-weight: 800;
}

.login-trigger.is-logged-in {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav a {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 34px;
  width: min(var(--max-width), calc(100% - 32px));
  min-height: calc(100vh - 114px);
  margin: 26px auto 0;
  padding: 42px 0 28px;
  align-items: center;
}

.hero-copy,
.workspace-preview,
.section,
.api-panel,
.login-modal {
  border: 1px solid var(--edge-line);
  background: var(--surface);
  box-shadow: var(--outer-shadow);
  backdrop-filter: blur(20px);
}

.hero-copy {
  padding: clamp(28px, 5vw, 52px);
  border-radius: var(--radius-panel);
}

.hero-copy,
.workspace-preview,
.section,
.api-panel,
.login-modal {
  border-color: rgba(255, 255, 255, 0.72);
}

.eyebrow,
.section-heading span,
.gateway-copy > span,
.preview-header span,
.api-topline span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: var(--accent);
  background: var(--surface-strong);
  font-size: 13px;
  font-weight: 900;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 146px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-weight: 900;
}

.primary-action {
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 32px rgba(47, 107, 255, 0.28);
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-strong);
}

.login-trigger:hover,
.primary-action:hover,
.secondary-action:hover,
.search-shell button:hover,
.modal-close:hover {
  transform: translateY(-2px);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-row div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-strong);
}

.metric-row strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.metric-row span {
  color: var(--muted);
  font-size: 13px;
}

.workspace-preview {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-panel);
}

.workspace-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.22;
}

.workspace-preview::before {
  opacity: 0.08;
}

.preview-header,
.search-shell,
.today-grid,
.api-topline,
.api-list div,
.project-card > div {
  position: relative;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.preview-header img {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 18px 36px rgba(47, 107, 255, 0.25);
}

.preview-header strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.search-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  margin-bottom: 18px;
  padding: 12px 12px 12px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--inner-shadow);
}

.search-shell span {
  color: var(--muted);
  font-weight: 700;
}

.search-shell button {
  min-width: 110px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  font-weight: 900;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.today-grid article,
.learning-lane article,
.module-card,
.project-card,
.roadmap div {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-strong);
}

.today-grid article,
.learning-lane article,
.module-card,
.project-card,
.roadmap div,
.metric-row div,
.api-list div {
  box-shadow: 8px 8px 18px rgba(173, 181, 194, 0.45), -8px -8px 18px rgba(255, 255, 255, 0.72);
}

.today-grid span,
.module-card span,
.project-card span {
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.today-grid strong,
.module-card b,
.project-card b,
.learning-lane b,
.roadmap b {
  display: block;
  margin: 8px 0;
  font-size: 18px;
}

.today-grid p,
.module-card p,
.project-card p,
.learning-lane p,
.roadmap p,
.gateway-copy p,
.api-list span,
.modal-note {
  margin-bottom: 0;
  color: var(--muted);
}

.section {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 18px auto;
  padding: clamp(24px, 4vw, 42px);
  border-radius: var(--radius-panel);
}

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

.section-heading h2 {
  max-width: 760px;
}

.learning-lane,
.module-grid,
.project-grid,
.roadmap {
  display: grid;
  gap: 14px;
}

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

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

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

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: center;
}

.gateway-copy p {
  max-width: 620px;
  margin: 18px 0 24px;
  font-size: 17px;
}

.gateway-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gateway-points span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.api-panel {
  min-height: 320px;
  padding: 22px;
  border-radius: 22px;
}

.api-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.api-topline strong {
  font-size: 34px;
}

.api-list {
  display: grid;
  gap: 12px;
}

.api-list div {
  min-height: 72px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-strong);
}

.api-list b,
.api-list span {
  display: block;
}

.project-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-card small {
  color: var(--muted);
  font-weight: 800;
}

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

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 22px auto 32px;
  color: var(--muted);
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 9, 18, 0.56);
}

.modal-backdrop.is-open {
  display: flex;
}

.login-modal {
  position: relative;
  width: min(430px, 100%);
  padding: 28px;
  border-radius: 26px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  min-height: 42px;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-strong);
  font-size: 26px;
  line-height: 1;
}

.modal-title {
  padding-right: 32px;
  text-align: left;
}

.modal-title span {
  color: var(--accent-2);
  font-weight: 900;
}

.modal-title h2 {
  margin: 6px 0 20px;
  font-size: 28px;
}

.qr-shell {
  display: grid;
  place-items: center;
  width: min(272px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.qr-shell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-status {
  min-height: 28px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}

.modal-action {
  width: 100%;
  border: 0;
}

.modal-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.modal-note {
  margin-top: 14px;
  font-size: 13px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto auto 1fr;
    border-radius: 28px;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    display: none;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 22px;
  }

  .learning-lane,
  .module-grid,
  .project-grid,
  .roadmap {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    width: calc(100% - 20px);
    grid-template-columns: auto 1fr;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
  }

  .brand span {
    font-size: 15px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .hero,
  .section,
  .footer {
    width: calc(100% - 20px);
  }

  .hero {
    gap: 14px;
    margin-top: 14px;
  }

  .hero-copy,
  .workspace-preview,
  .section,
  .login-modal {
    border-radius: 20px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-actions,
  .metric-row,
  .today-grid,
  .learning-lane,
  .module-grid,
  .project-grid,
  .roadmap {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .metric-row {
    display: grid;
  }

  .search-shell {
    align-items: stretch;
    flex-direction: column;
    border-radius: 18px;
  }

  .search-shell button {
    width: 100%;
  }

  .section-heading {
    display: block;
  }

  .section-heading span {
    margin-bottom: 12px;
  }

  .footer {
    flex-direction: column;
  }
}
