/* ============================================================
   闪客网盘 · 基础样式
   ============================================================ */
:root {
  --brand: #12b4ea;
  --brand-dark: #0aa5db;
  --brand-deep: #0094d9;
  --brand-ink: #1aa9e8;
  --indigo: #5574fb;
  --indigo-2: #89a6ff;
  --ink: #161a56;
  --ink-2: #1f235e;
  --text: #333333;
  --text-2: #5b6474;
  --muted: #8b95a5;
  --line: #e9edf3;
  --line-2: #eef2f6;
  --bg: #eef1f6;
  --card: #ffffff;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(31, 45, 61, 0.06);
  --shadow-lg: 0 20px 60px rgba(31, 45, 61, 0.12);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-ink); }
img, svg { max-width: 100%; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

::selection { background: rgba(18, 180, 234, 0.18); }

.container {
  width: 1200px;
  max-width: calc(100% - 48px);
  margin: 0 auto;
}

/* ---------------------------------------------------------- 顶部导航 */
.site-header {
  background: #fff;
  position: relative;
  z-index: 30;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 72px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(140deg, #3f8cff 0%, #12b4ea 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(18, 180, 234, 0.28);
  flex: none;
}

.logo-mark svg { width: 20px; height: 20px; }

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #17a9e6;
  letter-spacing: 0.5px;
}

.nav {
  display: flex;
  align-items: stretch;
  height: 72px;
}

.nav > a {
  display: flex;
  align-items: center;
  padding: 0 21px;
  font-size: 15px;
  color: #333;
  transition: color 0.15s;
}

.nav > a:hover, .nav > a.active { color: #12a9e0; }

.nav .nav-login {
  margin-left: 22px;
  padding: 0 22px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  min-width: 92px;
  justify-content: center;
}

.nav .nav-login:hover { background: var(--brand-dark); color: #fff; }

.nav .nav-user {
  margin-left: 22px;
  padding: 0 20px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f8fc;
  color: #33415c;
}

.nav .nav-user:hover { background: #eaf5fc; color: #12a9e0; }

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b8dff, #12b4ea);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}

/* ---------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  padding: 0 18px;
  height: 40px;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(18, 180, 234, 0.24); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }

.btn-indigo { background: linear-gradient(135deg, #5574fb, #7e9bfe); color: #fff; box-shadow: 0 10px 24px rgba(78, 109, 251, 0.25); }
.btn-indigo:hover { color: #fff; filter: brightness(1.04); }

.btn-dark { background: #17181c; color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }

.btn-outline { border: 1px solid #dfe6ee; background: #fff; color: #4a5568; }
.btn-outline:hover { border-color: #9adcf3; color: var(--brand-deep); }

.btn-blue-outline { border: 1px solid #7cc9ea; background: #fff; color: #2196d3; }
.btn-blue-outline:hover { background: #f2fbff; }

.btn-danger { background: #f56c6c; color: #fff; }
.btn-danger:hover { background: #ee5a5a; color: #fff; }

.btn-ghost { background: #f4f7fa; color: #4a5568; }
.btn-ghost:hover { background: #eceff4; }

.btn-lg { height: 52px; font-size: 16px; border-radius: 10px; padding: 0 34px; }
.btn-sm { height: 32px; font-size: 13px; padding: 0 12px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------- 表单 */
.field { margin-bottom: 20px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.field-label .req { color: #f56c6c; font-weight: 400; }

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 400;
}

.input, .select, .textarea {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  background: #f7f9fb;
  color: #333;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.textarea { height: 130px; padding: 13px 16px; line-height: 1.7; resize: vertical; }

.input::placeholder, .textarea::placeholder { color: #a7b0bd; }

.input:focus, .select:focus, .textarea:focus {
  border-color: #8fd8f0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 180, 234, 0.09);
}

.input:disabled { background: #f3f5f8; color: #9aa3b0; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%238b95a5' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 38px;
}

.form-error {
  display: none;
  margin: 10px 0 0;
  font-size: 13px;
  color: #ee5a5a;
  background: #fef1f1;
  border: 1px solid #fbdcdc;
  border-radius: 6px;
  padding: 8px 12px;
}

.form-error.show { display: block; }

/* ---------------------------------------------------------- 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 26, 45, 0.45);
  backdrop-filter: blur(2px);
}

.modal-mask.show { display: flex; }

.modal {
  width: 460px;
  max-width: 100%;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 14px;
}

.modal-head h3 { font-size: 18px; color: #222; }

.modal-close {
  width: 30px;
  height: 30px;
  border: 0;
  background: #f4f6f9;
  border-radius: 50%;
  color: #8b95a5;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { background: #e9edf2; color: #333; }

.modal-body { padding: 8px 26px 22px; }
.modal-foot { padding: 0 26px 24px; display: flex; gap: 12px; justify-content: flex-end; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- 提示条 */
.toast-wrap {
  position: fixed;
  z-index: 1200;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 14px;
  box-shadow: 0 10px 34px rgba(24, 39, 75, 0.16);
  border: 1px solid #edf1f5;
  animation: toast-in 0.22s ease;
  pointer-events: auto;
}

.toast.ok::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #24b47e;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.toast.err::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f56c6c;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath d='M6 6l6 6M12 6l-6 6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.toast.hide { opacity: 0; transform: translateY(-6px); transition: 0.25s; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- 通用 */
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #f2f5f9;
  color: #6b7689;
  white-space: nowrap;
}

.pill-green { background: #e2f8ec; color: #13995c; }
.pill-orange { background: #feeede; color: #d97a2b; }
.pill-blue { background: #e2f4fd; color: #1b95cf; }
.pill-red { background: #feecec; color: #e05252; }
.pill-cyan { background: #e2f8ff; color: #0d9fcf; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.text-muted { color: var(--muted); }
.text-brand { color: var(--brand-ink); }
.text-danger { color: #e05252; }
.text-success { color: #13995c; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }

/* 表单错误抖动 */
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.shake { animation: shake 0.4s; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd8e3; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b9c4d2; }
::-webkit-scrollbar-track { background: transparent; }


/* ---------------------------------------------------------- 支付弹窗通用 */
.pay-amount { font-size: 44px; font-weight: 600; color: #333; line-height: 1.2; margin-top: 6px; }
.pay-amount small { font-size: 20px; font-weight: 400; margin-right: 2px; }
.pay-plan { color: #8b95a5; font-size: 14px; margin-top: 6px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 18px; }
.pay-method { position: relative; height: 58px; border: 1px solid #e6ebf0; border-radius: 8px; background: #fafbfc; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: #333; cursor: pointer; }
.pay-method.active { border-color: #12b4ea; background: #f4fcff; box-shadow: 0 0 0 3px rgba(18, 180, 234, 0.08); }
.pay-method .pay-icon { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 12px; }
.pay-icon.wechat { background: #22c55e; }
.pay-icon.alipay { background: #1677ff; }
.pay-tip { font-size: 12px; color: #a2aab6; margin-top: 14px; }

/* 响应式 */
@media (max-width: 1240px) {
  .container { max-width: calc(100% - 64px); }
}

@media (max-width: 900px) {
  .header-inner { height: 62px; }
  .logo, .nav { height: 62px; }
  .logo-mark { width: 30px; height: 30px; }
  .logo-text { font-size: 19px; white-space: nowrap; }
  .nav > a { padding: 0 8px; font-size: 13px; white-space: nowrap; }
  .nav .nav-login { margin-left: 4px; min-width: auto; padding: 0 10px; font-size: 13px; }
  .container { max-width: calc(100% - 32px); }
}
