:root {
  --bg: #090d18;
  --bg-card: rgba(16, 22, 38, 0.86);
  --bg-input: rgba(9, 13, 24, 0.82);
  --border: rgba(216, 179, 114, 0.22);
  --border-strong: rgba(216, 179, 114, 0.45);
  --text: #eef2fa;
  --muted: #9aa7c0;
  --crimson: #c2332c;
  --crimson-hover: #d94038;
  --gold: #e4bd76;
  --green: #38c980;
  --amber: #f0ad4e;
  --danger-bg: rgba(194, 51, 44, 0.16);
  --danger-border: rgba(235, 92, 85, 0.48);
  --ok-bg: rgba(56, 201, 128, 0.14);
  --ok-border: rgba(56, 201, 128, 0.45);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(640px 380px at 14% 8%, rgba(194, 51, 44, 0.22), transparent 65%),
    radial-gradient(560px 420px at 88% 16%, rgba(228, 189, 118, 0.14), transparent 68%),
    radial-gradient(720px 460px at 50% 96%, rgba(52, 92, 178, 0.16), transparent 70%);
}

.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 18px 42px;
}

.hero {
  margin-bottom: 24px;
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

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

.crest {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff6e6;
  background: linear-gradient(140deg, #b82924 0%, #7d1919 60%, #4b1218 100%);
  border: 1px solid rgba(228, 189, 118, 0.55);
  box-shadow: 0 8px 24px rgba(184, 41, 36, 0.35);
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-weight: 600;
}

.hero h1 {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(16, 22, 38, 0.9);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(240, 173, 78, 0.65);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 10px rgba(56, 201, 128, 0.75);
}

.status-dot.offline {
  background: #e5534b;
  box-shadow: 0 0 10px rgba(229, 83, 75, 0.75);
}

.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(194, 51, 44, 0.15), rgba(228, 189, 118, 0.08));
  border: 1px solid var(--border);
  font-size: 14px;
}

.notice-tag {
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1c1208;
  background: var(--gold);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: start;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  background: rgba(7, 10, 19, 0.78);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
}

.tab {
  appearance: none;
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, #b82d27, #95201c);
  box-shadow: 0 4px 12px rgba(184, 45, 39, 0.32);
}

.tab:hover:not(.active) {
  color: var(--text);
}

.alert {
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  border: 1px solid transparent;
}

.alert.error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: #ffd5d2;
}

.alert.success {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: #ccf7e0;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #dce4f4;
}

.field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid rgba(154, 167, 192, 0.25);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(228, 189, 118, 0.16);
}

.pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pwd-wrap input {
  padding-right: 60px;
}

.pwd-toggle {
  position: absolute;
  right: 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
}

.pwd-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
}

.hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.center-hint {
  text-align: center;
  margin-top: 12px;
}

.turnstile-box {
  margin: 16px 0;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 11px;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.16s ease, background 0.16s ease;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--crimson) 0%, #9b221e 100%);
  box-shadow: 0 8px 22px rgba(194, 51, 44, 0.36);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--crimson-hover) 0%, #ad2722 100%);
}

.btn-download {
  color: #1d1407;
  background: linear-gradient(135deg, #f3d28f 0%, #d4a454 100%);
  box-shadow: 0 8px 22px rgba(212, 164, 84, 0.3);
}

.btn-download:hover {
  filter: brightness(1.06);
}

.btn-ghost {
  margin-top: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
}

.btn-mini {
  border: 1px solid var(--border-strong);
  background: rgba(228, 189, 118, 0.14);
  color: var(--gold);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.success-card {
  padding: 18px;
  border-radius: 12px;
  background: rgba(56, 201, 128, 0.09);
  border: 1px solid var(--ok-border);
}

.success-card h3 {
  margin: 0 0 8px;
  color: #7df0b3;
  font-size: 18px;
}

.cred-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(9, 13, 24, 0.72);
  border: 1px solid var(--border);
}

.cred-row code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  background: rgba(228, 189, 118, 0.14);
  border: 1px solid rgba(228, 189, 118, 0.32);
}

.lead {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.meta-pills span {
  font-size: 12px;
  color: #cfd9ec;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.backup-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
}

.backup-link:hover {
  color: var(--gold);
}

.steps {
  margin: 14px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li strong {
  display: block;
  font-size: 14px;
  color: #f3f6fc;
}

.steps li span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.anti-scam {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #f08a84;
}

.sub-footer {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .page-wrap {
    padding: 18px 14px 32px;
  }
  .hero h1 {
    font-size: 22px;
  }
}
