:root {
  --primary: #6673f5;
  --primary-dark: #5a64df;
  --secondary: #7d45b4;
  --ink: #252a45;
  --muted: #7c839e;
  --line: #e3e6f1;
  --surface: #ffffff;
  --soft: #f5f6fa;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(116, 127, 245, 0.18), transparent 34%),
    radial-gradient(circle at 86% 78%, rgba(139, 79, 190, 0.14), transparent 36%),
    linear-gradient(180deg, #eff1ff 0%, #e8eaff 100%);
  -webkit-font-smoothing: antialiased;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 22px;
}

.auth-card {
  width: min(100%, 760px);
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(55, 62, 128, 0.15), 0 4px 14px rgba(55, 62, 128, 0.08);
}

.brand-header {
  padding: 26px 20px 24px;
  color: #fff;
  text-align: center;
  background: linear-gradient(105deg, #6673f5 0%, #705fcb 48%, #7d45b4 100%);
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
}

.brand-header h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 2px;
}

.brand-header p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  background: var(--soft);
  border-bottom: 1px solid #edf0f7;
}

.tab {
  position: relative;
  height: 50px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #666d89;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.18s ease;
}

.tab:hover,
.tab.is-active {
  color: var(--primary);
}

.tab.is-active {
  font-weight: 600;
}

.tab.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
  content: "";
}

.tab:focus-visible,
.captcha-question:focus-visible,
.link-button:focus-visible,
.primary-button:focus-visible {
  outline: 2px solid rgba(102, 115, 245, 0.5);
  outline-offset: 2px;
}

.panels {
  padding: 26px 34px 30px;
}

/* 查询/换绑表单收窄靠左，避免输入框和按钮撑满整行 */
.panels form {
  max-width: 480px;
}
.panels .captcha-row {
  grid-template-columns: 130px minmax(0, 1fr);
}
.panels .primary-button {
  width: 200px;
  max-width: 100%;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--soft);
  color: #505875;
  font-size: 13px;
  line-height: 1.75;
}

.notice-rules strong {
  color: #3f4668;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 16px;
}

.plan-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(28, 32, 66, 0.1);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(28, 32, 66, 0.16);
}

.plan-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 14px 34px rgba(102, 115, 245, 0.3);
}

.plan-card.theme-mint.is-selected { border-color: #22d6c4; box-shadow: 0 14px 34px rgba(34, 214, 196, 0.34); }
.plan-card.theme-orange.is-selected { border-color: #f08a2e; box-shadow: 0 14px 34px rgba(240, 138, 46, 0.34); }
.plan-card.theme-violet.is-selected { border-color: #9678f0; box-shadow: 0 14px 34px rgba(150, 120, 240, 0.34); }
.plan-card.theme-dark.is-selected { border-color: #d6b060; box-shadow: 0 14px 34px rgba(214, 176, 96, 0.36); }

.plan-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.plan-check {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.plan-card.is-selected .plan-check {
  opacity: 1;
  transform: scale(1);
}

.plan-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(160deg, #eef1fb, #e3e8f8);
}

.plan-meta {
  display: grid;
  gap: 2px;
  padding: 10px 12px 12px;
  line-height: 1.35;
}

.plan-meta-name {
  color: #262b45;
  font-size: 15px;
  font-weight: 700;
}

.plan-meta-price {
  color: #d3415f;
  font-size: 16px;
  font-weight: 700;
}

.plan-meta-days {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 640px) {
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 380px) {
  .product-list { gap: 8px; }
  .plan-meta { padding: 8px; }
}

.pay-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  text-decoration: none;
}

form {
  display: grid;
  gap: 12px;
}

.text-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.text-input::placeholder {
  color: #a7adc1;
}

.text-input:hover {
  border-color: #ccd2e6;
}

.text-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 115, 245, 0.12);
}

.text-input.is-invalid {
  border-color: #e15b65;
  box-shadow: 0 0 0 3px rgba(225, 91, 101, 0.1);
}

.captcha-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
}

.captcha-question {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fc;
  color: #333a5d;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.captcha-question:hover {
  border-color: #bfc8eb;
  background: #f1f3fd;
}

.hint {
  margin: -4px 0 2px;
  color: #8a90a8;
  font-size: 12px;
  line-height: 1.6;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkbox-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 2px;
  color: #6b7290;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.checkbox-line input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.primary-button {
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #6673f5 0%, #705fcb 52%, #7d45b4 100%);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(102, 83, 200, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.primary-button:hover {
  filter: brightness(1.04);
  box-shadow: 0 10px 22px rgba(102, 83, 200, 0.28);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  filter: grayscale(0.2);
}

.result-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dfe4f7;
  border-radius: 10px;
  background: #f8f9ff;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-title {
  font-size: 14px;
  font-weight: 600;
}

.status-pill {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e9ecfb;
  color: #5b64a6;
  font-size: 12px;
}

.result-card.is-success {
  border-color: #cfe8d8;
  background: #f4fbf6;
}

.result-card.is-success .status-pill {
  background: #ddf2e4;
  color: #278050;
}

.result-card.is-warning {
  border-color: #f2dfbd;
  background: #fffbf2;
}

.result-card.is-warning .status-pill {
  background: #f8e9c8;
  color: #9a6513;
}

.result-card.is-error {
  border-color: #f2d0d3;
  background: #fff6f6;
}

.result-card.is-error .status-pill {
  background: #f9dcde;
  color: #b23a45;
}

.result-message {
  margin: 12px 0 0;
  color: #4b5372;
  font-size: 13px;
  line-height: 1.7;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #dfe4f3;
}

.result-item {
  min-width: 0;
}

.result-item dt {
  margin: 0 0 4px;
  color: #9097ad;
  font-size: 12px;
}

.result-item dd {
  margin: 0;
  overflow: hidden;
  color: #343b5c;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-footer {
  padding: 14px 20px;
  border-top: 1px solid #eef0f6;
  color: #8a90a8;
  font-size: 12px;
  text-align: center;
}

.card-footer #beijing-clock {
  font-variant-numeric: tabular-nums;
}

.site-footer {
  margin-top: 18px;
  color: #9aa0b8;
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: 28px;
  left: 50%;
  max-width: min(88vw, 460px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(34, 39, 72, 0.95);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .page-shell {
    padding: 14px 12px 12px;
  }

  .auth-card {
    width: min(100%, 680px);
    border-radius: 14px;
  }

  .brand-header {
    padding: 14px 16px 13px;
  }

  .brand-badge {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
  }

  .brand-header h1 {
    font-size: 19px;
    letter-spacing: 1px;
  }

  .brand-header p {
    margin-top: 5px;
    font-size: 11px;
  }

  .tab {
    height: 38px;
    font-size: 13px;
  }

  .panels {
    padding: 16px 20px 18px;
  }

  .notice {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.6;
  }

  form {
    gap: 8px;
  }

  .text-input {
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .captcha-row {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px;
  }

  .captcha-question {
    height: 38px;
    font-size: 14px;
  }

  .hint {
    margin: -2px 0 0;
    font-size: 11px;
  }

  .checkbox-line {
    margin-top: 0;
    font-size: 11px;
  }

  .primary-button {
    height: 40px;
    margin-top: 2px;
    font-size: 14px;
  }

  .result-card {
    margin-top: 12px;
    padding: 12px;
  }

  .result-message {
    margin-top: 10px;
    font-size: 12px;
  }

  .result-grid {
    gap: 8px 12px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .card-footer {
    padding: 10px 16px;
    font-size: 11px;
  }

  .site-footer {
    margin-top: 10px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .page-shell {
    padding: 10px 8px;
  }

  .auth-card {
    border-radius: 12px;
  }

  .brand-header {
    padding: 12px 12px 11px;
  }

  .brand-badge {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
    font-size: 13px;
  }

  .brand-header h1 {
    font-size: 17px;
  }

  .brand-header p {
    font-size: 10px;
  }

  .tab {
    height: 34px;
    font-size: 12px;
  }

  .panels {
    padding: 14px 14px 16px;
  }

  .notice {
    padding: 9px 10px;
    font-size: 11px;
  }

  .text-input,
  .captcha-question {
    height: 36px;
    font-size: 12px;
  }

  .captcha-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .captcha-question {
    letter-spacing: 0;
  }

  .primary-button {
    height: 38px;
    font-size: 13px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .card-footer {
    padding: 9px 10px;
    font-size: 10px;
    line-height: 1.6;
  }
}
