:root {
  --bg: #f4f7fb;
  --card: rgba(255, 255, 255, .92);
  --ink: #16213a;
  --muted: #667085;
  --line: #e5eaf2;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --accent: #06b6d4;
  --success: #0f9d63;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 5% 12%, rgba(79, 70, 229, .14), transparent 28rem),
    radial-gradient(circle at 92% 5%, rgba(6, 182, 212, .13), transparent 24rem),
    linear-gradient(135deg, #f6f8ff, #f3f7fa 48%, #f8fbff);
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: #3730a3; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.page-bg::before,
.page-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.page-bg::before {
  width: 380px; height: 380px;
  left: -80px; bottom: -80px;
  background: rgba(124, 58, 237, .16);
}
.page-bg::after {
  width: 320px; height: 320px;
  right: -50px; top: -80px;
  background: rgba(6, 182, 212, .17);
}

.card,
.panel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mark {
  width: 38px; height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: .9rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px rgba(79, 70, 229, .25);
}
.brand small { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: .22s ease;
  text-decoration: none;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7c3aed 65%, #0ea5e9);
  box-shadow: 0 12px 28px rgba(79, 70, 229, .22);
}
.btn-primary:hover { transform: translateY(-2px); color: #fff; }
.btn-ghost {
  color: #48546a;
  background: #fff;
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--primary); border-color: #c7d2fe; transform: translateY(-2px); }
.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 10px 22px rgba(220, 38, 38, .16);
}
.btn-danger:hover { color: #fff; transform: translateY(-2px); }
.btn-block { width: 100%; }

.field { margin-bottom: 1.15rem; }
.field-label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 700;
  font-size: .9rem;
}
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: #98a2b3;
}
input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: .85rem 1rem;
  color: var(--ink);
  border: 1px solid #dae0ea;
  border-radius: 14px;
  background: #fff;
  outline: none;
  transition: .2s ease;
}
.input-wrap input { padding-left: 48px; }
input:focus,
select:focus,
textarea:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .1);
}
input::placeholder { color: #98a2b3; }

.hint {
  margin: .45rem 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .9rem 1rem;
  border-radius: 14px;
  margin-bottom: 1.2rem;
  font-size: .92rem;
  line-height: 1.45;
}
.alert strong { display: block; margin-bottom: .15rem; }
.alert-error {
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}
.alert-success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-success { color: var(--success); background: rgba(15, 157, 99, .1); }
.badge-warning { color: #b45309; background: rgba(217, 119, 6, .1); }
.badge-danger { color: var(--danger); background: rgba(220, 38, 38, .1); }
.badge-soft { color: #4f46e5; background: rgba(79, 70, 229, .08); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(226, 232, 240, .8);
  backdrop-filter: blur(16px);
}
.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar-nav { display: flex; align-items: center; gap: .4rem; }
.nav-link-pill {
  padding: .55rem .85rem;
  border-radius: 999px;
  color: #48546a;
  font-size: .88rem;
  font-weight: 600;
}
.nav-link-pill:hover { color: var(--primary); background: #eef2ff; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.metric {
  min-width: 0;
  padding: 22px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.metric-label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}
.metric-value {
  margin-top: .55rem;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.metric-value.small { font-size: clamp(1rem, 1.6vw, 1.12rem); }
.metric-note { margin-top: .4rem; color: var(--muted); font-size: .82rem; }

.panel {
  padding: clamp(20px, 3vw, 32px);
  margin-top: 20px;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.panel-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.panel-desc {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}
.section-tag {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #eef2ff;
  border-radius: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.42fr .98fr;
  gap: 20px;
  align-items: start;
}
.grid-profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.full-row { grid-column: 1 / -1; }

.server-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.server-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}
.server-card strong {
  display: block;
  color: #c2410c;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.server-card span { display: block; margin-top: .2rem; color: var(--muted); font-size: .76rem; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.download-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: #334155;
  font-weight: 650;
  transition: .2s;
}
.download-item:hover {
  color: var(--primary);
  border-color: #c7d2fe;
  transform: translateY(-2px);
}
.download-icon {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: #eef2ff;
}

.notice {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  line-height: 1.6;
  font-size: .92rem;
}
.legal {
  padding: 1.2rem 1.3rem;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, .85);
  color: #526071;
  font-size: .88rem;
  line-height: 1.65;
}

.qr-wrap {
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}
.payment-qr {
  width: min(100%, 300px);
  height: auto;
  display: block;
  border-radius: 10px;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 1.1rem;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #475569;
}
.contact-item strong { min-width: 4.8em; color: var(--ink); }
.contact-item span { overflow-wrap: anywhere; text-align: right; }

.site-footer {
  margin: 40px 0 30px;
  color: #71809a;
  font-size: .82rem;
  text-align: center;
}

.btn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.4rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 26px;
  align-items: center;
  padding: 40px 0;
}
.auth-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 85% 12%, rgba(6, 182, 212, .38), transparent 18rem),
    linear-gradient(135deg, #1e1b4b, #312e81 45%, #4f46e5);
}
.auth-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 270px; height: 270px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.auth-hero h1 {
  margin: 1.2rem 0 .8rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -.04em;
}
.auth-hero p {
  max-width: 34em;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 1.02rem;
  line-height: 1.7;
}
.hero-points {
  position: relative;
  z-index: 1;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.hero-points li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  color: rgba(255, 255, 255, .88);
}
.hero-points svg { flex: 0 0 auto; margin-top: 3px; }
.hero-points strong { color: #fff; }
.hero-points span { display: block; color: rgba(255, 255, 255, .72); font-size: .9rem; }

.auth-panel {
  padding: clamp(26px, 4vw, 46px);
}
.auth-title {
  margin: .7rem 0 .5rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.auth-subtitle {
  margin: 0 0 1.8rem;
  color: var(--muted);
}
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: stretch;
}
.captcha-row input { height: 100%; }
.captcha-img {
  width: 100%;
  height: 100%;
  min-height: 50px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.7rem;
  color: var(--muted);
  font-size: .82rem;
}

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 24px 28px;
  background: linear-gradient(135deg, #312e81, #4f46e5 72%, #0ea5e9);
  color: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(49, 46, 129, .2);
}
.status-title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.05rem);
  letter-spacing: -.03em;
}
.status-desc { margin: .4rem 0 0; color: rgba(255, 255, 255, .82); font-size: .95rem; }

.chip-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 22px;
  padding-bottom: 4px;
}
.chip {
  flex: 0 0 auto;
  padding: .55rem .9rem;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: #445068;
  font-size: .85rem;
  font-weight: 650;
}
.chip:hover { color: var(--primary); border-color: #c7d2fe; }

@media (max-width: 1024px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; padding-top: 20px; }
  .auth-hero { min-height: auto; }
  .hero-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .shell { width: min(100% - 22px, 720px); }
  .topbar-inner { min-height: 66px; }
  .brand small { display: none; }
  .topbar-nav .nav-link-pill { display: none; }
  .metric-grid { grid-template-columns: 1fr; gap: 12px; }
  .metric, .panel { padding: 20px; border-radius: 20px; }
  .hero-points { grid-template-columns: 1fr; margin-top: 1.7rem; }
  .grid-profile { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: 1fr 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .captcha-row { grid-template-columns: 1fr; }
  .captcha-img { min-height: 54px; }
  .panel-head { display: block; }
  .section-tag { margin-bottom: .8rem; }
  .status-card { display: block; }
  .status-card .btn { width: 100%; margin-top: 1rem; }
  .contact-item { display: block; }
  .contact-item span { margin-top: .3rem; text-align: left; }
  .auth-footer { display: block; }
  .auth-footer .btn { margin-top: .8rem; }
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 0;
}
.login-card {
  width: min(440px, 100%);
  padding: clamp(26px, 6vw, 42px);
}
.login-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .7rem;
  font-weight: 800;
  font-size: 1.05rem;
}
.login-title {
  margin: 1.2rem 0 1.5rem;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.login-footer {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.detail-item {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.detail-item.span-2 { grid-column: 1 / -1; }
.detail-label {
  display: block;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}
.detail-value {
  display: block;
  margin-top: .45rem;
  font-size: 1.12rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.detail-value.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.08rem;
  letter-spacing: .02em;
}
@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; gap: 10px; }
  .detail-item { padding: 15px; }
  .detail-value { font-size: 1.05rem; }
}


.server-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem 1rem;
  margin-bottom: 1rem;
}
.server-actions .btn { min-height: 40px; padding: .55rem .95rem; font-size: .85rem; }
.server-actions .hint { margin: 0; }
.server-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .28rem;
}
.speed-result {
  min-height: 1.25rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.speed-result.testing { color: var(--warning); }
.speed-result.speed-good { color: var(--success); }
.speed-result.speed-bad { color: var(--danger); }
.speed-btn {
  margin-top: .35rem;
  min-height: 32px;
  padding: .25rem .8rem;
  border: 1px solid #dbe2ec;
  border-radius: 999px;
  background: #fff;
  color: #48546a;
  font-size: .76rem;
  font-weight: 750;
  cursor: pointer;
  transition: .2s ease;
}
.speed-btn:hover {
  color: var(--primary);
  border-color: #c7d2fe;
  background: #f8faff;
}
.speed-btn:disabled { opacity: .6; cursor: not-allowed; }

.credential {
  position: relative;
  border-width: 2px;
}
.credential-user { border-color: #bfdbfe; background: linear-gradient(180deg, #fff, #f8fbff); }
.credential-password { border-color: #ddd6fe; background: linear-gradient(180deg, #fff, #fbfaff); }
.credential-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.detail-mark {
  flex: 0 0 auto;
  padding: .2rem .5rem;
  border-radius: 999px;
  color: #4f46e5;
  background: #eef2ff;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.3;
}
.credential-password .detail-mark { color: #7c2d12; background: #ffedd5; }
@media (max-width: 640px) {
  .server-actions { align-items: stretch; flex-direction: column; }
  .server-actions .btn { width: 100%; }
}
