.hero {
  padding: 4rem 0 2.4rem;
}

.hero-card {
  background: linear-gradient(130deg, #1e3a5f 0%, #2a4d7a 42%, #476d95 100%);
  color: #f6f8fc;
  padding: clamp(1.5rem, 4.2vw, 3rem);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-kicker {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d6e5fa;
  margin-bottom: 0.8rem;
}

.hero-title {
  font-family: "Cormorant Garamond", "Songti SC", serif;
  margin: 0;
  line-height: 1.05;
  font-size: clamp(2rem, 6vw, 3.9rem);
}

.hero-desc {
  margin: 1rem 0 1.5rem;
  max-width: 60ch;
  color: #d6e1ef;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fefbf5;
}

.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.46);
  color: #f7f7f5;
}

.grid {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.grid.cards-3 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid.cards-4 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.card .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.tag {
  font-size: 0.8rem;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.06rem;
}

.card p {
  color: var(--muted);
  margin: 0;
}

.card-link {
  display: inline-flex;
  margin-top: 0.95rem;
  color: var(--primary);
  font-weight: 600;
}

/* 测试卡片按钮 */
.btn-card {
  display: inline-flex;
  align-items: center;
  margin-top: 1.1rem;
  padding: 0.6rem 1.3rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.18);
}

.btn-card:hover,
.btn-card:focus-visible {
  background: #163050;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30, 58, 95, 0.22);
}

.btn-card-disabled {
  background: var(--line);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-card-disabled:hover {
  background: var(--line);
  transform: none;
  box-shadow: none;
}

/* 已上线 / 即将上线 tag 颜色 */
.tag-live {
  background: #e6f4ea;
  color: #2d7a3a;
}

.tag-soon {
  background: #fef3e2;
  color: #a06c10;
}

/* 即将上线的卡片样式 */
.card-coming {
  opacity: 0.72;
}

/* 验证码弹窗 */
.captcha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-overlay.hidden {
  display: none;
}

.captcha-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem 2.2rem;
  width: min(380px, 90vw);
  box-shadow: 0 24px 60px rgba(20, 20, 20, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.captcha-modal h3 {
  margin: 0;
  font-size: 1.15rem;
  font-family: "Cormorant Garamond", "Songti SC", serif;
}

.captcha-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.captcha-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.captcha-input:focus {
  border-color: var(--primary);
}

.captcha-error {
  margin: 0;
  font-size: 0.85rem;
  color: #c0392b;
}

.captcha-error.hidden {
  display: none;
}

.captcha-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: flex-end;
  margin-top: 0.3rem;
}

.btn-captcha-cancel {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-captcha-cancel:hover {
  background: var(--bg);
}

.btn-captcha-confirm {
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn-captcha-confirm:hover {
  background: #163050;
  transform: translateY(-1px);
}

.meta-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.meta-chip {
  border: 1px solid var(--line);
  background: #faf8f2;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.24rem 0.65rem;
  font-size: 0.85rem;
}

.quiz-shell {
  margin-top: 2rem;
}

.hidden {
  display: none;
}

@media (min-width: 720px) {
  .grid.cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1020px) {
  .grid.cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
