:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --card-soft: #f9fafb;
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --danger: #ef4444;
  --success: #16a34a;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 30px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  font-size: 16px; /* 比默认大一点，整体放大约 25% */
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
}

/* 布局壳 */
.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

/* 顶部栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 8px;
  z-index: 10;
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: radial-gradient(circle at 0 0, #34d399 0, #22c55e 28%, #16a34a 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: #f9fafb;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.brand-text-main {
  font-size: 18px;
  font-weight: 700;
}

.brand-text-sub {
  font-size: 13px;
  color: var(--muted);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 小标签 */
.pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 7px 14px;
  font-size: 14px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f9fafb;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #4ade80, #22c55e 65%, #16a34a);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.28);
}

/* 按钮 */
.btn {
  border-radius: 999px;
  padding: 7px 16px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: linear-gradient(135deg, #ffffff, #f3f4f6);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: rgba(59, 130, 246, 0.9);
  color: #f9fafb;
}

.btn-secondary {
  background: #f9fafb;
  border-color: rgba(148, 163, 184, 0.6);
  color: #374151;
}

.btn-danger {
  border-color: rgba(248, 113, 113, 0.9);
  background: linear-gradient(135deg, #f97373, #b91c1c);
  color: #fff7ed;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 公告条 */
.notice-bar {
  margin-top: 10px;
  margin-bottom: 16px;
}

.notice-inner {
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice-label {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #eff6ff;
}

.notice-text {
  font-size: 14px;
  color: #1f2933;
}

/* 主布局：左账户 / 右订阅 */
.layout-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: stretch; /* 让两列等高 */
}

.layout-main-left,
.layout-main-right {
  align-self: stretch;
}

/* 卡片 */
.card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.card-soft {
  background: var(--card-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 16px 16px 14px;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

/* 等高卡片 */
.card-equal {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
}

.card-subtitle {
  font-size: 14px;
  color: var(--muted);
}

hr.card-divider {
  border: none;
  height: 1px;
  margin: 10px 0 12px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.8), transparent);
}

/* 信息栅格 */
.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.info-item {
  font-size: 14px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.info-label {
  color: var(--muted);
  margin-bottom: 3px;
  font-size: 13px;
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  word-break: break-all;
}

/* 标签 tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: var(--muted);
}

.tag-accent {
  border-color: rgba(37, 99, 235, 0.9);
  background: #e0edff;
  color: #1d4ed8;
}

.pill-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

/* 小号文字 */
.small-text {
  font-size: 13px;
  color: var(--muted);
}

/* 复制行 */
.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.copy-input {
  flex: 1;
  border-radius: 999px;
  border: 1px dashed var(--border);
  padding: 7px 10px;
  font-size: 14px;
  background: #ffffff;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 二维码 */
.qr-container {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.qr-box {
  border-radius: 18px;
  padding: 10px;
  background: radial-gradient(circle at 100% 0, rgba(56, 189, 248, 0.16), #f9fafb);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

/* 消息提示 */
.message {
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 12px;
  margin-top: 10px;
  border: 1px solid transparent;
}

.message.error {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.message.success {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

/* 输入框 / 下拉框 */
.input,
.select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: all 0.15s ease;
}

.input:focus,
.select:focus {
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
}

/* 推广块 */
.promo-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.promo-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.promo-title {
  font-size: 15px;
  font-weight: 600;
}

.promo-subtitle {
  font-size: 13px;
  color: var(--muted);
}

.promo-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.promo-stat {
  flex: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 8px 10px;
}

.promo-stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.promo-stat-value {
  font-size: 15px;
  font-weight: 600;
}

.promo-link-row {
  margin-top: 6px;
}

/* 模态框（套餐页也会用到） */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.2);
  max-width: 420px;
  width: 100%;
  padding: 16px 16px 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  cursor: pointer;
  font-size: 20px;
  color: var(--muted);
}

/* 套餐列表（plans.html 用） */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.plan-card {
  border-radius: 16px;
  padding: 10px 11px 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-name {
  font-size: 15px;
  font-weight: 600;
}

.plan-price {
  font-size: 18px;
  font-weight: 700;
}

.plan-meta {
  font-size: 13px;
  color: var(--muted);
}

.plan-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  gap: 8px;
}

/* 通用工具类 */
.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

/* 响应式 */
@media (max-width: 960px) {
  .app-shell {
    padding: 12px 10px 26px;
  }

  .layout-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .info-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .brand-text-sub {
    display: none;
  }
  .nav-right .pill {
    display: none;
  }
}


/* 邀请码标签样式 */
.invite-code {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.invite-code:hover {
  background: #dbeafe;
}
