:root {
  --blue: #1769f6;
  --blue-deep: #0d4fc9;
  --ink: #10233f;
  --muted: #71839b;
  --line: #e2edf9;
  --soft: #f4f9ff;
  --green: #12815f;
  --amber: #b56a10;
  --shadow: 0 12px 32px rgba(29, 91, 164, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: #eaf3fc;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(135, 194, 255, 0.3), transparent 34%),
    linear-gradient(180deg, #eef7ff 0%, #f6faff 38%, #edf5fc 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 16px 28px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top)) 2px 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #0f5ee8, #4eaeff);
  box-shadow: 0 8px 18px rgba(23, 105, 246, 0.24);
  font-size: 22px;
  font-weight: 800;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.header-chip {
  padding: 7px 11px;
  border: 1px solid #cfe4ff;
  border-radius: 999px;
  color: #1769f6;
  background: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 600;
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lookup-card,
.welcome-card,
.result-card,
.photo-card,
.video-card,
.empty-card,
.error-card {
  border: 1px solid rgba(210, 229, 248, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.lookup-card {
  padding: 18px;
}

.lookup-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.lookup-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.lookup-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lookup-icon {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #1769f6;
  background: #eaf4ff;
}

.lookup-icon svg {
  width: 20px;
  height: 20px;
}

.lookup-form {
  margin-top: 15px;
}

.uid-label {
  display: block;
  margin-bottom: 7px;
  color: #61728a;
  font-size: 12px;
  font-weight: 600;
}

.lookup-row {
  display: flex;
  gap: 8px;
}

#uidInput {
  width: 100%;
  height: 50px;
  min-width: 0;
  flex: 1;
  padding: 0 15px;
  border: 1px solid #d8e8fb;
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #f6fbff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#uidInput:focus {
  border-color: #85b9ff;
  box-shadow: 0 0 0 4px rgba(49, 137, 255, 0.1);
}

#uidInput::placeholder {
  color: #a4b5c9;
  font-weight: 500;
}

#lookupButton {
  height: 50px;
  flex: 0 0 auto;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #0f5ee8, #399aff);
  box-shadow: 0 8px 16px rgba(23, 105, 246, 0.2);
  font-size: 14px;
  font-weight: 700;
}

#lookupButton:disabled {
  cursor: wait;
  opacity: 0.65;
}

.welcome-card {
  position: relative;
  overflow: hidden;
  padding: 26px 22px 22px;
  background: linear-gradient(145deg, #ffffff 0%, #f2f9ff 100%);
}

.welcome-card::after {
  position: absolute;
  right: -52px;
  bottom: -78px;
  width: 190px;
  height: 190px;
  border: 1px solid #d9eaff;
  border-radius: 50%;
  content: "";
}

.welcome-visual {
  position: relative;
  display: flex;
  width: 70px;
  height: 70px;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.visual-orbit {
  position: absolute;
  border: 1px solid #bcdcff;
  border-radius: 50%;
}

.orbit-a {
  inset: 0;
}

.orbit-b {
  inset: 9px;
  border-style: dashed;
}

.visual-card {
  position: relative;
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #1769f6;
  background: #e8f3ff;
  font-size: 17px;
  font-weight: 800;
}

.welcome-card h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
}

.welcome-card p {
  position: relative;
  z-index: 1;
  max-width: 315px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.welcome-points {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.welcome-points span {
  padding: 6px 9px;
  border-radius: 7px;
  color: #52708f;
  background: #f3f9ff;
  font-size: 11px;
}

.result-card {
  overflow: hidden;
}

.result-hero {
  position: relative;
  padding: 21px 18px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 5%, rgba(157, 221, 255, 0.5), transparent 30%),
    linear-gradient(135deg, #0e51cf 0%, #1677ff 58%, #43a4ff 100%);
}

.result-hero::after {
  position: absolute;
  right: -35px;
  bottom: -72px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
}

.result-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 600;
}

.result-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9effd1;
  content: "";
}

.result-uid {
  color: rgba(255, 255, 255, 0.74);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.result-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 92%;
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.result-hero .result-sub {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.result-meta span {
  padding: 6px 9px;
  border-radius: 7px;
  color: #0f4ca9;
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 600;
}

.info-block {
  padding: 19px 18px 7px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.section-title-row span {
  color: var(--muted);
  font-size: 11px;
}

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

.info-item {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #edf4fc;
  border-radius: 12px;
  background: #fbfdff;
}

.info-item.wide {
  grid-column: 1 / -1;
}

.info-item dt,
.info-label {
  color: #8b9cb0;
  font-size: 11px;
}

.info-item dd,
.info-value {
  overflow: hidden;
  margin: 5px 0 0;
  color: #243a56;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mono {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px !important;
  letter-spacing: 0.02em;
}

.warranty-box {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid #dceeff;
  border-radius: 12px;
  background: #f4faff;
}

.warranty-icon {
  display: flex;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #1769f6;
  background: #e4f1ff;
  font-size: 14px;
  font-weight: 700;
}

.warranty-copy {
  min-width: 0;
}

.warranty-copy strong {
  display: block;
  color: #234368;
  font-size: 12px;
}

.warranty-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.test-section,
.photo-section,
.video-section {
  padding: 19px 18px;
  border-top: 1px solid var(--line);
}

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

.test-card {
  padding: 12px;
  border: 1px solid #edf4fc;
  border-radius: 12px;
  background: #fbfdff;
}

.test-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.test-card h4 {
  margin: 0;
  color: #27425f;
  font-size: 12px;
  line-height: 1.4;
}

.test-card .test-phase {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 5px;
  color: #52708f;
  background: #f0f7ff;
  font-size: 9px;
}

.test-values {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  margin-top: 9px;
}

.test-values span {
  color: #647b94;
  font-size: 10px;
}

.test-values b {
  color: #263f5a;
  font-weight: 700;
}

.test-result {
  margin-top: 8px;
  color: #1769f6;
  font-size: 12px;
  font-weight: 700;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.photo-button {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #edf5fd;
  cursor: zoom-in;
}

.photo-button img {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.photo-button:hover img {
  transform: scale(1.04);
}

.photo-label {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

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

.video-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.video-grid.single video {
  max-height: 260px;
}

.video-card video {
  display: block;
  width: 100%;
  max-height: 190px;
  border-radius: 10px;
  background: #0b1726;
}

.video-caption {
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-text {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  color: #8a9bb0;
  background: #f7fbff;
  font-size: 12px;
  line-height: 1.6;
}

.result-foot {
  padding: 14px 18px 17px;
  border-top: 1px solid var(--line);
  color: #94a5b8;
  font-size: 10px;
  line-height: 1.6;
}

.loading-state,
.error-card,
.empty-card {
  padding: 28px 22px;
}

.loading-lines {
  display: table;
  width: 100%;
}

.skeleton-line {
  height: 13px;
  margin-top: 13px;
  border-radius: 7px;
  background: linear-gradient(90deg, #eef5fc 20%, #f9fcff 50%, #eef5fc 80%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton-line.short {
  width: 58%;
}

.skeleton-block {
  height: 130px;
  margin-top: 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, #eaf3fc 20%, #f8fcff 50%, #eaf3fc 80%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

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

.error-mark {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border-radius: 13px;
  color: #b45309;
  background: #fff5e7;
  font-size: 19px;
  font-weight: 700;
}

.error-card h2,
.empty-card h2 {
  margin: 0;
  color: #2d4058;
  font-size: 16px;
}

.error-card p,
.empty-card p {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.site-footer {
  padding: 24px 4px 0;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #647b94;
  font-size: 11px;
  font-weight: 600;
}

.footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4eb47d;
}

.site-footer p {
  margin: 6px 0 0;
  color: #9cabbd;
  font-size: 10px;
}

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 17, 33, 0.9);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  max-width: min(100%, 860px);
  max-height: 88vh;
  margin: 0;
  text-align: center;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 10px;
  object-fit: contain;
}

.lightbox-figure figcaption {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
  line-height: 1;
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-nav {
  top: 50%;
  margin-top: -20px;
}

.lightbox-nav.prev {
  left: 14px;
}

.lightbox-nav.next {
  right: 14px;
}

@media (min-width: 560px) {
  .page-shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .result-hero {
    padding: 25px 23px 22px;
  }

  .result-hero h2 {
    font-size: 28px;
  }

  .info-block,
  .test-section,
  .photo-section,
  .video-section {
    padding-right: 23px;
    padding-left: 23px;
  }

  .photo-button img {
    height: 132px;
  }
}
