:root {
  --ink: #2f3e56;
  --muted: #617396;
  --line: #dce5ef;
  --panel: #fbfcfe;
  --deep: #5d6c82;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgb(255 255 255 / 78%), transparent 34%),
    linear-gradient(180deg, #e8eef5 0%, #e6edf5 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

input {
  font: inherit;
  user-select: text;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.page {
  min-height: 100vh;
  padding: 40px 24px;
}

.shell {
  width: min(1000px, 100%);
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: 0 22px 70px rgb(75 91 112 / 16%);
  animation: shell-in 500ms ease-out both;
}

.header {
  position: relative;
  overflow: hidden;
  padding: 46px 24px 44px;
  background: #6f7f96;
  text-align: center;
  color: white;
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(32deg, rgb(39 55 78 / 28%) 0 34%, transparent 34% 100%),
    linear-gradient(210deg, rgb(255 255 255 / 11%) 0 35%, transparent 35% 100%);
}

.header::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 26%), transparent);
  transform: translateX(-140%) skewX(-18deg);
  animation: sheen-pass 5.2s ease-in-out infinite;
}

.header-inner {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 42px;
  line-height: 1.18;
  font-weight: 900;
  text-shadow: 0 3px 0 rgb(34 46 64 / 45%);
}

.header p {
  margin-top: 16px;
  font-size: 17px;
  color: rgb(255 255 255 / 90%);
}

.content {
  min-height: 630px;
  padding: 40px;
  border-bottom: 1px solid var(--line);
}

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 16px 34px rgb(84 101 124 / 6%);
}

.access-panel {
  min-height: 470px;
  display: grid;
  place-items: center;
  padding: 56px 24px;
  text-align: center;
}

.access-form {
  width: min(560px, 100%);
}

.lock {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  background: #eef3f8;
  font-size: 28px;
  box-shadow: inset 0 1px 5px rgb(88 105 126 / 10%);
  animation: lock-pulse 2.4s ease-in-out infinite;
}

.access-form h2 {
  font-size: 31px;
  font-weight: 900;
  color: #31435d;
}

#cardInput {
  width: 100%;
  height: 60px;
  margin-top: 30px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 0 24px;
  color: #2f3e56;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  outline: 0;
  box-shadow: 0 3px 8px rgb(74 90 110 / 8%);
}

#cardInput::placeholder {
  color: #8793a3;
  letter-spacing: 0.02em;
}

#cardInput:focus {
  border-color: #9aa8ba;
  box-shadow: 0 0 0 4px rgb(154 168 186 / 15%);
}

.error {
  min-height: 24px;
  margin-top: 12px;
  color: #ef6d73;
  font-size: 14px;
  font-weight: 700;
}

.btn {
  min-height: 52px;
  border-radius: 999px;
  padding: 0 36px;
  background: var(--deep);
  color: white;
  font-weight: 900;
  box-shadow: 0 14px 28px rgb(79 95 118 / 24%);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: #536177;
  box-shadow: 0 18px 36px rgb(79 95 118 / 28%);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.main-btn {
  min-width: 164px;
  height: 58px;
  margin-top: 4px;
  font-size: 18px;
}

.hint {
  margin-top: 36px;
  color: var(--muted);
  font-size: 15px;
}

.intro-card {
  padding: 40px 24px;
  text-align: center;
}

.intro-card h2 {
  font-size: 28px;
  font-weight: 900;
  color: #31435d;
}

.intro-card p {
  max-width: 720px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.upload-zone {
  min-height: 290px;
  width: 100%;
  margin-top: 40px;
  border: 2px dashed #dce6f2;
  border-radius: 14px;
  background: var(--panel);
  display: grid;
  place-items: center;
  padding: 30px 18px;
  text-align: center;
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.upload-zone:hover,
.upload-zone.dragging {
  transform: translateY(-2px);
  border-color: #9dadc1;
  box-shadow: 0 18px 38px rgb(74 91 112 / 11%);
}

.camera {
  display: block;
  margin-bottom: 22px;
  color: #6f7f96;
  font-size: 54px;
}

.upload-zone strong {
  display: block;
  color: #1f2e46;
  font-size: 24px;
}

.upload-zone span:last-child {
  display: block;
  margin-top: 16px;
  color: #657694;
  font-size: 16px;
}

.preview-panel {
  width: min(390px, 100%);
  margin: 44px auto 0;
  text-align: center;
}

.photo-frame {
  width: 247px;
  height: 327px;
  margin: 0 auto;
  overflow: hidden;
  border: 6px solid white;
  border-radius: 12px;
  background: #eff3f8 center / cover no-repeat;
  box-shadow: 0 16px 34px rgb(44 58 75 / 14%);
}

.analyze-btn {
  width: min(270px, 100%);
  height: 64px;
  margin-top: 34px;
  font-size: 22px;
}

.loading-panel {
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
}

.spinner {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border: 7px solid #e9edf2;
  border-top-color: #59677c;
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.loading-panel p {
  margin-top: 28px;
  color: #1f2e46;
  font-size: 19px;
  font-weight: 800;
}

.result-panel {
  max-width: 900px;
  margin: 36px auto 0;
}

.report-title {
  position: relative;
  text-align: center;
  color: #26364d;
  font-size: 27px;
  font-weight: 900;
}

.report-title::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 9px);
  width: 70px;
  height: 3px;
  border-radius: 999px;
  background: #728096;
  transform: translateX(-50%);
}

.score {
  margin-top: 48px;
  color: #566174;
  text-align: center;
  font-size: 58px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 5px 10px #dfe5ed;
  animation: score-pop 680ms cubic-bezier(0.2, 0.85, 0.25, 1) both;
}

.overall {
  width: min(380px, 100%);
  margin: 30px auto 0;
}

.scale {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #8a98ad;
  font-size: 12px;
  font-weight: 800;
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3e8ee;
  box-shadow: inset 0 1px 2px rgb(70 86 106 / 8%);
}

.meter.large {
  height: 18px;
}

.meter-fill {
  position: relative;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #748195, #96a2b3);
  transform-origin: left center;
  animation: meter-fill 980ms cubic-bezier(0.2, 0.85, 0.25, 1) both;
  box-shadow: 0 0 11px rgb(104 120 143 / 24%), inset 0 1px 0 rgb(255 255 255 / 26%);
}

.meter-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 38%), transparent);
  animation: sheen-pass 2.4s ease-in-out infinite 550ms;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  padding: 24px;
  animation: soft-rise 560ms ease-out both;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #ccd8e6;
  box-shadow: 0 16px 34px rgb(72 88 110 / 10%);
}

.card h3 {
  margin-bottom: 20px;
  color: #2f3e56;
  font-size: 24px;
  font-weight: 900;
}

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

.item-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #2d3c54;
  font-size: 15px;
  font-weight: 900;
}

.item p {
  margin-top: 8px;
  color: #5f6f88;
  font-size: 13px;
  line-height: 1.55;
}

.good {
  color: #1dbd83;
}

.bad {
  color: #ef6d73;
}

.type-card,
.tips-card {
  margin-top: 28px;
  padding: 28px 32px;
}

.type-card {
  text-align: center;
}

.type-card h3 {
  color: #33425a;
  font-size: 24px;
  font-weight: 900;
}

.pill-main {
  display: inline-flex;
  margin-top: 16px;
  border-radius: 999px;
  background: #9aa8ba;
  padding: 10px 28px;
  color: white;
  font-size: 17px;
  font-weight: 900;
}

.type-desc {
  max-width: 760px;
  margin: 22px auto 0;
  color: #4f5f78;
  font-size: 16px;
  line-height: 2;
}

.tags,
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.tag {
  border-radius: 999px;
  background: white;
  padding: 9px 20px;
  color: #61708a;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgb(76 92 113 / 14%);
}

.tips-card h3 {
  margin-bottom: 22px;
  text-align: center;
  color: #33425a;
  font-size: 27px;
  font-weight: 900;
}

.tips-card p,
.tips-card li {
  color: #34455e;
  font-size: 15px;
  line-height: 1.85;
}

.tips-card ul {
  margin: 14px 0 0;
  padding-left: 22px;
}

.remember {
  margin-top: 16px;
  font-size: 16px !important;
  font-weight: 900;
}

.ghost {
  border: 1px solid #59677c;
  background: white;
  color: #33425a;
  box-shadow: none;
}

.notice {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgb(47 61 82 / 94%);
  padding: 12px 22px;
  color: white;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgb(45 57 74 / 18%);
}

.security-mask {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  background: rgb(232 238 245 / 94%);
  color: #31435d;
  text-align: center;
}

.security-mask.show {
  display: grid;
}

.security-mask > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 34px;
  box-shadow: 0 20px 60px rgb(75 91 112 / 18%);
}

.security-mask p {
  margin-top: 12px;
  color: var(--muted);
}

footer {
  background: #fbfcfe;
  padding: 26px;
  color: #587098;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
}

.hidden {
  display: none !important;
}

@keyframes shell-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes sheen-pass {
  from {
    transform: translateX(-140%) skewX(-18deg);
  }
  to {
    transform: translateX(220%) skewX(-18deg);
  }
}

@keyframes meter-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes score-pop {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    filter: blur(3px);
  }
  68% {
    transform: translateY(0) scale(1.045);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lock-pulse {
  0%,
  100% {
    box-shadow: inset 0 1px 5px rgb(88 105 126 / 10%), 0 0 0 0 rgb(111 127 150 / 18%);
  }
  50% {
    box-shadow: inset 0 1px 5px rgb(88 105 126 / 10%), 0 0 0 10px rgb(111 127 150 / 0%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

  .shell {
    min-height: 100vh;
    border-radius: 0;
  }

  .content {
    padding: 28px 18px;
  }

  h1 {
    font-size: 34px;
  }

  .result-grid,
  .items {
    grid-template-columns: 1fr;
  }

  .card,
  .type-card,
  .tips-card {
    padding: 22px 18px;
  }
}
