/* ============================================================
   众耀图床 - 全局样式
   扁平设计 · 主色 #355ed0 · 背景 #f0f2f5 · 圆角 10px
   ============================================================ */

:root {
  --primary: #355ed0;
  --bg: #f0f2f5;
  --text: #172033;
  --muted: #718096;
  --line: #e5eaf2;
  --card: #fff;
  --danger: #cf3d4b;
  --success: #18a058;
  --warning: #e8930c;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
a { color: var(--primary); cursor: pointer; text-decoration: none; }
h1, h2, h3 { margin: 0; }

/* ---------- 通用组件 ---------- */
.btn {
  background: var(--primary);
  color: #fff;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity .15s;
}
.btn:hover { opacity: .9; }
.btn.alt { background: #eef2ff; color: var(--primary); }
.btn.danger { background: #feecee; color: var(--danger); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.block { width: 100%; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  animation: up .35s ease;
}

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

.field { margin: 14px 0; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  outline: 0;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #355ed018; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row .btn { flex: 0 0 auto; }

.link-input {
  flex: 1; min-width: 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 12px; color: var(--muted); background: #fafbfe;
}

/* ---------- 动画 ---------- */
@keyframes up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   官网首页 / 落地页
   ============================================================ */
.landing { background: var(--bg); }

/* 顶部导航（毛玻璃） */
.landing-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(23, 35, 63, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.landing-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
}
.landing-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-size: 20px; }
.landing-brand img { width: 40px; height: 40px; object-fit: contain; }
.landing-menu { display: flex; gap: 26px; }
.landing-menu a { color: #c7d2ee; font-size: 15px; transition: color .15s; }
.landing-menu a:hover { color: #fff; }
.landing-actions { display: flex; gap: 10px; }

/* Hero */
.landing-hero {
  background: url('/login-bg.jpeg') center/cover;
  color: #fff; text-align: center;
  padding: 110px 20px 120px;
}
.landing-hero h1 { font-size: 46px; font-weight: 800; margin-bottom: 18px; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.landing-hero .sub { font-size: 18px; opacity: .95; margin: 0 0 34px; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.landing-hero .actions { display: flex; gap: 14px; justify-content: center; }
.landing-hero .btn { font-size: 16px; padding: 14px 34px; }
.landing-hero .btn.alt { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(6px); }
.hero-badges { display: flex; gap: 24px; justify-content: center; margin-top: 46px; flex-wrap: wrap; }
.hero-badges span { display: flex; align-items: center; gap: 7px; font-size: 14px; opacity: .92; }
.hero-badges i { font-size: 18px; }

/* 通用 section */
.landing-section { max-width: 1200px; margin: 0 auto; padding: 72px 24px; }
.landing-section.alt { max-width: none; background: #fff; }
.landing-section.alt .inner { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 30px; margin-bottom: 10px; }
.section-head p { color: var(--muted); margin: 0; }

/* 功能卡片 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 30px 26px; transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px #17233f12; }
.feature-card .icon {
  width: 54px; height: 54px; border-radius: 10px;
  display: grid; place-items: center; font-size: 26px; margin-bottom: 18px;
}
.feature-card h3 { font-size: 18px; margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.7; }

/* 套餐 */
.plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.plan-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 28px 24px; text-align: center;
}
.plan-card.hot { border-color: var(--primary); box-shadow: 0 12px 30px #355ed01f; }
.plan-card h3 { font-size: 18px; margin-bottom: 14px; }
.plan-card .price { font: 700 30px Outfit; color: var(--primary); margin-bottom: 6px; }
.plan-card .price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.plan-card ul { padding: 0; margin: 18px 0 22px; text-align: left; }
.plan-card li { list-style: none; padding: 7px 0; color: #5e6a80; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.plan-card li i { color: var(--primary); }
.plan-card .btn { width: 100%; }

/* 步骤 */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { text-align: center; padding: 30px 20px; }
.step-num {
  width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%;
  background: #eef2ff; color: var(--primary); font: 700 24px Outfit;
  display: grid; place-items: center;
}
.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* Footer */
.landing-footer {
  background: #17233f; color: #aebada; text-align: center;
  padding: 40px 20px; font-size: 14px;
}
.landing-footer .foot-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.landing-footer .foot-brand img { width: 32px; height: 32px; object-fit: contain; }

@media (max-width: 800px) {
  .landing-menu { display: none; }
  .landing-header-inner { padding: 12px 16px; }
  .landing-hero { padding: 70px 20px 80px; }
  .landing-hero h1 { font-size: 32px; }
  .landing-hero .sub { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .landing-section { padding: 48px 20px; }
  .section-head h2 { font-size: 24px; }
}

/* ============================================================
   认证页（登录 / 注册 / 忘记密码）
   ============================================================ */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: url('/login-bg.jpeg') center/cover fixed;
  padding: 20px;
}
.auth-card {
  position: relative;
  width: min(440px, 100%);
  background: #ffffffeb;
  backdrop-filter: blur(14px);
  border-radius: 10px;
  padding: 34px;
  box-shadow: 0 20px 60px #14234b33;
  animation: up .45s ease;
}
.auth-card .logo { width: 72px; height: 72px; object-fit: contain; display: block; margin: 0 auto 12px; }
.auth-card h1 { text-align: center; font-size: 24px; margin: 0 0 25px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; }

/* ============================================================
   工作台布局
   ============================================================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  background: #17233f;
  color: #dbe4ff;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; padding: 0 12px 25px; color: #fff; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  color: #aebada; padding: 12px; border-radius: 7px;
  margin: 3px 0; cursor: pointer;
}
.nav a i { font-size: 20px; }
.nav a.active, .nav a:hover { background: #2a4380; color: #fff; }

.member {
  margin-top: auto; padding: 16px;
  background: #223661; border-radius: 9px;
}
.member .muted { color: #9fb0d8; }
.member strong { display: block; color: #fff; margin: 6px 0; font-size: 17px; }
.member .badge {
  display: inline-block; margin-top: 8px;
  background: #355ed0; color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 20px;
}

.main { flex: 1; min-width: 0; }

.topbar {
  height: 70px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; justify-content: flex-end; align-items: center;
  padding: 0 30px; position: relative;
}
.user-menu { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #dfe7ff; color: var(--primary);
  display: grid; place-items: center; font-weight: 700;
}
.dropdown {
  display: none; position: absolute; right: 25px; top: 58px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 30px #1b2a4a1f; z-index: 5; overflow: hidden;
}
.dropdown.show { display: block; }
.dropdown button { display: block; background: #fff; padding: 11px 18px; width: 150px; text-align: left; }
.dropdown button:hover { background: #f5f7fb; }

.content { padding: 30px; max-width: 1400px; margin: auto; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.page-head h2 { font-size: 24px; }

/* ---------- 控制台 ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat i { font-size: 24px; color: var(--primary); }
.stat .num { font: 700 28px Outfit; margin-top: 10px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; min-width: 780px; }
.table th, .table td {
  padding: 13px 15px; text-align: left;
  border-bottom: 1px solid var(--line); font-size: 13px; white-space: nowrap;
}
.table th { background: #fafbfe; color: var(--muted); font-weight: 500; }
.table tr:last-child td { border-bottom: 0; }

.thumb {
  width: 54px; height: 42px; object-fit: cover;
  border-radius: 5px; cursor: zoom-in; display: block;
}

/* ---------- 状态标签 ---------- */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.tag.ok { background: #e6f7ee; color: var(--success); }
.tag.warn { background: #fef4e5; color: var(--warning); }
.tag.bad { background: #feecee; color: var(--danger); }

/* ---------- 会员套餐 ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan h3 { margin: 0 0 8px; }
.plan .price { font: 700 28px Outfit; color: var(--primary); margin: 15px 0; }
.plan ul { padding: 0; margin: 0 0 15px; }
.plan li { list-style: none; padding: 6px 0; color: #5e6a80; font-size: 13px; }
.plan li i { color: var(--primary); margin-right: 6px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; background: #17233f66;
  display: none; place-items: center; padding: 20px; z-index: 20;
}
.modal.show { display: grid; }
.modal-box {
  width: min(520px, 100%); background: #fff;
  border-radius: 10px; padding: 24px;
  max-height: 90vh; overflow: auto;
  animation: up .3s ease;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { font-size: 18px; }
.close { background: none; font-size: 26px; color: var(--muted); line-height: 1; }

/* ---------- 上传组件 ---------- */
.dropzone {
  position: relative;
  border: 1px dashed #9eadd0; border-radius: 8px;
  padding: 28px; text-align: center; color: var(--muted);
}
.dropzone i { font-size: 32px; color: var(--primary); }
.dropzone input[type=file] { width: 100%; margin-top: 10px; }
.preview-wrap { position: relative; display: inline-block; margin-top: 12px; }
.preview-wrap img { max-width: 220px; max-height: 140px; border-radius: 6px; display: block; }
.preview-remove {
  position: absolute; top: -10px; right: -10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: #17233f; color: #fff; font-size: 15px;
  display: grid; place-items: center;
}

/* ---------- 图片验证码弹窗 ---------- */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-img { border: 1px solid var(--line); border-radius: 6px; height: 42px; cursor: pointer; }

/* ---------- 图片放大 Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: #0b1220dd;
  display: none; place-items: center; z-index: 30; padding: 30px;
}
.lightbox.show { display: grid; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox .close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 34px; }

/* ---------- 移动端 tabbar ---------- */
.mobile-bar { display: none; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 800px) {
  .sidebar { display: none; }
  .content { padding: 24px 15px 90px; }
  .topbar { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .plans { grid-template-columns: 1fr 1fr; }
  .card { padding: 15px; }
  .stat .num { font-size: 23px; }
  .page-head h2 { font-size: 20px; }

  .mobile-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    height: 66px; background: #fff; border-top: 1px solid var(--line);
    z-index: 8; justify-content: space-around;
  }
  .mobile-bar a {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; color: var(--muted); font-size: 11px; gap: 4px;
  }
  .mobile-bar a.active { color: var(--primary); }
  .mobile-bar i { font-size: 21px; }

  /* 表格卡片化 */
  .table-wrap { border: 0; background: transparent; overflow: visible; }
  .table { min-width: 0; }
  .table thead { display: none; }
  .table tr { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; padding: 10px; display: block; }
  .table td { border: 0; padding: 6px 4px; white-space: normal; overflow-wrap: anywhere; display: block; }
  .table td:before { display: inline-block; width: 76px; color: var(--muted); font-size: 12px; }

  /* 图片列表右下角悬浮新增按钮 */
  #add {
    position: fixed; right: 20px; bottom: 82px;
    width: 54px; height: 54px; border-radius: 50%;
    padding: 0; font-size: 0; z-index: 7;
    box-shadow: 0 8px 18px #355ed044;
  }
  #add i { font-size: 24px; }
}
