:root {
  --bg: #0c1d35;
  --bg-soft: #122a4b;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-dark: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.24);
  --text: #f3f7ff;
  --text-dark: #1f3152;
  --text-soft: #d7e3f8;
  --brand: #2f82ff;
  --brand-2: #1fc4a5;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Barlow", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% -10%, #204a80 0%, #142b4b 35%, #0a182c 100%);
}

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

.legacy-settings-hidden {
  display: none !important;
}

.hidden {
  display: none !important;
}

.landing-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 12%, rgba(31, 196, 165, 0.22) 0%, rgba(31, 196, 165, 0) 40%),
    radial-gradient(circle at 8% 28%, rgba(47, 130, 255, 0.22) 0%, rgba(47, 130, 255, 0) 42%);
}

.landing-header,
.landing-main,
.landing-footer {
  position: relative;
  width: min(1180px, 94vw);
  margin: 0 auto;
}

.landing-header {
  padding: 24px 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 4px 8px 4px 4px;
  transition: transform 0.16s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
  border-color: rgba(147, 185, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(8, 23, 46, 0.36);
}

.brand:focus-visible {
  outline: none;
  border-color: rgba(173, 204, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(104, 156, 255, 0.22);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  background: linear-gradient(150deg, #63b5ff 0%, #2f82ff 46%, #1d57d8 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 8px 20px rgba(7, 22, 44, 0.4);
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.brand-logo::after {
  content: "";
  position: absolute;
  inset: 1px 1px 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.brand:hover .brand-logo {
  transform: scale(1.04);
  box-shadow: 0 12px 24px rgba(9, 27, 56, 0.45);
}

.brand-text strong {
  display: block;
  font-size: 18px;
  font-family: "Space Grotesk", sans-serif;
}

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

.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.header-actions .nav-dropdown {
  position: relative;
}

.header-actions .nav-dropdown > summary {
  list-style: none;
}

.header-actions .nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.header-actions .nav-dropdown-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-actions .nav-dropdown-summary::after {
  content: "▾";
  font-size: 11px;
  opacity: 0.85;
  transition: transform 0.15s ease;
}

.header-actions .nav-dropdown[open] .nav-dropdown-summary::after {
  transform: rotate(180deg);
}

.header-actions .nav-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  min-width: 168px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 24, 46, 0.95);
  box-shadow: 0 16px 30px rgba(3, 12, 24, 0.45);
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 70;
}

.header-actions .nav-dropdown-menu a {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 8px 10px;
  color: #eff6ff;
  font-size: 13px;
}

.header-actions .nav-dropdown-menu a:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.header-actions .nav-dropdown-menu a.is-active {
  border-color: rgba(139, 183, 255, 0.52);
  background: rgba(71, 127, 226, 0.28);
}

.has-user-settings-menu .header-actions > a[href$="social.html"] {
  display: none !important;
}

.header-actions .lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #eff6ff;
  font-size: 12px;
}

.header-actions .lang-switch label {
  white-space: nowrap;
  font-weight: 600;
}

.header-actions .lang-switch select {
  border: 0;
  outline: none;
  background: transparent;
  color: #eff6ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.header-actions .user-settings-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 40;
}

.header-actions .user-settings-trigger {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  color: #eff6ff;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.header-actions .user-settings-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #4f8fe7 0%, #396fca 100%);
  overflow: hidden;
}

.header-actions .user-settings-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-actions .user-settings-meta {
  display: grid;
  gap: 1px;
}

.header-actions .user-settings-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.header-actions .user-settings-status {
  font-size: 11px;
  line-height: 1.05;
  color: #d5e2fb;
  white-space: nowrap;
}

.header-actions .user-settings-caret {
  font-size: 11px;
  color: #e3ecff;
}

.header-actions .user-settings-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(250px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 24, 46, 0.95);
  box-shadow: 0 16px 32px rgba(3, 12, 24, 0.5);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.header-actions .user-settings-popover.hidden {
  display: none;
}

.header-actions .user-settings-section {
  border-radius: 10px;
  padding: 8px;
}

.header-actions .user-settings-heading {
  font-size: 12px;
  font-weight: 700;
  color: #d8e7ff;
  background: rgba(255, 255, 255, 0.08);
}

.header-actions .user-settings-links {
  display: grid;
  gap: 4px;
}

.header-actions .user-settings-link {
  display: block;
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f7ff;
  font-size: 12px;
  font-weight: 600;
}

.header-actions .user-settings-language {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 6px;
}

.header-actions .user-settings-language label {
  font-size: 12px;
  color: #d9e8ff;
}

.header-actions .user-settings-language select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #eff6ff;
  font-size: 12px;
}

.header-actions .user-settings-action {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #f4f8ff;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 10px;
  cursor: pointer;
}

.btn {
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(145deg, var(--brand) 0%, #1f57de 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(36, 102, 228, 0.36);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
  color: #f2f7ff;
}

.header-actions .btn.is-active {
  background: linear-gradient(145deg, var(--brand) 0%, #1f57de 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 18px rgba(43, 97, 212, 0.24);
}

.btn-lg {
  padding: 12px 18px;
  font-size: 16px;
}

.landing-main {
  padding: 8px 0 34px;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}

.hero-copy,
.hero-panel,
.subject-card,
.workflow {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-dark);
  backdrop-filter: blur(8px);
}

.hero-copy {
  padding: 26px;
}

.hero-kicker {
  margin: 0;
  color: #9fd4ff;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.hero-copy h1 {
  margin: 10px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.hero-copy > p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #e0ebff;
  max-width: 700px;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-points {
  margin: 16px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #daebff;
}

.inline-jump {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.inline-jump:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.78);
}

.hero-panel {
  padding: 22px;
}

.hero-panel h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 23px;
}

.hero-panel ul {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: #d8e8ff;
}

.key-link {
  display: inline-block;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.key-link:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.78);
}

.subject-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.subject-card {
  padding: 16px 14px;
  min-height: 212px;
}

.subject-card-link {
  display: block;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.subject-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(5, 19, 41, 0.26);
  border-color: rgba(255, 255, 255, 0.5);
}

.subject-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
}

.subject-card p {
  margin: 8px 0 0;
  color: #d7e7ff;
  line-height: 1.6;
  font-size: 14px;
}

.subject-card span {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 8px;
  color: #eef6ff;
}

.subject-card-cta {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-style: normal;
  color: #d7e8ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.subject-card.typing {
  background: linear-gradient(150deg, rgba(35, 95, 170, 0.46) 0%, rgba(17, 49, 92, 0.52) 100%);
}

.subject-card.math {
  background: linear-gradient(150deg, rgba(47, 99, 200, 0.46) 0%, rgba(26, 66, 136, 0.52) 100%);
}

.subject-card.chinese {
  background: linear-gradient(150deg, rgba(33, 126, 159, 0.46) 0%, rgba(18, 91, 116, 0.52) 100%);
}

.subject-card.english {
  background: linear-gradient(150deg, rgba(31, 141, 126, 0.46) 0%, rgba(18, 104, 88, 0.52) 100%);
}

.workflow {
  margin-top: 14px;
  padding: 18px;
}

.workflow h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
}

.steps {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps article {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.steps strong {
  display: block;
  font-size: 18px;
  font-family: "Space Grotesk", sans-serif;
}

.steps p {
  margin: 8px 0 0;
  color: #dbebff;
  line-height: 1.6;
  font-size: 14px;
}

.step-action {
  margin-top: 10px;
  display: inline-block;
  color: #f4f8ff;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.52);
}

.edu-thought {
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 18px;
}

.edu-thought h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
}

.edu-thought > p {
  margin: 10px 0 0;
  color: #deecff;
  line-height: 1.7;
}

.thought-grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.thought-grid article {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.thought-grid strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
}

.thought-grid p {
  margin: 8px 0 0;
  color: #d9e9ff;
  line-height: 1.6;
  font-size: 14px;
}

.thought-action {
  margin-top: 10px;
  display: inline-block;
  font-size: 13px;
  color: #f6fbff;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.52);
}

.version-log,
.about-mini {
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(8px);
  padding: 18px;
}

.version-log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.version-log h2,
.about-mini h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 25px;
}

.version-log p,
.about-mini p {
  margin: 10px 0 0;
  color: #dfecff;
  line-height: 1.7;
}

.version-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.version-item {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
}

.version-item summary {
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.version-item ul {
  margin: 10px 0 2px;
  padding-left: 18px;
  color: #dceaff;
  display: grid;
  gap: 8px;
}

.page-hero {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-dark);
  backdrop-filter: blur(8px);
  padding: 24px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-family: "Space Grotesk", sans-serif;
}

.page-hero p {
  margin: 10px 0 0;
  color: #dceaff;
  line-height: 1.7;
}

.landing-footer {
  padding: 0 0 24px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  color: #d1e3ff;
  font-size: 14px;
}

.landing-footer a {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
}

.landing-footer a.is-active {
  border-bottom-style: solid;
  color: #ffffff;
  font-weight: 700;
}

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

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

  .steps {
    grid-template-columns: 1fr;
  }

  .thought-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .landing-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .user-settings-menu {
    margin-left: auto;
  }

  .header-actions .btn {
    flex: 1;
    text-align: center;
  }

  .header-actions .nav-dropdown {
    width: 100%;
  }

  .header-actions .nav-dropdown-summary {
    width: 100%;
    justify-content: center;
  }

  .header-actions .nav-dropdown-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .header-actions .user-settings-popover {
    right: 0;
    left: auto;
  }

  .hero-copy,
  .hero-panel,
  .workflow {
    padding: 16px;
  }

  .version-log,
  .about-mini,
  .page-hero {
    padding: 16px;
  }

  .subject-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy > p {
    font-size: 15px;
  }
}
