:root {
  --bg: #07101c;
  --panel: rgba(13, 25, 42, .82);
  --panel-strong: #0e1c2e;
  --line: rgba(142, 171, 205, .16);
  --text: #f1f7ff;
  --muted: #8497ad;
  --cyan: #35d6e7;
  --blue: #2f8cff;
  --green: #40dfa3;
  --danger: #ff6f83;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(56, 121, 177, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 121, 177, .04) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(27, 123, 184, .18), transparent 30%),
    radial-gradient(circle at 84% 78%, rgba(31, 174, 176, .12), transparent 31%),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, input { font: inherit; }
.ambient { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .19; pointer-events: none; }
.ambient-one { width: 360px; height: 360px; background: #087ce0; left: -170px; top: 14%; }
.ambient-two { width: 420px; height: 420px; background: #12b6ae; right: -240px; bottom: -70px; }

.page-shell { position: relative; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 28px; }
.hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin-bottom: 32px; }
.brand-mark {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px;
  background: linear-gradient(145deg, rgba(55, 215, 229, .2), rgba(47, 140, 255, .1));
  border: 1px solid rgba(59, 215, 229, .35); box-shadow: inset 0 0 24px rgba(44, 183, 218, .08), 0 10px 38px rgba(0, 0, 0, .3);
}
.brand-mark svg { width: 36px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow, .step-label { margin: 0 0 7px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.05; letter-spacing: -.035em; }
.subtitle { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.system-pill { align-self: start; display: flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid rgba(64, 223, 163, .2); border-radius: 999px; color: #a6b8c8; background: rgba(12, 31, 42, .66); font-size: 12px; }
.system-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.workspace-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 22px; align-items: stretch; }
.panel { min-height: 530px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(15, 30, 49, .92), rgba(8, 19, 32, .88)); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.form-panel { padding: 28px; }
.results-panel { padding: 28px; position: relative; overflow: hidden; }
.results-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 90% 5%, rgba(42, 165, 217, .09), transparent 35%); }
.panel-heading { position: relative; display: flex; justify-content: space-between; align-items: center; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.shield-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: var(--cyan); background: rgba(53, 214, 231, .08); border: 1px solid rgba(53, 214, 231, .18); font-size: 13px; }

.field { display: block; margin-bottom: 22px; }
.field-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #d9e6f2; font-size: 13px; font-weight: 650; }
.field-label b { color: #587189; font-size: 10px; letter-spacing: .12em; }
.input-wrap { display: flex; align-items: center; height: 54px; padding: 0 15px; border: 1px solid rgba(139, 169, 201, .2); border-radius: 14px; background: rgba(4, 13, 24, .56); transition: border-color .2s, box-shadow .2s, transform .2s; }
.input-wrap:focus-within { border-color: rgba(53, 214, 231, .75); box-shadow: 0 0 0 4px rgba(53, 214, 231, .08); transform: translateY(-1px); }
.input-wrap svg { width: 20px; margin-right: 12px; fill: none; stroke: #5d7892; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; letter-spacing: .02em; text-transform: uppercase; }
input::placeholder { color: #43566b; text-transform: none; }
.field small { display: block; margin-top: 8px; color: #5d7186; font-size: 11px; }

.primary-button, .download-button { display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 14px; text-decoration: none; cursor: pointer; transition: transform .2s, filter .2s, box-shadow .2s; }
.primary-button { width: 100%; height: 56px; margin-top: 5px; color: #03131c; background: linear-gradient(100deg, #35d6e7, #49a6ff); box-shadow: 0 12px 34px rgba(32, 177, 217, .21); font-weight: 800; }
.primary-button:hover:not(:disabled), .download-button:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 16px 38px rgba(32, 177, 217, .27); }
.primary-button:disabled { cursor: wait; opacity: .72; }
.primary-button svg, .download-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button-idle, .button-loading { display: flex; align-items: center; gap: 10px; }
.button-loading { display: none; }
.primary-button.loading .button-idle { display: none; }
.primary-button.loading .button-loading { display: flex; }
.button-loading i { width: 17px; height: 17px; border: 2px solid rgba(3, 19, 28, .25); border-top-color: #03131c; border-radius: 50%; animation: spin .8s linear infinite; }
.security-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px 13px; color: #6f879e; background: rgba(4, 13, 24, .34); border-radius: 12px; font-size: 11px; line-height: 1.55; }
.security-note svg { flex: 0 0 auto; width: 17px; fill: none; stroke: #4d8797; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.message { margin: -6px 0 16px; padding: 11px 13px; border-radius: 11px; font-size: 12px; line-height: 1.5; }
.error-message { color: #ffb2bd; background: rgba(255, 79, 107, .09); border: 1px solid rgba(255, 111, 131, .18); }

.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 11px; color: #7890a7; background: rgba(8, 19, 32, .5); cursor: pointer; }
.icon-button:hover { color: var(--cyan); border-color: rgba(53, 214, 231, .3); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-state, .progress-state { position: relative; min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-orbit { position: relative; display: grid; place-items: center; width: 116px; height: 116px; margin-bottom: 20px; border: 1px dashed rgba(72, 186, 210, .2); border-radius: 50%; }
.empty-orbit::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: rgba(38, 134, 176, .07); }
.empty-orbit span { position: absolute; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); animation: orbit 7s linear infinite; transform-origin: 4px 62px; }
.empty-orbit svg { z-index: 1; width: 48px; fill: none; stroke: #3f6d83; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3, .progress-state h3 { margin: 0 0 9px; color: #c9d9e7; font-size: 16px; }
.empty-state p, .progress-state p { max-width: 340px; margin: 0; color: #61758a; font-size: 12px; line-height: 1.7; }
.scanner { position: relative; width: 90px; height: 90px; margin-bottom: 22px; border: 1px solid rgba(53, 214, 231, .22); border-radius: 22px; overflow: hidden; background: rgba(53, 214, 231, .04); }
.scanner::before, .scanner::after { content: ""; position: absolute; inset: 20px; border: 1px solid rgba(53, 214, 231, .24); border-radius: 50%; }
.scanner::after { inset: 33px; background: var(--cyan); box-shadow: 0 0 22px var(--cyan); }
.scanner span { position: absolute; z-index: 2; left: 8px; right: 8px; height: 2px; top: 10px; background: var(--cyan); box-shadow: 0 0 13px var(--cyan); animation: scan 1.7s ease-in-out infinite alternate; }
.progress-track { width: min(280px, 80%); height: 4px; margin-top: 24px; overflow: hidden; border-radius: 999px; background: rgba(126, 153, 180, .1); }
.progress-track i { display: block; width: 36%; height: 100%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: loading 1.5s ease-in-out infinite; }

.result-list { position: relative; display: grid; gap: 14px; max-height: 408px; overflow: auto; padding-right: 3px; }
.result-card { padding: 19px; border: 1px solid rgba(64, 223, 163, .19); border-radius: 18px; background: linear-gradient(145deg, rgba(20, 46, 55, .58), rgba(8, 22, 34, .66)); animation: rise .35s ease-out; }
.result-status { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.success-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: rgba(64, 223, 163, .11); border: 1px solid rgba(64, 223, 163, .24); }
.success-mark svg { width: 22px; fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.result-title { margin: 0 0 4px; color: #dffbf1; font-size: 14px; font-weight: 750; }
.result-time { margin: 0; color: #648095; font-size: 10px; }
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 15px; }
.identity-grid div { min-width: 0; padding: 10px 11px; border-radius: 10px; background: rgba(3, 12, 22, .4); }
.identity-grid dt { margin-bottom: 5px; color: #507087; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.identity-grid dd { margin: 0; overflow: hidden; color: #b9ccdc; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.download-button { height: 43px; color: #bff9ec; background: rgba(43, 193, 151, .1); border: 1px solid rgba(64, 223, 163, .22); font-size: 12px; font-weight: 750; }
.download-button svg { width: 17px; }

footer { display: flex; justify-content: center; align-items: center; gap: 11px; margin-top: 25px; color: #43596d; font-size: 10px; letter-spacing: .04em; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: #476b7d; }
[hidden] { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes scan { from { top: 12px; } to { top: 76px; } }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } }

@media (max-width: 840px) {
  .page-shell { width: min(100% - 26px, 680px); padding-top: 30px; }
  .hero { grid-template-columns: auto 1fr; }
  .system-pill { display: none; }
  .workspace-grid { grid-template-columns: 1fr; }
  .panel { min-height: auto; }
  .results-panel { min-height: 480px; }
}
@media (max-width: 520px) {
  .page-shell { width: min(100% - 20px, 480px); }
  .hero { gap: 14px; align-items: start; }
  .brand-mark { width: 50px; height: 50px; border-radius: 15px; }
  .brand-mark svg { width: 29px; }
  h1 { font-size: 27px; }
  .subtitle { font-size: 12px; line-height: 1.55; }
  .form-panel, .results-panel { padding: 20px; border-radius: 19px; }
  .identity-grid { grid-template-columns: 1fr; }
}
