:root {
  --accent: #0a84ff;
  --purple: #7b61ff;
  --pink: #aeb8ff;
  --green: #20c997;
  --red: #ff375f;
  --orange: #ff9f0a;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: rgba(29, 29, 31, 0.1);
  --glass: rgba(255, 255, 255, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #f7fbff;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  font: inherit;
}

.app-bg,
.app-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.app-bg {
  z-index: -3;
  background:
    radial-gradient(circle at 16% 10%, rgba(10, 132, 255, 0.14), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(123, 97, 255, 0.1), transparent 24rem),
    linear-gradient(180deg, #fbfdff 0%, #f3f8ff 58%, #ffffff 100%);
}

.app-grid {
  z-index: -2;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(10, 132, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 132, 255, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 38%, #000 28%, transparent 82%);
}

.topbar {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.5rem 0.75rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.25rem 0.38rem;
  transition: background 0.16s ease;
}

.brand:hover {
  background: rgba(0, 0, 0, 0.05);
}

.brand-icon,
.logo-mark {
  background: linear-gradient(135deg, #0a84ff, #55a9ff);
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.brand-icon svg,
.logo-mark svg,
.upload-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-icon svg,
.logo-mark svg {
  color: white;
  stroke-width: 1.8;
}

.brand-text {
  display: inline;
  font-size: 0.875rem;
  font-weight: 650;
}

.nav-actions {
  display: flex;
  flex: 1 1 auto;
  gap: 0.38rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-actions::-webkit-scrollbar {
  display: none;
}

.pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
  min-height: 2rem;
  border: 1px solid currentColor;
  border-radius: 0.55rem;
  padding: 0.38rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: filter 0.16s ease, background 0.16s ease;
}

.pill:hover {
  filter: brightness(0.98);
}

.pill.purple {
  color: #4d6fe8;
  background: rgba(10, 132, 255, 0.07);
  border-color: rgba(10, 132, 255, 0.2);
}

.pill.blue {
  color: var(--accent);
  background: rgba(10, 132, 255, 0.1);
  border-color: rgba(10, 132, 255, 0.3);
}

.pill.green {
  color: #2175c8;
  background: rgba(10, 132, 255, 0.08);
  border-color: rgba(10, 132, 255, 0.22);
}

.pill.download-ios {
  color: #0a84ff;
  background: rgba(10, 132, 255, 0.08);
  border-color: rgba(10, 132, 255, 0.24);
}

.pill.download-windows {
  color: #168f72;
  background: rgba(32, 201, 151, 0.1);
  border-color: rgba(32, 201, 151, 0.28);
}

.mini-icon {
  font-weight: 800;
}

.language {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
  min-height: 2.1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.25rem 0.5rem;
  color: var(--accent);
}

.language select {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  outline: none;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.hero {
  margin-bottom: 1.5rem;
  text-align: center;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  box-shadow: 0 16px 34px rgba(10, 132, 255, 0.26);
}

.logo-mark span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #0a84ff, #8bc7ff);
  filter: blur(14px);
  opacity: 0.5;
}

.logo-mark svg {
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
}

h1 {
  margin: 0;
  background: linear-gradient(90deg, #0a84ff, #1778f2, #55a9ff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0;
}

.hero p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 2.8vw, 1rem);
}

.detector-card {
  display: grid;
  gap: 1rem;
}

.mode-tabs {
  display: inline-flex;
  justify-self: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.25rem;
  box-shadow: 0 12px 34px rgba(10, 132, 255, 0.08);
  backdrop-filter: blur(18px);
}

.mode-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: #5b6f8f;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 650;
  padding: 0 1rem;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.mode-tabs button.active {
  background: linear-gradient(135deg, #0a84ff, #147cff);
  color: white;
  box-shadow: 0 2px 6px rgba(10, 132, 255, 0.2);
}

.mode-tabs button.hot {
  color: #5c74a5;
  font-weight: 750;
}

.bolt {
  color: #6aaeff;
  font-size: 1rem;
  line-height: 1;
}

.new {
  border-radius: 999px;
  background: #7b61ff;
  color: white;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
  padding: 0.16rem 0.38rem;
}

.upload-box {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  min-height: 14.5rem;
  border: 2px dashed rgba(10, 132, 255, 0.22);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 20px 60px rgba(10, 132, 255, 0.1), inset 0 1px rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  cursor: pointer;
  padding: 3rem 1.5rem;
  text-align: center;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.upload-box:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.upload-box input {
  display: none;
}

.hidden {
  display: none !important;
}

.field {
  width: 100%;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  outline: none;
  padding: 0.82rem 0.95rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field:focus {
  border-color: rgba(10, 132, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.1);
}

#p12-password {
  margin-top: 0.8rem;
}

.serial-box {
  min-height: 8rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

.serial-tools {
  margin-top: 0.8rem;
  display: flex;
  justify-content: center;
}

.serial-tools .field {
  max-width: 16rem;
}

.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.4rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.12), rgba(10, 132, 255, 0.06));
  color: var(--accent);
}

.upload-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  stroke-width: 1.6;
}

.upload-box strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.upload-box small {
  color: var(--muted);
  font-size: 0.75rem;
}

.submit-row {
  display: flex;
  justify-content: center;
}

.check-button {
  min-height: 3rem;
  border: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0a84ff, #0875e7);
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.22);
  color: white;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 650;
  padding: 0 1.5rem;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.check-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.check-button:disabled {
  cursor: default;
  opacity: 0.4;
}

.status {
  min-height: 1.4rem;
  margin: -0.3rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.result {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.result-grid {
  display: grid;
  gap: 1rem;
}

.result-card,
.score,
.error {
  border: 1px solid rgba(10, 132, 255, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(10, 132, 255, 0.08);
  padding: 1rem;
}

.score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.score strong {
  display: inline-grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #0a84ff, #55a9ff);
  color: white;
  font-size: 1.6rem;
}

.score span,
.muted {
  color: var(--muted);
}

.result-card h3,
.result-card p,
.result-card ul {
  margin: 0.35rem 0;
}

.result-card ul {
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.pill-status {
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
}

.pill-status.good {
  color: #148f5b;
  background: rgba(32, 201, 151, 0.1);
}

.pill-status.warn {
  color: #996a00;
  background: rgba(255, 191, 0, 0.12);
}

.pill-status.bad,
.error {
  color: #d92d20;
  background: rgba(217, 45, 32, 0.08);
}

.ios-report {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.ios-report h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.12rem, 2.8vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: center;
}

.report-board {
  border: 0;
  background: transparent;
  padding: clamp(0.8rem, 2.8vw, 1.6rem) 0;
}

.report-board h3 {
  margin: 0 0 1.25rem;
  color: #111827;
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  font-weight: 800;
  text-align: center;
}

.report-main {
  display: grid;
  grid-template-columns: minmax(84px, 132px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3.5vw, 2.1rem);
  max-width: 560px;
  margin: 0 auto 0.65rem;
}

.cert-badge {
  display: flex;
  justify-content: center;
}

.cert-paper {
  position: relative;
  width: 98px;
  height: 70px;
  border: 4px solid #5096c9;
  background: linear-gradient(135deg, #fff, #eef6ff);
  box-shadow: inset 0 0 0 1px #c5d9ed, 0 4px 12px rgba(35, 76, 112, 0.16);
  color: #3d3d3d;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  font-style: italic;
  padding: 10px 8px;
  text-align: left;
}

.cert-paper span {
  display: block;
  color: #6a9ed6;
  font-size: 0.68rem;
  margin-top: 3px;
}

.cert-paper i {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #f5ec77 0 40%, #d4bf27 43% 100%);
  box-shadow: 0 0 0 3px rgba(180, 160, 35, 0.18);
}

.report-status {
  display: grid;
  gap: 0.45rem;
  color: #111827;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  font-weight: 700;
}

.report-status strong {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
}

.ok-text {
  color: #45bf5a;
}

.bad-text {
  color: #d92d20;
}

.report-list {
  display: grid;
  gap: 0.75rem;
  max-width: 760px;
  margin: 0 auto;
  color: #111827;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
}

.report-list div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
}

.report-list dt {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.report-list dd {
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.report-note,
.report-time {
  max-width: 640px;
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.report-time {
  margin-top: 0.35rem;
}

.lead-shell {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 650;
}

.lead-card {
  border: 1px solid rgba(10, 132, 255, 0.14);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(10, 132, 255, 0.12);
  padding: clamp(1.4rem, 4vw, 2.2rem);
}

.lead-card h1 {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--text);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.lead-kicker {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 800;
}

.lead-copy {
  color: var(--muted);
  line-height: 1.7;
}

.lead-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

@media (max-width: 760px) {
  .topbar-inner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand-text {
    display: none;
  }

  .nav-actions {
    order: 3;
    width: 100%;
  }

  .language {
    margin-left: auto;
  }

  .shell {
    padding-top: 2.25rem;
  }

  .mode-tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .upload-box {
    min-height: 13rem;
    padding: 2.4rem 1rem;
  }

  .report-main {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .report-list div {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.5rem;
  }

  .report-list dt {
    text-align: right;
  }
}

@media (max-width: 480px) {
  .topbar-inner {
    padding-inline: 0.55rem;
  }

  .pill {
    padding-inline: 0.55rem;
  }

  .logo-mark {
    width: 3rem;
    height: 3rem;
  }

  .mode-tabs button {
    padding-inline: 0.78rem;
  }
}
