/* =============================================
   久开软件工坊 - 主样式表
   ============================================= */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --bg: #f3f4f6;
  --card-bg: #fff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body { overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---- 容器 ---- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---- 顶部导航 ---- */
.site-header {
  background: #fff;
  border-bottom: 2px solid var(--primary);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow);
}
@media (max-width: 768px) {
  .site-header { position: relative; }
}
.header-inner {
  display: flex; align-items: center; gap: 12px;
  height: 64px; flex-wrap: nowrap;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: var(--primary); white-space: nowrap;
}
.logo img { height: 48px; }
.logo .logo-domain {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  letter-spacing: .5px;
  margin-top: 2px;
  line-height: 1;
}

.main-nav {
  display: flex; align-items: center; gap: 4px; flex: 1;
}
.main-nav > a, .nav-dropdown > a {
  padding: 6px 10px; border-radius: var(--radius);
  font-size: 16px; color: var(--text); white-space: nowrap;
  transition: background .2s, color .2s;
}
.main-nav > a:hover, .nav-dropdown > a:hover {
  background: var(--primary); color: #fff;
}

/* 汉堡菜单按钮（桌面端隐藏） */
.menu-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; z-index: 1010;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .3s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 下拉菜单 */
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 160px; z-index: 100;
}
.dropdown-menu a {
  display: block; padding: 10px 18px; font-size: 16px; color: var(--text);
}
.dropdown-menu a:hover { background: #f0f4ff; color: var(--primary); }
.nav-dropdown:hover .dropdown-menu { display: block; }

/* 防止中等宽度屏幕下导航撑出水平滚动条 */
@media (max-width: 1100px) {
  .header-search { display: none; }
  .header-inner { gap: 8px; }
  .main-nav > a, .nav-dropdown > a { padding: 6px 8px; font-size: 15px; }
  .logo { font-size: 18px; }
  .logo img { height: 40px; }
}

/* ---- 导航当前高亮 ---- */
.nav-active,
.main-nav > a.nav-active {
  background: var(--primary); color: #fff !important; border-radius: var(--radius);
}

/* ---- 资源列表页：左侧分类树 + 右侧资源 ---- */
.resource-layout {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 24px; padding: 0 0 24px;
}

/* 左侧分类树 */
.category-sidebar {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 12px;
  position: sticky; top: 80px; /* 吸顶 */
}
.sidebar-title {
  font-size: 16px; font-weight: 700; color: var(--primary);
  padding: 8px 12px; border-bottom: 2px solid var(--primary);
  margin-bottom: 8px;
}
.cat-link {
  display: block; padding: 10px 16px; font-size: 16px;
  color: var(--text); border-radius: 6px; transition: all .2s;
}
.cat-link:hover { background: #f0f4ff; color: var(--primary); }
.cat-active {
  background: var(--primary); color: #fff; font-weight: 600;
}
.cat-group { margin-top: 4px; }
.cat-group-title {
  display: block; padding: 8px 16px; font-size: 16px;
  color: var(--text); font-weight: 600; border-radius: 6px; transition: all .2s;
}
.cat-group-title:hover { background: #f0f4ff; color: var(--primary); }
.cat-group-title.cat-active { background: var(--primary); color: #fff; }
.cat-leaf {
  display: block; padding: 6px 16px 6px 28px; font-size: 16px;
  color: var(--text-muted); border-radius: 4px; transition: all .2s;
}
.cat-leaf:hover { background: #f0f4ff; color: var(--primary); }
.cat-leaf.cat-active { background: #dbeafe; color: var(--primary); font-weight: 600; }

/* 右侧资源区 */
.resource-main { min-width: 0; }
.resource-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.resource-header h1 { font-size: 22px; font-weight: 700; }
.resource-count { font-size: 14px; color: #9ca3af; }

/* 面包屑 */
.breadcrumb { padding: 16px 0; font-size: 15px; color: #6b7280; }

/* 搜索框 */
.header-search {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: 24px;
  background: #f9fafb;
}
.header-search input {
  border: none; outline: none; background: transparent;
  padding: 7px 12px; font-size: 14px; width: 120px;
  border-radius: 24px 0 0 24px;
}
.header-search button {
  border: none; background: var(--primary); color: #fff;
  padding: 7px 14px; cursor: pointer; font-size: 14px; font-weight: 600;
  border-radius: 0 24px 24px 0;
  white-space: nowrap;
}
.header-search button:hover { background: var(--primary-dark); }

/* 用户菜单 */
.user-menu { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.user-dropdown { position: relative; cursor: pointer; }
.user-name {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px;
  background: #f0f4ff; font-size: 14px; font-weight: 500;
  white-space: nowrap; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis;
}
.vip-icon {
  background: linear-gradient(135deg,#f59e0b,#d97706);
  color: #fff; font-size: 10px; padding: 1px 5px;
  border-radius: 4px; font-style: normal;
}
.user-dropdown-menu {
  display: none; position: absolute; right: 0; top: 100%;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 140px; z-index: 100;
}
.user-dropdown-menu a {
  display: block; padding: 10px 18px; font-size: 14px; color: var(--text);
}
.user-dropdown-menu a:hover { background: #f0f4ff; color: var(--primary); }
/* 改为点击展开（不再用 hover） */
.user-dropdown.open .user-dropdown-menu { display: block; }
.user-dropdown.open .user-name { background: #e0eaff; }
.user-name .caret {
  font-size: 11px; color: var(--text-muted); margin-left: 2px;
  transition: transform .2s;
}
.user-dropdown.open .user-name .caret { transform: rotate(180deg); }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 6px; font-size: 14px;
  font-weight: 500; cursor: pointer; border: none; transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ---- 卡片 ---- */
.card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; }

/* ---- 资源卡片 ---- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; padding: 20px 0;
}
.resource-card {
  display: block;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  cursor: pointer;
}
.resource-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.resource-card .cover {
  width: 100%; height: 170px; object-fit: cover; display: block;
  background: linear-gradient(135deg,#667eea,#764ba2);
}
.resource-card .cover-placeholder {
  width: 100%; height: 170px;
  background: linear-gradient(135deg,#667eea,#764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: rgba(255,255,255,.7);
}
.resource-card .info { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.resource-card .title { font-size: 15px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; color: var(--text); }
.resource-card:hover .title { color: var(--primary); }
.resource-card .desc { font-size: 13px; color: var(--text-muted); flex: 1; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.resource-card .meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.resource-card .price { font-size: 18px; font-weight: 700; color: var(--danger); }
.resource-card .price.free { color: var(--success); }
.resource-card .extra { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: auto; }
.resource-card .extra .time { display: inline-flex; align-items: center; gap: 3px; }
.resource-card .download-count { font-size: 12px; color: var(--text-muted); }

.resource-empty {
  background: #f9fafb;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  color: #9ca3af;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.resource-empty-icon { font-size: 32px; line-height: 1; }
.resource-empty p { font-size: 15px; margin: 0; }

/* Badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge-vip { background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; }
.badge-free { background: var(--success); color: #fff; }
.badge-game { background: #8b5cf6; color: #fff; }
.badge-theme { background: #ec4899; color: #fff; }

/* ---- 表单 ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px; outline: none;
  transition: border-color .2s;
}
.form-control:focus { border-color: var(--primary); }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* 验证码行 */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-img { height: 40px; cursor: pointer; border-radius: 4px; border: 1px solid var(--border); }

/* ---- 提示框 ---- */
.alert {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
  font-size: 14px; display: flex; align-items: flex-start; gap: 8px;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ---- 会员套餐 ---- */
.vip-plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin: 30px 0;
}
.vip-plan {
  background: #fff; border-radius: var(--radius); padding: 28px 20px;
  text-align: center; box-shadow: var(--shadow); border: 2px solid transparent;
  transition: all .2s; cursor: pointer;
}
.vip-plan:hover, .vip-plan.active { border-color: var(--primary); transform: translateY(-2px); }
.vip-plan.featured { border-color: var(--accent); background: #fffbeb; }
.vip-plan .plan-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.vip-plan .plan-price { font-size: 36px; font-weight: 800; color: var(--danger); }
.vip-plan .plan-price sub { font-size: 16px; color: var(--text-muted); font-weight: 400; }
.vip-plan .plan-desc { font-size: 13px; color: var(--text-muted); margin: 12px 0 20px; }
.vip-plan .plan-features { list-style: none; text-align: left; font-size: 13px; }
.vip-plan .plan-features li { padding: 4px 0; color: var(--text-muted); }
.vip-plan .plan-features li::before { content: "✓ "; color: var(--success); font-weight: 700; }

/* ---- 分页 ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 30px 0; flex-wrap: wrap; }
.pagination ul { display: flex; list-style: none; gap: 6px; justify-content: center; margin: 0; }
.pagination li a {
  display: block; width: 36px; height: 36px; line-height: 36px; text-align: center;
  border-radius: 6px; border: 1px solid var(--border); font-size: 14px;
  color: var(--text); transition: all .2s;
}
.pagination li a:hover, .pagination li.active a {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.pagination-info { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.pagination-jump { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.pagination-jump input {
  width: 52px; height: 32px; text-align: center;
  border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
  outline: none; transition: border-color .2s;
}
.pagination-jump input:focus { border-color: var(--primary); }

/* ---- 用户中心 ---- */
.user-center-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px 0; }
.user-sidebar { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.user-sidebar .avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg,#667eea,#764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: #fff; margin: 0 auto 12px;
}
.user-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 6px; color: var(--text); font-size: 16px;
  margin-bottom: 4px; transition: all .2s;
}
.user-sidebar nav a:hover, .user-sidebar nav a.active {
  background: #f0f4ff; color: var(--primary);
}

/* ---- 数据表格 ---- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #f9fafb; padding: 12px 16px; text-align: left;
  font-size: 13px; color: var(--text-muted); font-weight: 600;
  border-bottom: 2px solid var(--border);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:hover td { background: #f9fafb; }

/* ---- 主页 Banner ---- */
.hero-banner {
  background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
  color: #fff; text-align: center; padding: 5px 20px 4px;
}
.hero-banner h1 { font-size: 36px; font-weight: 800; margin-bottom: 3px; }
.hero-banner p { font-size: 16px; opacity: .85; margin-bottom: 8px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { font-size: 15px; padding: 12px 30px; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 0; flex-wrap: wrap; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat .num { font-size: 32px; font-weight: 800; }
.hero-stats .stat .label { font-size: 13px; opacity: .75; }

/* ---- 首页分类入口 ---- */
.category-tabs { display: flex; gap: 12px; margin: 24px 0 0; flex-wrap: wrap; }
.category-tabs a {
  padding: 8px 22px; border-radius: 24px; border: 1.5px solid var(--border);
  font-size: 14px; color: var(--text-muted); transition: all .2s;
}
.category-tabs a:hover, .category-tabs a.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ---- 固定提示文案 ---- */
.resource-notice {
  background: #eff6ff; border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: 14px 18px; margin: 20px 0;
  font-size: 15px; color: #1e40af; line-height: 1.7;
}

/* ---- 详情页 ---- */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding: 24px 0; }
.detail-title { font-size: 24px; font-weight: 800; color: #111827; margin-bottom: 14px; line-height: 1.35; }
.detail-cover { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display:block; }
.detail-cover-placeholder { width: 100%; height: 300px; background: linear-gradient(135deg,#667eea,#764ba2); border-radius: var(--radius); display:flex; align-items:center; justify-content:center; font-size:80px; color:rgba(255,255,255,.7); }
.detail-download-box {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); position: sticky; top: 80px;
}
.detail-download-box .price { font-size: 32px; font-weight: 800; color: var(--danger); margin-bottom: 8px; }
.detail-download-box .price.free { color: var(--success); }

/* ---- 详情页：热门下载 ---- */
.detail-hot-resources {
  margin-top: 20px;
  background: #f9fafb;
  border-radius: var(--radius);
  padding: 14px;
}
.detail-hot-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.detail-hot-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
  transition: background .2s;
}
.detail-hot-item:first-of-type { padding-top: 0; }
.detail-hot-item:last-child { border-bottom: none; padding-bottom: 0; }
.detail-hot-item:hover .detail-hot-name { color: var(--primary); }
.detail-hot-thumb {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg,#667eea,#764ba2);
}
.detail-hot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-hot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: rgba(255,255,255,.7);
}
.detail-hot-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.detail-hot-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.detail-hot-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 富文本内容样式（资源描述） ---- */
.rich-content { line-height: 1.8; color: #333; }
.rich-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 10px 0; display: block; }
.rich-content p { margin: 0 0 12px; }
.rich-content h1, .rich-content h2, .rich-content h3,
.rich-content h4, .rich-content h5, .rich-content h6 { margin: 20px 0 10px; font-weight: 700; }
.rich-content ul, .rich-content ol { margin: 10px 0; padding-left: 24px; }
.rich-content li { margin: 4px 0; }
.rich-content a { color: var(--primary); text-decoration: underline; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.rich-content th, .rich-content td { border: 1px solid #e5e7eb; padding: 8px 12px; text-align: left; }
.rich-content th { background: #f9fafb; font-weight: 600; }
.rich-content blockquote { border-left: 4px solid var(--primary); margin: 12px 0; padding: 10px 16px; background: #f9fafb; }
.rich-content pre { background: #f3f4f6; padding: 12px; border-radius: 6px; overflow-x: auto; }
.rich-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 3px; font-size: 13px; }
.rich-content figure { margin: 12px 0; }
.rich-content figcaption { font-size: 13px; color: #6b7280; text-align: center; margin-top: 4px; }

/* ---- 多封面图库 ---- */
.cover-gallery { margin-bottom: 20px; }
.cover-gallery img {
  width: 100%; max-width: 100%; height: auto;
  border-radius: 8px; margin-bottom: 12px; display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.cover-gallery img:last-child { margin-bottom: 0; }

/* ---- 浮动客服 ---- */
.float-sidebar {
  position: fixed; right: 12px; top: 50%;
  transform: translateY(-50%); z-index: 900;
  display: flex; flex-direction: column; gap: 4px;
}
.float-item {
  background: var(--primary); color: #fff; width: 50px;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0; border-radius: var(--radius); cursor: pointer;
  position: relative; transition: background .2s;
}
.float-item:hover { background: var(--primary-dark); }
.float-icon { font-size: 20px; }
.float-label { font-size: 11px; margin-top: 2px; }
.float-qr {
  display: none; position: absolute; right: 60px; top: 50%;
  transform: translateY(-50%); background: #fff; border-radius: 8px;
  padding: 14px; box-shadow: var(--shadow-lg); width: 170px; text-align: center;
}
.float-qr img { width: 140px; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.float-qr p { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.float-item:hover .float-qr { display: block; }

/* ---- 登录/注册页 ---- */
.auth-page { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-box { background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 420px; font-size: 15px; }
.auth-box h2 { text-align: center; margin-bottom: 28px; font-size: 24px; }
.auth-box .form-group label { font-size: 15px; }
.auth-box .form-control { font-size: 15px; }
.auth-box .auth-divider { font-size: 15px; }
.auth-box .form-hint { font-size: 15px; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 13px; margin: 18px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }

/* ---- 关于我们 ---- */
.about-qr-grid { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin: 30px 0; }
.qr-item { text-align: center; }
.qr-item img { width: 200px; height: auto; object-fit: contain; border-radius: 8px; box-shadow: var(--shadow); display: block; }
.qr-item p { margin-top: 10px; font-size: 14px; color: var(--text-muted); }

/* ---- 后台 ---- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: #1e2235; color: #fff; padding: 20px 0; }
.admin-sidebar .admin-logo { padding: 0 20px 20px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; color: rgba(255,255,255,.75); font-size: 16px;
  transition: all .2s; border-left: 3px solid transparent;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: rgba(255,255,255,.08); color: #fff; border-left-color: var(--accent);
}
.admin-main { background: var(--bg); padding: 24px; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; padding: 14px 24px; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 24px;
}

/* stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 700; }
.stat-card .trend { font-size: 12px; margin-top: 6px; }
.stat-card .trend.up { color: var(--success); }
.stat-card .trend.down { color: var(--danger); }

/* 数据大屏 */
.dashboard-page { background: #0f172a; min-height: 100vh; color: #e2e8f0; padding: 20px 24px; }
.dashboard-title { text-align: center; font-size: 28px; font-weight: 700; color: #60a5fa; margin-bottom: 24px; }

/* 大屏内容超过一屏时整体等比缩放（保持布局不变） */
.dashboard-scaler { width: 100%; }
@media (min-width: 1281px) {
  .dashboard-scaler { transform-origin: top center; }
}
@media (max-height: 820px) {
  .dashboard-page { padding: 12px 18px; }
  .dashboard-title { font-size: 22px; margin-bottom: 12px; }
}
@media (max-height: 720px) {
  .dashboard-page { padding: 8px 14px; }
  .dashboard-title { font-size: 18px; margin-bottom: 8px; }
  .db-card .db-value { font-size: 22px; }
  .db-card .db-label { font-size: 11px; margin-bottom: 4px; }
  .db-card .db-sub { font-size: 10px; }
  .db-card { padding: 10px 12px; }
  .db-grid { gap: 10px; margin-bottom: 12px; }
  .db-charts { gap: 10px; margin-bottom: 12px; }
  .db-chart-box { padding: 10px 12px; }
  .db-chart-title { font-size: 12px; margin-bottom: 6px; }
  .rank-list li { padding: 5px 0; }
  .rank-name { font-size: 12px; }
  .rank-count { font-size: 12px; }
  .dashboard-header { margin-bottom: 10px !important; }
  .dashboard-clock .clock-time { font-size: 13px; }
  .dashboard-clock .clock-label { font-size: 12px; }
  .dashboard-clock .clock-week { font-size: 12px; }
  canvas { max-height: 160px !important; }
}
@media (max-height: 600px) {
  .dashboard-page { padding: 6px 12px; }
  .dashboard-title { font-size: 16px; margin-bottom: 6px; }
  .db-card .db-value { font-size: 18px; }
  .db-card { padding: 8px; }
  .db-grid { gap: 8px; margin-bottom: 8px; }
  .db-charts { gap: 8px; margin-bottom: 8px; }
  .db-chart-box { padding: 8px 10px; }
  canvas { max-height: 120px !important; }
}

/* ---- 底部页脚 ---- */
.site-footer {
  background: #fff;
  color: var(--text-muted);
  padding: 12px 0 12px;
  margin-top: auto;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 15px;
}
.site-footer .footer-brand { margin-bottom: 22px; }
.site-footer .footer-brand h3 {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.site-footer .footer-brand p {
  font-size: 14px;
  color: #9ca3af;
  letter-spacing: 1px;
}
.site-footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 22px;
}
.site-footer .footer-links a {
  color: #d1d5db;
  font-size: 14px;
  transition: color .2s;
}
.site-footer .footer-links a:hover { color: #fff; }
.site-footer .footer-contact {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-bottom: 22px;
  font-size: 14px;
}
.site-footer .footer-contact span strong {
  color: #fff;
  font-weight: 500;
}
.site-footer .footer-bottom {
  border-top: none;
  padding-top: 0;
  font-size: 15px;
  line-height: 1.8;
}
.site-footer .footer-bottom p { color: var(--text-muted); }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .user-center-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .resource-layout { grid-template-columns: 1fr; }
  .category-sidebar { position: static; margin-bottom: 16px; }
}
@media (max-width: 768px) {
  .hero-banner h1 { font-size: 26px; }
  .header-inner { gap: 10px; }
  .menu-toggle { display: flex; margin-left: auto; flex-shrink: 0; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0;
    padding: 8px 16px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    border-bottom: 2px solid var(--primary);
    z-index: 1000;
  }
  .main-nav.open { display: flex; }
  .main-nav > a {
    padding: 12px 14px; border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }
  .main-nav > a:last-child { border-bottom: none; }
  .header-search { display: none; }
  .resource-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .site-footer { padding: 30px 16px 16px; }
  .site-footer .footer-links { gap: 8px 16px; }
  .site-footer .footer-contact { flex-direction: column; gap: 8px; }
}

/* ---- 加载动画 ---- */
.spinner {
  width: 36px; height: 36px; border: 4px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 消息提示 toast ---- */
#toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #1f2937; color: #fff; padding: 12px 20px;
  border-radius: 8px; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: slideIn .3s ease; max-width: 320px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---- 搜索页 ---- */
.search-result-header { padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.search-result-header h2 { font-size: 18px; }
.search-result-header span { color: var(--text-muted); font-size: 14px; }

/* ---- 定制开发页 ---- */
.custom-dev-intro { text-align: center; padding: 50px 20px; }
.custom-dev-intro h2 { font-size: 32px; font-weight: 800; margin-bottom: 16px; }
.custom-dev-intro p { font-size: 16px; color: var(--text-muted); max-width: 600px; margin: 0 auto 28px; }
