/* ==========================================================
   证书查询系统 - 样式表 - 别剽窃哈
   ========================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  padding: 52px 20px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: #ffffff;
  background-color: #1450c0;
  background-image:
    radial-gradient(900px 700px at 12% 8%, rgba(100, 175, 255, 0.55), rgba(100, 175, 255, 0) 55%),
    radial-gradient(800px 700px at 88% 92%, rgba(60, 110, 255, 0.55), rgba(60, 110, 255, 0) 55%),
    linear-gradient(135deg, #1e63d8 0%, #1450c0 45%, #0b3b96 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

/* 背景柔和光斑 */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 560px;
  height: 560px;
  top: -180px;
  left: -160px;
  background: radial-gradient(circle at 40% 40%, rgba(130, 195, 255, 0.5), rgba(130, 195, 255, 0) 65%);
  filter: blur(30px);
}

body::after {
  width: 640px;
  height: 640px;
  right: -210px;
  bottom: -280px;
  background: radial-gradient(circle at 50% 50%, rgba(40, 100, 255, 0.5), rgba(40, 100, 255, 0) 65%);
  filter: blur(40px);
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
}

/* ---------- 主卡片 ---------- */
.card {
  padding: 46px 56px 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(155deg, #0a7389 0%, #096b81 42%, #05586b 100%);
  box-shadow:
    0 26px 70px rgba(3, 25, 80, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ---------- 标题 ---------- */
.card-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 3px;
  text-align: center;
}

.subtitle {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 15px;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.92);
}

.subtitle::before,
.subtitle::after {
  content: "";
  width: 88px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

/* ---------- 选项卡 ---------- */
.tabs {
  display: flex;
  margin-top: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.tab {
  flex: 1;
  padding: 14px 6px 16px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 20px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.tab:hover {
  color: rgba(255, 255, 255, 0.92);
}

.tab.is-active {
  color: #ffffff;
  font-weight: 600;
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}

.tab:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: -4px;
  border-radius: 4px;
}

/* ---------- 面板 ---------- */
.panels {
  margin-top: 26px;
}

.panel {
  animation: fade-in 0.28s ease;
}

.panel[hidden] {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 表单 ---------- */
.query-form {
  padding: 34px 32px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

.field {
  width: 420px;
  max-width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid #ffffff;
  border-radius: 6px;
  background: #ffffff;
  font-family: inherit;
  font-size: 15px;
  color: #333333;
  transition: box-shadow 0.2s ease;
}

.field::placeholder {
  color: #9aa7ad;
}

.field:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.field.is-invalid {
  border-color: #ff9d9d;
  box-shadow: 0 0 0 3px rgba(255, 120, 120, 0.25);
}

.actions {
  width: 420px;
  max-width: 100%;
  margin-top: 6px;
  display: flex;
  gap: 16px;
}

.btn {
  flex: 1;
  height: 46px;
  padding: 0 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 18px;
  letter-spacing: 2px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-reset {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: #6b6b6b;
  color: #ffffff;
}

.btn-reset:hover {
  background: #5c5c5c;
}

.btn-primary {
  border: 1.5px solid #ffffff;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.btn-primary:hover {
  background: #ffffff;
  color: #096b81;
}

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

/* ---------- 提示信息 ---------- */
.form-msg {
  min-height: 18px;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.5px;
  text-align: center;
  color: #ffe19a;
}

.form-msg.is-success {
  color: #c8f7e0;
}

.note {
  width: 100%;
  max-width: 600px;
  margin: 10px 0 0;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.5px;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.footer::before,
.footer::after {
  content: "";
  width: 80px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.back-link {
  font-size: 14px;
  letter-spacing: 4px;
  color: #ffffff;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.back-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  body {
    padding: 34px 18px;
  }

  .card {
    padding: 34px 28px 28px;
  }

  .card-header h1 {
    font-size: 26px;
    letter-spacing: 2px;
  }

  .subtitle {
    font-size: 13px;
    letter-spacing: 4px;
  }

  .subtitle::before,
  .subtitle::after {
    width: 56px;
  }

  .tab {
    font-size: 17px;
  }

  .query-form {
    padding: 26px 20px 22px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 20px 12px 28px;
  }

  .card {
    padding: 24px 16px 22px;
    border-radius: 10px;
  }

  .card-header h1 {
    font-size: 20px;
    line-height: 1.5;
    letter-spacing: 0.5px;
  }

  .subtitle {
    margin-top: 12px;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 3px;
  }

  .subtitle::before,
  .subtitle::after,
  .footer::before,
  .footer::after {
    width: 36px;
  }

  .tabs {
    margin-top: 22px;
  }

  .tab {
    padding: 10px 2px 12px;
    font-size: 14px;
    letter-spacing: 0;
  }

  .query-form {
    padding: 20px 14px 18px;
    gap: 12px;
  }

  .field,
  .actions {
    width: 100%;
  }

  .btn {
    font-size: 16px;
    letter-spacing: 1px;
  }

  .btn-reset {
    flex: 0 0 auto;
    padding: 0 18px;
  }

  .note {
    font-size: 12px;
  }

  .footer {
    margin-top: 24px;
  }
}

@media (max-width: 400px) {
  .card-header h1 {
    font-size: 18px;
  }
}
