:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: #1f2a44;
  background: #eef3f9;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #f4f7fc 0%, #e9eef5 100%);
}

button,
input {
  font: inherit;
}

.top-navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 73px;
  background: rgb(255 255 255 / 82%);
  border-bottom: 1px solid rgb(0 0 0 / 5%);
  box-shadow: 0 4px 20px rgb(0 0 0 / 2%);
  backdrop-filter: blur(20px);
}

.nav-container {
  max-width: 1300px;
  height: 72px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.9rem;
  line-height: 1;
  color: #b8860b;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 5%));
}

.logo-text {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  color: transparent;
  background: linear-gradient(135deg, #2c3e66, #9b7b3c);
  background-clip: text;
}

.query-card {
  width: min(1100px, calc(100% - 40px));
  min-height: 711px;
  margin: 40px auto;
  flex: 1;
  overflow: hidden;
  background: #fff;
  border-radius: 40px;
  box-shadow: 0 20px 35px -12px rgb(0 0 0 / 8%), 0 1px 3px rgb(0 0 0 / 2%);
}

.hero {
  padding: 40px 40px 32px;
  text-align: center;
  background: linear-gradient(115deg, #f9fbfe 0%, #f1f5fa 100%);
  border-bottom: 1px solid #eaeff5;
}

.hero h1 {
  margin-bottom: 12px;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.5px;
  color: transparent;
  background: linear-gradient(120deg, #2a3d66, #9b7e3a);
  background-clip: text;
}

.hero p {
  color: #4a5b7a;
  font-size: 1.05rem;
  opacity: 0.65;
}

.content {
  display: flex;
  min-height: 540px;
}

.input-section,
.result-section {
  min-width: 0;
  flex: 1 1 50%;
  padding: 40px 36px;
}

.input-section {
  background: #fcfdff;
  border-right: 1px solid #ecf0f5;
}

.input-section h2 {
  margin-bottom: 28px;
  color: #2c3e66;
  font-size: 1.7rem;
  line-height: 1.2;
}

.form-group {
  position: relative;
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: #2c3e66;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.form-group input {
  width: 100%;
  min-width: 0;
  padding: 14px 18px;
  color: #1a2a44;
  font-size: 1rem;
  font-weight: 500;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 2%);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.form-group input::placeholder {
  color: #b9c3d4;
  font-weight: 400;
}

.form-group input:focus {
  outline: none;
  background: #fff;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgb(212 175 55 / 20%);
}

.form-group input[aria-invalid="true"] {
  border-color: #d9856b;
  box-shadow: 0 0 0 3px rgb(217 133 107 / 12%);
}

.field-error {
  position: absolute;
  left: 16px;
  top: calc(100% + 3px);
  min-height: 16px;
  color: #b45a3b;
  font-size: 0.75rem;
}

.query-feedback {
  margin-top: 14px;
  padding: 10px 14px;
  color: #8a3d2a;
  font-size: 0.85rem;
  line-height: 1.5;
  background: #fff4ef;
  border-radius: 12px;
}

.query-feedback[data-state="success"] {
  color: #25633d;
  background: #edf8f1;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.captcha-container input {
  flex: 1 1 auto;
}

.captcha-button {
  width: 124px;
  height: 50px;
  flex: 0 0 124px;
  overflow: hidden;
  cursor: pointer;
  background: #f8fafe;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 2%);
  transition: transform 0.2s, border-color 0.2s;
}

.captcha-button:hover {
  border-color: #d4af37;
  transform: scale(1.02);
}

.captcha-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.submit-button,
.back-button {
  width: 100%;
  padding: 16px 28px;
  cursor: pointer;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(95deg, #b67d12, #d4af37);
  border: 0;
  border-radius: 44px;
  box-shadow: 0 6px 14px rgb(182 125 18 / 20%);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.submit-button {
  margin-top: 16px;
}

.submit-button:hover,
.back-button:hover {
  background: linear-gradient(95deg, #d4af37, #e7c568);
  box-shadow: 0 12px 22px rgb(182 125 18 / 25%);
  transform: translateY(-2px);
}

.submit-button:active,
.back-button:active {
  transform: translateY(1px);
}

.result-section > h2 {
  margin-bottom: 28px;
  padding-left: 20px;
  color: #2c3e66;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.3px;
  border-left: 4px solid #d4af37;
}

.empty-result {
  padding: 50px 28px;
  text-align: center;
  background: #fbfdff;
  border: 1px dashed #cfddef;
  border-radius: 32px;
}

.sparkles {
  display: inline-block;
  margin-bottom: 20px;
  color: #b8860b;
  font-size: 3.5rem;
  line-height: 1.2;
  opacity: 0.6;
}

.empty-result p {
  color: #6a7c9e;
  font-size: 1rem;
}

.empty-result .result-note {
  margin-top: 2px;
  font-size: 0.85rem;
}

.query-result[hidden] {
  display: none;
}

.result-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 32px;
  box-shadow: 0 12px 28px -8px rgb(0 0 0 / 5%);
}

.result-card-header {
  padding: 20px 28px;
  text-align: center;
  background: #f9fcfe;
  border-bottom: 1px solid #eef3f9;
}

.result-card-header h3 {
  color: #b67d12;
  font-size: 1.6rem;
  font-weight: 600;
}

.result-list {
  padding: 18px 28px 8px;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f4fa;
}

.result-item:last-child {
  border-bottom: 0;
}

.result-item dt {
  color: #5b6e91;
  font-size: 0.95rem;
  font-weight: 500;
}

.result-item dd {
  max-width: 65%;
  color: #1f2a44;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.result-item dd:empty::after {
  content: "未提供";
  color: #8391a8;
  font-weight: 500;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  color: #2b7a4b;
  font-weight: 700;
  background: #e9f6ef;
  border-radius: 40px;
}

.detail-section {
  padding: 4px 28px 8px;
  border-top: 1px solid #eef3f9;
}

.detail-section h4 {
  margin: 18px 0 12px;
  color: #2c3e66;
  font-size: 1rem;
}

.detail-empty {
  padding: 18px 0;
  color: #8391a8;
  font-size: 0.85rem;
  text-align: center;
}

.detail-table-wrap {
  overflow-x: auto;
  border: 1px solid #edf2f7;
  border-radius: 12px;
}

.detail-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  padding: 11px 12px;
  font-size: 0.8rem;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid #edf2f7;
}

.detail-table th {
  color: #5b6e91;
  background: #f9fcfe;
}

.detail-table tr:last-child td {
  border-bottom: 0;
}

.back-button {
  width: calc(100% - 56px);
  margin: 12px 28px 26px;
  padding: 12px 20px;
  font-size: 0.95rem;
}

.main-footer {
  margin-top: 40px;
  padding: 48px 0 24px;
  background: #f9fbfe;
  border-top: 1px solid #e9eef5;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 24px 32px 0;
  color: #8c9bb2;
  font-size: 0.8rem;
  text-align: center;
  border-top: 1px solid #e9eef5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}

.footer-links a {
  color: #7a8aa8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #b8860b;
}

@media (max-width: 800px) {
  .nav-container {
    padding: 0 20px;
  }

  .query-card {
    width: calc(100% - 40px);
    margin: 24px auto;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .content {
    flex-direction: column;
  }

  .input-section,
  .result-section {
    flex-basis: auto;
  }

  .input-section {
    border-right: 0;
    border-bottom: 1px solid #ecf0f5;
  }
}

@media (max-width: 550px) {
  .logo-icon {
    font-size: 1.6rem;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .hero {
    padding: 34px 18px 28px;
  }

  .hero p {
    font-size: 0.92rem;
  }

  .input-section,
  .result-section {
    padding: 28px 20px;
  }

  .captcha-container {
    gap: 8px;
  }

  .captcha-button {
    width: 124px;
    flex-basis: 124px;
  }

  .submit-button {
    padding: 14px;
  }

  .result-list,
  .detail-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .main-footer {
    padding-top: 24px;
  }

  .footer-bottom {
    margin-top: 12px;
  }

  .footer-links {
    gap: 8px;
  }
}

@media (max-width: 370px) {
  .captcha-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .captcha-container input {
    flex: auto;
  }

  .captcha-button {
    flex: none;
  }
}

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