:root {
  --navy: #12233d;
  --navy-deep: #0c192c;
  --red: #e93245;
  --red-dark: #cc2638;
  --paper: #f7f4ef;
  --white: #ffffff;
  --ink: #172238;
  --muted: #6f7785;
  --line: #e4e6e9;
  --shadow: 0 24px 70px rgba(16, 34, 58, .13);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, label[for] { cursor: pointer; }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 78px 1fr 52px;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(28px, 6vw, 92px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(18,35,61,.08);
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--red);
  border-radius: 11px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-family: "Noto Serif SC", "Songti SC", serif; font-size: 21px; letter-spacing: .08em; }
.brand-copy small { margin-top: 6px; color: #858b95; font-size: 8px; letter-spacing: .28em; }
.back-home { display: inline-flex; align-items: center; gap: 10px; color: #4f5968; font-size: 14px; transition: color .2s ease; }
.back-home span { color: var(--red); font-size: 17px; }
.back-home:hover { color: var(--red); }

.login-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(470px, .92fr); min-height: 650px; }

.intro-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(58px, 6vw, 96px) clamp(40px, 7vw, 108px);
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 18%, rgba(255,255,255,.9), transparent 27%),
    linear-gradient(145deg, #fbf8f3 0%, #f4f0e9 60%, #eef2f6 100%);
}

.intro-panel::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -220px;
  top: -190px;
  border: 1px solid rgba(18,35,61,.06);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(18,35,61,.02), 0 0 0 140px rgba(18,35,61,.012);
}

.intro-content { position: relative; z-index: 2; max-width: 650px; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin: 0 0 24px; color: #ff7180; font-weight: 700; font-size: 13px; letter-spacing: .22em; }
.eyebrow span { width: 32px; height: 2px; background: var(--red); }
.intro-content h1 { margin: 0; font-size: clamp(38px, 4vw, 62px); line-height: 1.23; letter-spacing: -.035em; }
.intro-content h1 em { color: var(--red); font-style: normal; }
.intro-text { max-width: 590px; margin: 26px 0 32px; color: #687386; font-size: 16px; line-height: 2; }
.exam-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.exam-tags span { display: flex; align-items: center; gap: 10px; padding: 10px 15px 10px 10px; color: #4e5b6e; background: rgba(255,255,255,.8); border: 1px solid #e0e3e7; border-radius: 7px; box-shadow: 0 8px 22px rgba(18,35,61,.05); font-size: 13px; backdrop-filter: blur(5px); }
.exam-tags b { min-width: 43px; padding: 6px 8px; text-align: center; color: #fff; background: var(--red); border-radius: 4px; font-size: 12px; }
.feature-row { display: flex; gap: clamp(24px, 3vw, 52px); margin-top: 54px; }
.feature-row div { display: grid; gap: 7px; }
.feature-row strong { font-size: 18px; }
.feature-row span { color: #8b93a0; font-size: 12px; }

.visual-card {
  position: absolute;
  right: -90px;
  bottom: 42px;
  width: 330px;
  padding: 25px;
  opacity: .72;
  color: #fff;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 18px;
  background: linear-gradient(145deg, #213653, #14263f);
  transform: rotate(-6deg);
  backdrop-filter: blur(9px);
}
.visual-card-top, .progress-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.status-dot { color: #ff7b88; }
.score-ring { width: 105px; height: 105px; display: grid; place-content: center; margin: 25px auto; text-align: center; border: 7px solid rgba(255,255,255,.12); border-top-color: var(--red); border-radius: 50%; }
.score-ring strong { font-size: 29px; }
.score-ring small { color: rgba(255,255,255,.55); font-size: 10px; }
.progress-track { height: 6px; margin-top: 8px; overflow: hidden; background: rgba(255,255,255,.12); border-radius: 10px; }
.progress-track i { display: block; width: 68%; height: 100%; background: var(--red); }
.question-lines { display: grid; gap: 8px; margin-top: 23px; }
.question-lines i { display: block; height: 7px; background: rgba(255,255,255,.13); border-radius: 9px; }
.question-lines i:nth-child(2) { width: 82%; }
.question-lines i:nth-child(3) { width: 64%; }
.decor { position: absolute; border-radius: 50%; background: var(--red); opacity: .55; }
.decor-one { width: 8px; height: 8px; left: 9%; bottom: 13%; }
.decor-two { width: 5px; height: 5px; left: 68%; top: 17%; }

.form-panel { display: grid; place-items: center; padding: 45px clamp(34px, 5vw, 84px); background: #fbfaf8; }
.login-card { width: min(100%, 460px); }
.mobile-brand { display: none; }
.welcome { margin: 0 0 11px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .2em; }
.login-card h2 { margin: 0; font-size: 35px; letter-spacing: -.02em; }
.login-lead { margin: 12px 0 28px; color: var(--muted); font-size: 14px; }
.login-switch > input { position: absolute; opacity: 0; pointer-events: none; }
.switch-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 27px; border-bottom: 1px solid var(--line); }
.switch-tabs label { position: relative; padding: 13px 0; color: #8a9099; text-align: center; font-size: 14px; font-weight: 600; }
.switch-tabs label::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px; background: transparent; }
#account-mode:checked ~ .switch-tabs label[for="account-mode"],
#phone-mode:checked ~ .switch-tabs label[for="phone-mode"] { color: var(--ink); }
#account-mode:checked ~ .switch-tabs label[for="account-mode"]::after,
#phone-mode:checked ~ .switch-tabs label[for="phone-mode"]::after { background: var(--red); }

.login-form { display: grid; }
.phone-form { display: none; }
#phone-mode:checked ~ .account-form { display: none; }
#phone-mode:checked ~ .phone-form { display: grid; }
.login-form > label:not(.remember) { margin: 0 0 9px; font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; margin-bottom: 19px; }
.input-wrap svg { position: absolute; left: 15px; top: 50%; width: 19px; height: 19px; fill: none; stroke: #9ba1aa; stroke-width: 1.6; transform: translateY(-50%); }
.input-wrap input { width: 100%; height: 52px; padding: 0 16px 0 46px; color: var(--ink); background: #fff; border: 1px solid #dfe2e6; border-radius: 7px; outline: none; transition: border .2s ease, box-shadow .2s ease; }
.input-wrap input::placeholder { color: #b1b5bb; font-size: 13px; }
.input-wrap input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(233,50,69,.09); }
.form-options { display: flex; align-items: center; justify-content: space-between; margin: 0 0 25px; font-size: 12px; }
.remember { display: flex; align-items: center; gap: 7px; color: #707782; font-size: 12px; }
.remember input { accent-color: var(--red); }
.form-options a, .support a { color: var(--red); }
.form-options a:hover, .support a:hover { text-decoration: underline; }
.submit-btn { height: 54px; display: flex; align-items: center; justify-content: center; gap: 22px; color: #fff; background: var(--red); border: 0; border-radius: 7px; box-shadow: 0 10px 24px rgba(233,50,69,.22); font-weight: 700; transition: background .2s ease, transform .2s ease; }
.submit-btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.submit-btn span { font-size: 19px; }
.code-row { display: grid; grid-template-columns: 1fr 118px; gap: 10px; }
.code-btn { height: 52px; color: var(--red); background: #fff; border: 1px solid rgba(233,50,69,.4); border-radius: 7px; font-size: 12px; }
.agreement { margin: 2px 0 22px; }
.support { margin-top: 28px; padding-top: 22px; color: #8a9099; border-top: 1px solid var(--line); text-align: center; font-size: 12px; }
.support a { margin-left: 6px; font-weight: 600; }

footer { display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(28px, 6vw, 92px); color: #969ba3; background: #fff; border-top: 1px solid #ececee; font-size: 11px; }

@media (max-width: 1040px) {
  .login-layout { grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr); }
  .intro-panel { padding-left: 48px; padding-right: 38px; }
  .visual-card { display: none; }
  .intro-content h1 { font-size: 43px; }
  .feature-row { gap: 23px; }
}

@media (max-width: 780px) {
  .page-shell { display: block; min-height: 100vh; background: linear-gradient(160deg, #faf7f2 0, #eef2f6 39%, #f7f4ef 39%); }
  .site-header { height: 68px; padding: 0 22px; background: #fff; border-bottom-color: rgba(18,35,61,.08); }
  .site-header .brand-copy strong, .site-header .back-home { color: var(--navy); }
  .site-header .brand-copy small { color: #858b95; }
  .login-layout { display: block; min-height: auto; }
  .intro-panel { display: block; min-height: auto; padding: 52px 25px 102px; background: transparent; }
  .intro-content { max-width: 540px; margin: auto; }
  .intro-content h1 { font-size: clamp(34px, 10vw, 48px); }
  .intro-text { margin-bottom: 24px; font-size: 14px; }
  .feature-row, .visual-card, .decor { display: none; }
  .form-panel { width: calc(100% - 28px); margin: -62px auto 22px; padding: 30px 22px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
  .login-card { width: 100%; }
  footer { min-height: 55px; gap: 10px; padding: 0 22px 16px; background: transparent; text-align: center; flex-direction: column; justify-content: center; }
}

@media (max-width: 430px) {
  .page-shell { background-position: 0 0; }
  .site-header { height: 61px; padding: 0 16px; }
  .brand-mark { width: 36px; height: 32px; }
  .brand-mark i { width: 21px; height: 27px; }
  .brand-copy strong { font-size: 18px; }
  .brand-copy small { display: none; }
  .back-home { font-size: 12px; }
  .intro-panel { padding: 39px 20px 93px; }
  .eyebrow { margin-bottom: 17px; }
  .intro-content h1 { font-size: 34px; }
  .intro-text { margin: 18px 0 20px; line-height: 1.75; }
  .exam-tags { display: grid; }
  .exam-tags span { width: fit-content; }
  .form-panel { padding: 27px 18px; }
  .login-card h2 { font-size: 29px; }
  .code-row { grid-template-columns: 1fr 104px; }
}

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