/* =========================================================
   梧桐里 · 主站落地页
   星云背景 + DeepSeek 式布局 + 每日一题
   ========================================================= */

:root {
  --bg-deep: #030712;
  --ink: #f8faff;
  --ink-dark: #15213a;
  --muted-dark: #5f6d83;
  --blue: #4d6bfe;
  --blue-soft: #eef2ff;
  --green: #0f9d58;
  --green-soft: #eaf8f0;
  --red: #d93025;
  --red-soft: #fdeceb;
  --card: rgba(255, 255, 255, 0.95);
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #a9c1ff;
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(77, 107, 254, 0.32);
  color: #fff;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  color: #15213a;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   背景
   ========================================================= */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-deep);
}

.bg__image {
  position: absolute;
  inset: -3%;
  background: url("nebula.jpg?v=20261107") center 42% / cover no-repeat;
  filter: saturate(1.02) brightness(0.72) contrast(1.03);
  transform: scale(1.03);
  animation: bg-drift 64s ease-in-out infinite alternate;
}

.bg__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 46% at 50% 34%, rgba(46, 78, 160, 0.16), transparent 68%),
    linear-gradient(180deg, rgba(3, 8, 20, 0.62) 0%, rgba(3, 8, 20, 0.18) 30%, rgba(3, 8, 20, 0.5) 68%, rgba(3, 8, 20, 0.88) 100%);
}

.bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(ellipse 62% 56% at 50% 40%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse 62% 56% at 50% 40%, #000 12%, transparent 76%);
}

.bg__glow {
  position: absolute;
  top: 43%;
  left: 50%;
  width: min(1000px, 90vw);
  height: 560px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(77, 107, 254, 0.2), transparent 72%);
  filter: blur(30px);
}

@keyframes bg-drift {
  from {
    transform: scale(1.03) translate3d(-0.4%, -0.3%, 0);
  }
  to {
    transform: scale(1.07) translate3d(0.6%, 0.5%, 0);
  }
}

/* =========================================================
   顶栏
   ========================================================= */

.topbar {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 48px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
  width: fit-content;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.42));
}

.brand__name {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.38);
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s var(--ease-out),
    box-shadow 0.22s ease;
}

.login-link:hover {
  background: #fff;
  color: var(--ink-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.login-link:active {
  transform: translateY(0) scale(0.98);
}

/* =========================================================
   主内容
   ========================================================= */

.main {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  text-align: center;
  margin-top: clamp(64px, 10vh, 108px);
}

.hero__star {
  color: #a9c1ff;
  font-size: 14px;
  line-height: 1;
  margin-bottom: 17px;
  text-shadow: 0 0 20px rgba(126, 156, 255, 0.9);
}

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 6.2vw, 66px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  color: #f8faff;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.55);
}

/* =========================================================
   每日一题
   ========================================================= */

.quiz-card {
  position: relative;
  width: min(900px, 100%);
  margin-top: clamp(28px, 5vh, 44px);
  padding: 28px 32px 22px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--card);
  color: var(--ink-dark);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  backdrop-filter: blur(24px) saturate(1.12);
  animation: rise-in 0.7s var(--ease-out) 0.08s both;
}

.quiz-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.quiz-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.quiz-index {
  font-size: 11.5px;
  color: #8b98ac;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.quiz-question {
  margin: 0 0 18px;
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: #15213a;
}

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

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dfe5f1;
  background: #fff;
  color: #1b2a41;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.quiz-option:hover:not(:disabled) {
  border-color: #b9c6ff;
  background: #f8faff;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(77, 107, 254, 0.09);
}

.quiz-option:active:not(:disabled) {
  transform: scale(0.985);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(77, 107, 254, 0.12);
}

.quiz-option.is-correct {
  border-color: #78d2a1;
  background: var(--green-soft);
  color: #0b6b3a;
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.1);
}

.quiz-option.is-wrong {
  border-color: #f0a39d;
  background: var(--red-soft);
  color: #a0231b;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.08);
}

.quiz-option.is-dim {
  opacity: 0.55;
}

.quiz-key {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f4fa;
  color: #66748c;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.quiz-option.is-selected .quiz-key {
  background: var(--blue);
  color: #fff;
}

.quiz-option.is-correct .quiz-key {
  background: var(--green);
  color: #fff;
}

.quiz-option.is-wrong .quiz-key {
  background: var(--red);
  color: #fff;
}

.quiz-option__text {
  min-width: 0;
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 17px;
}

.quiz-hint {
  margin: 0;
  font-size: 12.5px;
  color: #7f8da1;
  letter-spacing: 0.02em;
  transition: color 0.18s ease;
}

.quiz-hint.is-correct {
  color: var(--green);
  font-weight: 600;
}

.quiz-hint.is-wrong {
  color: var(--red);
  font-weight: 600;
}

.quiz-card.is-answered .quiz-submit {
  display: none;
}

.quiz-card.is-answered .quiz-actions {
  justify-content: flex-start;
}

.quiz-submit {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(77, 107, 254, 0.34);
  transition:
    transform 0.18s var(--ease-out),
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.quiz-submit:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 13px 28px rgba(77, 107, 254, 0.42);
}

.quiz-submit:active:not(:disabled) {
  transform: scale(0.94);
}

.quiz-submit:disabled {
  background: #dbe2f0;
  color: #9aa8bf;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.quiz-submit .icon {
  width: 20px;
  height: 20px;
}

/* 答题反馈 */

.quiz-feedback {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #e1e7f4;
  border-radius: 14px;
  background: #f5f8ff;
  animation: feedback-in 0.26s var(--ease-out) both;
}

.quiz-feedback.is-correct {
  border-color: #cdeeda;
  background: var(--green-soft);
}

.quiz-feedback.is-wrong {
  border-color: #f6d3d0;
  background: var(--red-soft);
}

.quiz-feedback__icon {
  flex: none;
  margin-top: 1px;
  color: var(--blue);
}

.quiz-feedback.is-correct .quiz-feedback__icon {
  color: var(--green);
}

.quiz-feedback.is-wrong .quiz-feedback__icon {
  color: var(--red);
}

.quiz-feedback__icon .icon {
  width: 20px;
  height: 20px;
}

.quiz-feedback__body {
  flex: 1;
  min-width: 0;
}

.quiz-feedback__title {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 600;
  color: #15213a;
}

.quiz-feedback__text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted-dark);
}

.quiz-retry {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease;
}

.quiz-retry:hover {
  background: rgba(77, 107, 254, 0.09);
}

.quiz-retry .icon {
  width: 14px;
  height: 14px;
}

/* =========================================================
   快速入口
   ========================================================= */

.quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
  animation: rise-in 0.7s var(--ease-out) 0.16s both;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.95);
  color: #1b2a41;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.2s var(--ease-out),
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.quick-link:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}

.quick-link:active {
  transform: translateY(0) scale(0.99);
}

.quick-link .icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

/* =========================================================
   页脚 / 提示
   ========================================================= */

.landing-foot {
  margin-top: 42px;
  padding-bottom: 4px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  max-width: min(88vw, 440px);
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 20, 38, 0.92);
  color: #eef4ff;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================
   动画
   ========================================================= */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes feedback-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   响应式
   ========================================================= */

@media (max-width: 900px) {
  .topbar {
    padding: 22px 28px 0;
  }

  .hero {
    margin-top: clamp(52px, 8vh, 80px);
  }

  .quiz-card {
    padding: 25px 24px 20px;
    border-radius: 26px;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 18px 20px 0;
  }

  .brand {
    gap: 9px;
  }

  .brand__mark {
    width: 28px;
    height: 28px;
  }

  .brand__name {
    font-size: 18px;
    letter-spacing: 0.12em;
  }

  .login-link {
    min-width: 68px;
    padding: 8px 17px;
    font-size: 13px;
  }

  .main {
    padding: 0 18px 18px;
  }

  .hero {
    margin-top: 52px;
  }

  .hero__star {
    font-size: 12px;
    margin-bottom: 13px;
  }

  .hero__title {
    font-size: 38px;
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }

  .quiz-card {
    margin-top: 26px;
    padding: 20px 18px 17px;
    border-radius: 22px;
  }

  .quiz-card__top {
    margin-bottom: 12px;
  }

  .quiz-question {
    margin-bottom: 15px;
    font-size: 19px;
  }

  .quiz-options {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .quiz-option {
    min-height: 48px;
    padding: 10px 12px;
    font-size: 14.5px;
  }

  .quiz-actions {
    margin-top: 14px;
  }

  .quiz-submit {
    width: 43px;
    height: 43px;
  }

  .quiz-feedback {
    flex-wrap: wrap;
    gap: 9px;
    padding: 11px 12px;
  }

  .quiz-feedback__body {
    flex-basis: calc(100% - 31px);
  }

  .quiz-retry {
    margin-left: 29px;
  }

  .quick-links {
    flex-direction: column;
    width: min(100%, 340px);
    margin-top: 20px;
    gap: 9px;
  }

  .quick-link {
    justify-content: center;
    padding: 11px 18px;
    font-size: 13.5px;
  }

  .landing-foot {
    margin-top: 30px;
  }
}

@media (max-width: 420px) {
  .brand__name {
    font-size: 17px;
  }

  .hero__title {
    font-size: 34px;
  }

  .quiz-card {
    padding: 18px 15px 15px;
  }

  .quiz-badge {
    font-size: 10.5px;
  }

  .quiz-index {
    font-size: 10.5px;
  }

  .quiz-question {
    font-size: 18px;
  }

  .quiz-feedback__text {
    font-size: 12px;
  }
}

@media (max-height: 800px) and (min-width: 761px) {
  .hero {
    margin-top: 48px;
  }

  .quiz-card {
    margin-top: 24px;
    padding-top: 23px;
    padding-bottom: 18px;
  }

  .quick-links {
    margin-top: 18px;
  }

  .landing-foot {
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
