/* ============================================================
   智造资源导航 - 样式表
   适配 PC + Mobile H5
   ============================================================ */

/* ===== 变量 ===== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-card-hover: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --text-primary: #1a1a1a;
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-tertiary: rgba(0, 0, 0, 0.4);
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-purple: #a855f7;
  --accent-red: #ef4444;
  --gradient-1: linear-gradient(90deg, #3b82f6, #10b981);
  --gradient-2: linear-gradient(90deg, #10b981, #a855f7);
  --gradient-3: linear-gradient(90deg, #a855f7, #ef4444);
  --gradient-4: linear-gradient(90deg, #3b82f6, #a855f7, #ef4444);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 40px rgba(59, 130, 246, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.07) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-2 {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-3 {
  background: var(--gradient-3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-4 {
  background: var(--gradient-4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 顶部导航 ===== */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 39, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-left { flex-shrink: 0; }
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; }
.nav-logo .logo-mark {
  font-size: 24px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-logo .logo-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-logo .logo-tld {
  color: var(--text-tertiary);
  -webkit-text-fill-color: var(--text-tertiary);
  font-weight: 500;
  font-size: 16px;
}

/* 左侧导航菜单 - 与主站一致 */
.nav-main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-main-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}
.nav-main-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-main-link.active { color: #5ef2c6; }
.nav-main-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gradient-1);
  border-radius: 1px;
}

/* 动态导航菜单（nav-menu.js 加载的链接） */
.nav-main-nav .nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}
.nav-main-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-main-nav .nav-link.active { color: #5ef2c6; }
.nav-main-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gradient-1);
  border-radius: 1px;
}
.nav-main-nav .nav-dropdown {
  background: rgba(13, 20, 48, .95);
}

/* 迷你搜索框 */
.nav-search-mini {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 2px 4px 2px 14px;
  transition: all 0.3s;
}
.nav-search-mini:focus-within {
  border-color: rgba(94,242,198,0.5);
  box-shadow: 0 0 0 3px rgba(94,242,198,0.12);
}
.nav-search-mini input {
  width: 130px;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  padding: 6px 0;
}
.nav-search-mini input::placeholder { color: rgba(255,255,255,0.4); }
.nav-search-go {
  padding: 6px 10px;
  background: var(--gradient-1);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  transition: all 0.3s;
}
.nav-search-go:hover { opacity: 0.9; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-btn-icon {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  color: #fff;
  border: 1px solid #52c41a;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s;
}
.nav-btn-icon:hover { background: rgba(82, 196, 26, 0.1); border-color: #73d13d; color: #95de64; }

.nav-btn-login {
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-strong);
  font-size: 13px;
  transition: all 0.3s;
}
.nav-btn-login:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

.nav-btn-register {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--gradient-1);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s;
}
.nav-btn-register:hover { opacity: 0.9; transform: translateY(-1px); }

/* 用户菜单 */
.user-menu { position: relative; }
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid var(--border-strong);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 100;
}
.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-info {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.user-info strong { display: block; font-size: 14px; margin-bottom: 2px; }
.user-email { font-size: 12px; color: var(--text-tertiary); }
.user-link {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.user-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.user-logout { color: var(--accent-red); }
.user-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}

/* ===== Banner ===== */
.banner-section {
  max-width: 1400px;
  margin: 20px auto 0;
  padding: 0 24px;
  position: relative;
}
.banner-slider {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.banner-slide {
  min-width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.banner-slide img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}
.banner-default {
  height: 280px;
  background: linear-gradient(135deg, #1e3a5f 0%, #0d5c4a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.banner-default h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #fff, #a0f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.banner-default p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}
.banner-btn {
  padding: 10px 28px;
  background: var(--gradient-1);
  border-radius: 999px;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
}
.banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}
.banner-dot.active {
  width: 24px;
  border-radius: 4px;
  background: #fff;
}

/* ===== 统计区 ===== */
.stats-section {
  max-width: 1400px;
  margin: 28px auto 0;
  padding: 0 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  transition: all 0.3s;
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.stat-num {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== 主布局 ===== */
.main-container {
  max-width: 1400px;
  margin: 28px auto 0;
  padding: 0 24px 60px;
}
.main-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
}
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.cat-item a:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.cat-item.active a {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.1));
  color: var(--text-primary);
  font-weight: 500;
}
.cat-icon { font-size: 16px; }
.cat-name { flex: 1; }
.cat-count {
  font-size: 11px;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 10px;
}

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.tag-item:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.tag-size-1 { font-size: 11px; }
.tag-size-2 { font-size: 12px; }
.tag-size-3 { font-size: 13px; }
.tag-size-4 { font-size: 14px; font-weight: 500; }
.tag-size-5 { font-size: 15px; font-weight: 600; }

/* ===== 内容区 ===== */
.content-area { flex: 1; min-width: 0; }

/* 排序栏 */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.sort-left { display: flex; align-items: center; gap: 4px; }
.sort-label { font-size: 13px; color: var(--text-tertiary); margin-right: 8px; }
.sort-item {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.sort-item:hover { color: var(--text-primary); }
.sort-item.active {
  background: var(--gradient-1);
  color: #fff;
  font-weight: 500;
}
.search-result-tip { font-size: 13px; color: var(--text-tertiary); }
.search-result-tip strong { color: var(--accent-blue); }

/* 区块标题 */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  margin-top: 28px;
}
.section-title { font-size: 18px; font-weight: 600; }
.section-sub { font-size: 12px; color: var(--text-tertiary); }

/* 推荐区 */
.recommend-section { margin-bottom: 8px; }
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.rec-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.rec-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.rec-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.rec-icon img { width: 24px; height: 24px; border-radius: 4px; }
.rec-info { flex: 1; min-width: 0; }
.rec-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-badge {
  position: absolute;
  top: 8px;
  right: -22px;
  background: var(--gradient-3);
  color: #fff;
  font-size: 10px;
  padding: 2px 24px;
  transform: rotate(45deg);
  font-weight: 500;
}

/* ===== 链接卡片网格 ===== */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  animation: fadeInUp 0.5s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.link-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  animation: cardEnter 0.4s ease both;
}
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.link-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  background: var(--bg-card-hover);
}

.link-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.link-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.link-icon img { width: 28px; height: 28px; border-radius: 4px; }
.link-info { flex: 1; min-width: 0; }
.link-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-domain {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-btn {
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
  padding: 4px;
  background: none;
  border: none;
}
.fav-btn:hover { transform: scale(1.2); }
.fav-btn.faved { color: #ef4444; }

.link-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}
.link-foot {
  display: flex;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.link-stat {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* 加载状态 */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-tertiary);
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-tertiary);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* 骨架卡片 */
.skeleton-card { pointer-events: none; }
.sk-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-card-hover);
  animation: skPulse 1.4s ease-in-out infinite;
}
.sk-line {
  height: 12px;
  border-radius: 6px;
  background: var(--bg-card-hover);
  margin-bottom: 8px;
  animation: skPulse 1.4s ease-in-out infinite;
}
@keyframes skPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}


.load-more-wrap { text-align: center; margin-top: 32px; }
.load-more-btn {
  padding: 12px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.3s;
}
.load-more-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.load-more-btn:disabled { cursor: not-allowed; }

/* ===== 页脚 ===== */
.nav-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: rgba(0, 0, 0, 0.2);
}
.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}
.footer-left { max-width: 320px; }
.footer-logo { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.footer-desc { font-size: 13px; color: var(--text-tertiary); line-height: 1.6; }
.footer-right { display: flex; gap: 60px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h5 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.footer-col a {
  font-size: 13px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent-blue); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.show { display: flex; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 36px 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: center;
}
.modal-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.form-item input,
.form-item select,
.form-item textarea {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  width: 100%;
}
.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-item textarea { resize: vertical; min-height: 70px; }
.modal-btn {
  margin-top: 6px;
  padding: 12px;
  background: var(--gradient-1);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}
.modal-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.modal-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.modal-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}
.modal-link {
  color: var(--accent-blue);
  font-weight: 500;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: linear-gradient(135deg, #f97316, #ea580c);
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4);
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .sidebar { width: 200px; }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
  .recommend-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-main-nav { display: none; }
  .mobile-nav-toggle { display: flex !important; }
}

/* Mobile Nav Panel (nav page) */
.mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-primary, #fff);
  flex-shrink: 0;
  transition: all .2s;
}
.mobile-nav-toggle:hover { background: rgba(255,255,255,.1); }
.mobile-nav-toggle.active { background: var(--accent, #3b82f6); color: #fff; }

@media (max-width: 768px) {
  .nav-container { padding: 0 16px; height: 56px; gap: 12px; justify-content: space-between; }
  .nav-search-mini { display: none; }
  .nav-right { gap: 8px; }
  .nav-logo .logo-text { display: block; }
  .nav-logo .logo-tld { display: inline; }

  .banner-section { padding: 0 16px; margin-top: 12px; }
  .banner-slide img, .banner-default { height: 160px; }
  .banner-default { justify-content: flex-start; padding-top: 50px; }
  .banner-default h2 { font-size: 20px; margin-bottom: 6px; }
  .banner-default p { font-size: 13px; margin-bottom: 10px; }

  .stats-section { padding: 0 16px; margin-top: 16px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stat-card { padding: 12px 8px; border-radius: 12px; }
  .stat-num { font-size: 18px; }
  .stat-label { font-size: 11px; }

  .main-container { padding: 0 0 40px 16px; margin-top: 16px; }
  .main-layout { flex-direction: column; gap: 16px; }

  .sidebar {
    width: 100%;
    position: static;
    order: 2;
  }
  .cat-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .cat-item a {
    padding: 6px 10px;
    font-size: 12px;
  }
  .cat-count { display: none; }
  .sidebar-card { margin-bottom: 12px; }

  .content-area { order: 1; }
  .sort-bar { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
  .link-grid { grid-template-columns: 1fr; gap: 10px; }
  .link-card { padding: 12px; }
  .link-icon { width: 36px; height: 36px; border-radius: 10px; }
  .link-icon img { width: 22px; height: 22px; }
  .link-title { font-size: 13px; }
  .link-desc { font-size: 12px; -webkit-line-clamp: 2; min-height: 34px; }
  .link-foot { gap: 10px; padding-top: 8px; }

  .recommend-grid { grid-template-columns: 1fr; gap: 8px; }
  .rec-card { padding: 10px; gap: 8px; }
  .rec-icon { width: 32px; height: 32px; border-radius: 8px; }
  .rec-title { font-size: 12px; }
  .rec-desc { display: none; }

  .section-header { margin-top: 20px; margin-bottom: 12px; }
  .section-title { font-size: 16px; }

  .footer-container { flex-direction: column; gap: 24px; padding: 28px 16px; }
  .footer-right { gap: 30px; flex-wrap: wrap; }

  .modal-box { padding: 28px 20px 20px; }
  .modal-title { font-size: 18px; }

  .banner-dots { bottom: 10px; }
  .banner-dot { width: 6px; height: 6px; }
  .banner-dot.active { width: 18px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .link-grid { grid-template-columns: 1fr; }
  .recommend-grid { grid-template-columns: 1fr; }
  .nav-btn-login, .nav-btn-register { padding: 6px 12px; font-size: 12px; }
}
