:root {
  color-scheme: dark;
  --bg: #0f1220;
  --card: #1a1f35;
  --text: #eef1ff;
  --muted: #a3accf;
  --primary: #6f8cff;
  --danger: #ff6b7d;
  --line: #2b3357;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #1b2240, var(--bg));
  color: var(--text);
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 14px 22px;
}

.app-header h1 {
  margin: 0;
  font-size: 1.3rem;
}

.app-header p {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.card {
  background: color-mix(in srgb, var(--card) 88%, #ffffff 12%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.secret-input,
.search-input {
  width: 100%;
  background: #11162b;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 0.95rem;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

button {
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.9rem;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

button.small {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.error {
  min-height: 18px;
  color: var(--danger);
  font-size: 0.85rem;
  margin: 8px 0 0;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 9px 0 0;
}

.code-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.otp-code {
  margin-top: 8px;
  text-align: center;
  letter-spacing: 4px;
  font-size: clamp(2rem, 12vw, 2.6rem);
  font-weight: 700;
}

.progress-wrap {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #0f1428;
  border: 1px solid var(--line);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #5ee7df, #6f8cff);
  transition: width 0.2s linear;
}

.history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.history-top h2 {
  margin: 0;
  font-size: 1rem;
}

.history-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  max-height: 280px;
  overflow: auto;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 9px 0;
  font-size: 0.9rem;
}

.history-list .time {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (min-width: 700px) {
  .app {
    padding-top: 24px;
  }
}
