/* 刚刚好·站点续费管家 — UI
 * 版权所有 / 开发者：刚刚好资源网
 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Outfit:wght@500;600;700&display=swap");

:root {
  --ink: #0a0612;
  --ink-2: #120a1c;
  --panel: rgba(28, 18, 42, 0.82);
  --panel-solid: #1c122a;
  --line: rgba(167, 139, 250, 0.22);
  --line-strong: rgba(192, 132, 252, 0.4);
  --text: #f3eefc;
  --muted: #a89bb8;
  --jade: #c084fc;
  --jade-deep: #9333ea;
  --jade-soft: rgba(192, 132, 252, 0.14);
  --gold: #f0abfc;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --info: #e879f9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Outfit", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(147, 51, 234, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(236, 72, 153, 0.12), transparent 45%),
    radial-gradient(800px 400px at 50% 100%, rgba(88, 28, 135, 0.18), transparent 50%),
    linear-gradient(165deg, var(--ink) 0%, var(--ink-2) 48%, #0d0814 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(192, 132, 252, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 132, 252, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

a { color: var(--jade); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #7ef0c6; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  animation: riseIn 0.55s var(--ease) both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* —— Topbar —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 36, 30, 0.92), rgba(10, 24, 20, 0.85));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
}
a.brand:hover { color: #fff; text-decoration: none; }
.brand-mark,
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: #000;
  box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.35), 0 8px 22px rgba(147, 51, 234, 0.35);
  flex-shrink: 0;
  display: block;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--jade), var(--jade-deep));
  color: #1a0a2e;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
}
.brand-sub {
  display: block;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  align-items: center;
}
.nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a:hover { background: var(--jade-soft); color: #fff; text-decoration: none; }
.nav a.active {
  background: var(--jade-soft);
  color: var(--jade);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.nav .pill-user {
  margin-left: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

/* —— Cards —— */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 132, 252, 0.5), transparent);
  opacity: 0.7;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.card h1, .card h2, .card h3 {
  font-family: var(--display);
  letter-spacing: 0.01em;
  color: #fff;
}
.card h2, .card h3 { margin: 0 0 14px; font-size: 1.12rem; font-weight: 600; }
.card h1 { margin: 0 0 12px; font-size: 1.55rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

.grid { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) {
  .grid2, .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid2, .grid4 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

/* —— Stats —— */
.stat {
  position: relative;
  background: linear-gradient(160deg, rgba(12, 28, 24, 0.95), rgba(8, 20, 17, 0.9));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.stat:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}
.stat::after {
  content: "";
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.2), transparent 70%);
}
.stat span.muted, .stat > span:first-child {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.stat b {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 11px;
  border: 0;
  background: linear-gradient(135deg, var(--jade) 0%, var(--jade-deep) 100%);
  color: #1a0a2e !important;
  font-weight: 650;
  font-size: 0.9rem;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(147, 51, 234, 0.32);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
}
.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(147, 51, 234, 0.42);
}
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text) !important;
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--jade-soft);
  color: #fff !important;
  filter: none;
}
.btn-danger {
  background: linear-gradient(135deg, #fb7185, #e11d48);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.28);
}
.btn-ok {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #042018 !important;
}
.btn-primary-text { color: #1a0a2e !important; }
.btn-wx {
  background: linear-gradient(135deg, #22c55e, #15803d) !important;
  color: #fff !important;
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 9px; }

/* —— Forms —— */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}
.field input, .field select, .field textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"],
select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(5, 14, 12, 0.72);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--jade);
  box-shadow: 0 0 0 3px var(--jade-soft);
}
.field textarea { min-height: 96px; resize: vertical; }

/* —— Table —— */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
.table th, .table td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.table tr { transition: background 0.15s; }
.table tbody tr:hover td { background: rgba(192, 132, 252, 0.06); }

/* —— Badges / Alerts —— */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--line);
}
.badge-ok { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.3); }
.badge-warn { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border-color: rgba(251, 191, 36, 0.28); }
.badge-danger { background: rgba(251, 113, 133, 0.12); color: #fda4af; border-color: rgba(251, 113, 133, 0.28); }

.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  animation: riseIn 0.35s var(--ease) both;
}
.alert-ok { background: rgba(52, 211, 153, 0.12); color: #a7f3d0; border-color: rgba(52, 211, 153, 0.25); }
.alert-err { background: rgba(251, 113, 133, 0.12); color: #fecdd3; border-color: rgba(251, 113, 133, 0.25); }
.alert-info { background: rgba(103, 232, 249, 0.1); color: #a5f3fc; border-color: rgba(103, 232, 249, 0.22); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }

/* —— Auth / Login —— */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  position: relative;
  z-index: 1;
}
.login-box {
  width: min(440px, 100%);
  margin: 0 auto;
}
.login-box.card, .auth-card {
  padding: 28px 28px 24px;
}
.auth-hero {
  text-align: center;
  margin-bottom: 22px;
}
.auth-hero .brand-mark,
.auth-hero .brand-logo {
  margin: 0 auto 14px;
  width: 88px;
  height: 88px;
  font-size: 1.15rem;
  border-radius: 18px;
}
.brand-logo-lg {
  width: 112px;
  height: 112px;
  border-radius: 20px;
}
.auth-hero h1 {
  font-family: var(--display);
  font-size: 1.45rem;
  margin: 0 0 6px;
  color: #fff;
}
.auth-hero p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* —— File list —— */
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  transition: background 0.15s;
}
.file-list li:hover { background: rgba(192, 132, 252, 0.06); }
.file-list a { color: var(--text); font-weight: 500; }
.file-list a:hover { color: var(--jade); }

/* —— Admin sidebar —— */
.admin-side {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 860px) {
  .admin-side { grid-template-columns: 1fr; }
}
.side-nav.card {
  padding: 14px;
  position: sticky;
  top: 16px;
}
.side-nav .nav-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 12px 10px;
  font-weight: 600;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  margin-bottom: 3px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.side-nav a:hover {
  background: var(--jade-soft);
  color: #fff;
  text-decoration: none;
  transform: translateX(2px);
}
.side-nav a.active {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.22), rgba(147, 51, 234, 0.12));
  color: var(--jade);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.side-nav a.active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 8px var(--jade);
}

.page-title {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
}
.page-desc { margin: 0 0 20px; color: var(--muted); font-size: 0.9rem; }

code, .code-block {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: #b8f0d8;
  word-break: break-all;
}

.site-foot {
  margin-top: 40px;
  padding: 20px 8px 4px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.7;
}
.site-foot a { color: var(--jade); }

.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.copy-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(5, 14, 12, 0.72);
  color: var(--text);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
}
.copy-row .btn { flex-shrink: 0; }

/* —— Site cards (user) —— */
.site-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
}
.site-meta span {
  font-size: 0.85rem;
  color: var(--muted);
}
.site-meta strong { color: var(--text); font-weight: 600; }

/* —— Expire page —— */
.expire-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
  position: relative;
  z-index: 1;
}
.expire-card { max-width: 520px; text-align: center; padding: 40px 32px; }
.expire-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-size: 1.6rem;
}

/* —— VIP plan cards —— */
.plan-price {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--jade);
  margin: 8px 0;
  letter-spacing: -0.02em;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.toolbar-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 200px;
}
.toolbar-search input[type="search"],
.toolbar-search select {
  width: auto;
  min-width: 160px;
  flex: 1;
  max-width: 280px;
  padding: 8px 12px;
}
.row-muted td { opacity: 0.55; }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.pager-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pager .btn.disabled,
.btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
