/* ===== ShareHub 自定义样式 ===== */

:root {
   /* === 主色 - 清新翠绿 === */
  --primary: #16a34a;
  --primary-light: #f0fdf4;
  --primary-dark: #14532d;
  --primary-200: #bbf7d0;
  --primary-300: #86efac;
  --primary-400: #4ade80;
  --primary-600: #15803d;
  /* === 辅助色 === */
  --accent: #0d9488;
  --accent-light: #f0fdfa;
  /* === 语义色 === */
  --success: #16a34a;
  --danger: #dc2626;
  --success-bg: #f0fdf4;
  --danger-bg: #fef2f2;
  --warning-bg: #fffbeb;
  /* === 中性/表面 === */
  --bg: #f2f4f2;
  --bg-alt: #f0f5f1;
  --card-bg: #fcfdfc;
  --surface-hover: #e8efe9;
  /* === 文字 === */
  --text: #1a231c;
  --text-secondary: #4a564c;
  --text-muted: #7d8a7f;
  /* === 边框 === */
  --border: #c8d4ca;
  --border-light: #e0e8e2;
  --border-strong: #8fa392;
  /* === 阴影 === */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}


/* ===== 基础 ===== */
html{
  scrollbar-width: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
  display: none;
}

body {
  background: linear-gradient(180deg, var(--bg) 0%, var(--primary-light) 100%);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ===== 动画关键帧 ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(50%) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(50%) scale(0.9); }
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181,100,59,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(181,100,59,0); }
}

/* ===== 页面级入场动画 ===== */
.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}
.animate-slide-up {
  animation: slideUp 0.5s ease forwards;
}
.animate-scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 资源卡片 staggered 入场 */
.resource-card {
  opacity: 0;
  animation: card-enter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ===== 自定义分页 ===== */
.mui-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 24px 0 32px;
  flex-wrap: wrap;
}

.mui-pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 2px solid transparent;
  background: var(--card-bg);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.mui-pagination button:hover:not(:disabled) {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-200);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.mui-pagination button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-400));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(181,100,59,0.35);
  font-weight: 600;
}

.mui-pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
  box-shadow: none;
}

/* ===== 资源网格 ===== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 16px 12px 0;
  padding-bottom: 24px;
}

/* ===== 资源卡片 ===== */
.resource-card {
  margin: 0;
  cursor: pointer;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--card-bg);
  position: relative;
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-400), var(--primary-200));
  opacity: 0;
  transition: opacity 0.35s;
}

.resource-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-200);
}

.resource-card:hover::before {
  opacity: 1;
}

.resource-card .mui-card-content-inner {
  padding: 20px 18px;
}

.resource-card .card-title {
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.resource-card .card-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.resource-card .card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.resource-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 2px;
}

/* ===== 类型标签 ===== */
.type-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 15px 0;
}

.type-tab {
  padding: 8px 22px;
  border: 2px solid transparent;
  background: var(--card-bg);
  border-radius: 100px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.type-tab:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary-200);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.type-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-400));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(181,100,59,0.35);
  font-weight: 600;
}

/* ===== 标签样式 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.02em;
  background: var(--bg-alt);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.tag-software {
  background: linear-gradient(135deg, var(--primary-light), #f8e6dd);
  color: var(--primary-dark);
}

.tag-game {
  background: linear-gradient(135deg, var(--danger-bg), #fcecea);
  color: var(--danger);
}

.tag-success {
  background: linear-gradient(135deg, var(--success-bg), #d4e8d9);
  color: var(--success);
}

.tag-danger {
  background: linear-gradient(135deg, var(--danger-bg), #fcecea);
  color: var(--danger);
}

.tag-warning {
  background: linear-gradient(135deg, var(--warning-bg), #fef3c7);
  color: #c27a2d;
}

/* ===== 搜索框 ===== */
.search-box {
  display: flex;
  gap: 10px;
  padding: 0;
  position: relative;
}

.search-box input {
  flex: 1;
  margin-bottom: 0 !important;
  border: 2px solid var(--border) !important;
  border-radius: 100px !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  background: var(--bg-alt) !important;
}

.search-box input:focus {
  outline: none;
}

.search-box .mui-btn {
  border-radius: 100px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.search-box .mui-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(181,100,59,0.25) !important;
}

.search-box .mui-btn:active {
  transform: scale(0.96);
}

/* ===== 搜索历史下拉 ===== */
.search-history-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card-bg, #fff);
  border-radius: var(--radius, 12px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  z-index: 1000;
  overflow: hidden;
  text-align: left;
  animation: historySlideIn 0.2s ease;
}

@keyframes historySlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.search-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 6px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.search-history-clear {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.search-history-clear:hover {
  color: var(--color-error, #b8453a);
  background: var(--color-error-bg, #fcecea);
}

.search-history-list {
  max-height: 240px;
  overflow-y: auto;
}

.search-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  color: var(--text-primary);
}

.search-history-item:hover {
  background: var(--surface-hover);
}

.search-history-item .history-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-history-item .history-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-history-item .history-delete {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0;
  background: none;
  border: none;
  line-height: 1;
}

.search-history-item:hover .history-delete {
  opacity: 1;
}

.search-history-item .history-delete:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
}
/* 修复分类筛选卡片 overflow: hidden 裁剪下拉菜单，同时用 flow-root 保持 BFC 维持间距 */
#filter-card {
  overflow: visible !important;
  display: flow-root;
}

.custom-select {
  position: relative;
  min-width: 120px;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: 100px;
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, background 0.25s ease;
  gap: 8px;
}

.custom-select-trigger:hover {
  border-color: var(--primary-200);
  background: var(--primary-light);
}

.custom-select.open {
  z-index: 999;
}

.custom-select.open .custom-select-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(181,100,59,0.12);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  max-height: 220px;
  overflow-y: auto;
  z-index: 999;
  display: none;
  animation: slideDown 0.2s ease;
}

.custom-select.open .custom-select-dropdown {
  display: block;
}

.custom-select-option {
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  font-weight: 500;
}

.custom-select-option:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.custom-select-option.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* ===== 详情页 ===== */
.detail-meta {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.detail-desc {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
  white-space: pre-wrap;
  font-size: 14px;
}

.detail-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ===== 链接项 ===== */
.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--bg), var(--bg-alt));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, background 0.3s ease;
}

.link-item:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
  background: var(--card-bg);
  transform: translateX(2px);
}

.link-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.link-url {
  flex: 1;
  min-width: 180px;
  font-size: 13px;
  color: var(--primary);
  word-break: break-all;
  text-decoration: none;
  transition: color 0.15s;
  font-weight: 500;
}

.link-url:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== 评论 ===== */
.comment-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.comment-item:hover {
  background: rgba(181,100,59,0.03);
}

.comment-item:last-child {
  border-bottom: none;
}

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

.comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.comment-time {
  font-size: 12px;
  color: var(--text-muted);
}

.comment-content {
  color: var(--text);
  line-height: 1.7;
  font-size: 14px;
}

/* ===== 消息卡片 ===== */
.message-card {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.message-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.message-card.unread {
  background: linear-gradient(135deg, var(--primary-light), #f8e6dd);
  border-left: 4px solid var(--primary);
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.message-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.unread-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(181,100,59,0.2);
  animation: badge-pulse 2s infinite;
}

.message-request-info {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.message-reply {
  margin-bottom: 10px;
}

.message-reply-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.message-reply-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 管理后台 ===== */
.admin-layout {
  display: flex;
  gap: 22px;
  padding: 18px;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  height: fit-content;
  position: sticky;
  top: 66px;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease, color 0.25s ease;
  text-decoration: none;
}

.admin-sidebar a:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(2px);
}

.admin-sidebar a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-400));
  color: #fff;
  box-shadow: 0 4px 14px rgba(181,100,59,0.3);
  font-weight: 600;
}

.admin-sidebar a .mui-icon {
  font-size: 18px;
}

.admin-content {
  flex: 1;
  min-width: 0;
}

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease;
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary-light);
  opacity: 0;
  transition: all 0.5s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--primary-200);
}

.stat-card:hover::after {
  opacity: 0.5;
  transform: scale(1.5);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.stat-card .mui-icon {
  color: var(--primary);
  font-size: 18px;
  margin-right: 4px;
}

/* ===== 表格 ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.data-table th {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-alt);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tr:hover td {
  background: var(--surface-hover);
}

.data-table .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== 平台复选框 ===== */
.platform-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
}

.platform-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.platform-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.link-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-input-group {
  margin-bottom: 0 !important;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.link-input-group.collapsed {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-width: 0 !important;
  opacity: 0;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
  animation: fadeIn 0.6s ease;
}

.empty-state-icon {
  font-size: 56px;
  margin-bottom: 20px;
  color: var(--primary-200);
  opacity: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary-light), #f8e6dd);
  border-radius: 50%;
  margin-bottom: 20px;
}

.empty-state-icon .mui-icon {
  font-size: 40px;
  color: var(--primary);
  opacity: 0.5;
}

.empty-state p {
  font-size: 15px;
  margin: 0;
  font-weight: 500;
  color: var(--text-secondary);
}

.empty-state p + p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ===== 页脚 ===== */
.mui-footer {
  text-align: center;
  padding: 28px 24px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: var(--card-bg);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    gap: 2px;
    padding: 6px;
    border-radius: var(--radius);
    position: static;
  }
  .admin-sidebar a {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 12px;
    flex-shrink: 0;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat-value {
    font-size: 24px;
  }
  .data-table {
    display: table;
    width: 100%;
    min-width: 500px;
    table-layout: auto;
  }
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .resource-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .link-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .link-url {
    min-width: auto;
    width: 100%;
  }
  /* 移动端 sticky footer */
  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .mui-content {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .type-tabs {
    gap: 6px;
  }
  .type-tab {
    padding: 6px 14px;
    font-size: 12px;
  }
  .nav-user-info {
    display: none !important;
  }
  .nav-request-link,
  .nav-publish-link,
  .nav-profile-link,
  .nav-admin-link {
    display: none !important;
  }
  .nav-hamburger {
    display: flex !important;
  }
  .mui-title {
    display: none !important;
  }
  .mui-pagination {
    gap: 4px;
  }
  .mui-pagination button {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }
  .search-box .mui-btn {
    padding: 10px 14px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 380px) {
}

/* ===== 隐藏 ===== */
.hidden {
  display: none !important;
}

/* ===== 通用工具 ===== */
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }

/* ===== 导航栏 ===== */
.mui-bar-nav {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  background: rgba(255,255,255,0.96) !important;
  transition: box-shadow 0.3s ease;
  overflow: visible !important;
}

.nav-user-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== 汉堡菜单按钮 ===== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  position: relative;
  z-index: 1001;
}
.nav-hamburger:hover {
  background: rgba(0,0,0,0.05);
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== 移动端下拉菜单 ===== */
.nav-mobile-menu {
  position: absolute;
  top: 44px;
  right: 0;
  width: 200px;
  background: var(--card-bg);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideDown 0.25s ease;
  overflow: hidden;
}
.nav-mobile-menu .nav-menu-item {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.nav-mobile-menu .nav-menu-item:last-child {
  border-bottom: none;
}
.nav-mobile-menu .nav-menu-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.nav-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.nav-menu-userinfo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mui-bar-nav.scrolled {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

.mui-bar .mui-title {
  font-weight: 650 !important;
  letter-spacing: -0.01em;
  color: var(--text) !important;
  text-align: center !important;
}

.mui-content {
  background: transparent !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ===== 徽章 ===== */
.mui-badge-warning {
  background: linear-gradient(135deg, var(--accent), #fbbf24) !important;
}

.mui-badge-danger {
  background: linear-gradient(135deg, var(--danger), #f87171) !important;
  animation: badge-pulse 2s infinite;
}

/* ===== 加载动画 ===== */
.mui-spinner {
  border-color: var(--primary) !important;
  border-top-color: transparent !important;
}

/* ===== Shimmer 骨架屏 ===== */
.shimmer {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--bg) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

.shimmer-card {
  height: 160px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

/* ===== Toast 通知系统 ===== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-xl);
  min-width: 240px;
  max-width: 360px;
  animation: toast-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
}

.toast.toast-out {
  animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-success {
  background: linear-gradient(135deg, rgba(74,124,89,0.95), rgba(60,100,72,0.95));
}

.toast-error {
  background: linear-gradient(135deg, rgba(184,69,58,0.95), rgba(150,55,45,0.95));
}

.toast-info {
  background: linear-gradient(135deg, rgba(181,100,59,0.95), rgba(126,61,35,0.95));
}

.toast-warning {
  background: linear-gradient(135deg, rgba(194,122,45,0.95), rgba(160,100,35,0.95));
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* ===== 玻璃拟态卡片 ===== */
.glass-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

/* ===== Hero 区域增强 ===== */
.mui-card.hero-section {
  position: relative;
  /* 允许 overflow，让搜索历史下拉框（search-history-dropdown）
     可以超出本卡片显示而不被裁剪；背景图圆角由 .hero-bg-layer 自己控制 */
  overflow: visible;
  background: #fff;
  border: none !important;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('/images/shouye.webp') center / cover no-repeat;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-bg-loaded .hero-bg-layer {
  opacity: 1;
}

.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  pointer-events: none;
}

.hero-section::before {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
  top: -120px;
  right: -80px;
}

.hero-section::after {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
  bottom: -70px;
  left: -50px;
}

/* ===== 浮动操作按钮 ===== */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-400));
  color: #fff;
  border: none;
  box-shadow: 0 6px 20px rgba(181,100,59,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 28px rgba(181,100,59,0.5);
}

.fab:active {
  transform: scale(0.95);
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--primary);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ===== 结果统计 ===== */
.result-stats {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-stats::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* ===== 链接通用样式 ===== */
a {
  color: var(--primary);
  transition: color 0.15s;
}

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

/* ===== MUI 卡片微调 ===== */
.mui-card {
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  overflow: hidden;
  background: rgba(252, 253, 252, 0.85);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.mui-card:hover {
  transform: translateY(-2px);
}

.mui-card.hero-section:hover,
#filter-card:hover {
  transform: none;
}

.mui-card-header {
  color: var(--text) !important;
  font-weight: 650 !important;
  font-size: 15px !important;
}

/* ===== MUI 按钮微调 ===== */
.mui-btn {
  border-radius: var(--radius) !important;
  font-weight: 500 !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mui-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.mui-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.mui-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-400)) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(181,100,59,0.25) !important;
}

.mui-btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(181,100,59,0.35) !important;
}

.mui-btn-primary:active {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
  box-shadow: 0 2px 6px rgba(181,100,59,0.2) !important;
}

.mui-btn-danger {
  border-radius: var(--radius) !important;
}

.mui-btn-outlined {
  border: 2px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text-secondary) !important;
  background: var(--card-bg) !important;
}

.mui-btn-outlined:hover:not(:disabled) {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: var(--primary-light) !important;
}

/* ===== 输入框微调 ===== */
.mui-input-group {
  border-radius: var(--radius) !important;
  overflow: hidden;
}

.mui-input-group .mui-input-row {
  transition: background 0.2s ease;
}

.mui-input-group .mui-input-row:hover {
  background: rgba(181,100,59,0.03);
}

.mui-input-group input,
.mui-input-group textarea,
.mui-input-group select {
  font-size: 14px !important;
  padding: 11px 15px !important;
  transition: all 0.25s ease;
}

.mui-input-group input:focus,
.mui-input-group textarea:focus,
.mui-input-group select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(181,100,59,0.1) !important;
}

/* 输入框聚焦时的 label 高亮 */
.mui-input-group .mui-input-row:focus-within label {
  color: var(--primary) !important;
}

/* ===== 编辑模态框 ===== */
.edit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.25s ease;
  padding: 20px;
}

/* 大屏全屏模糊会明显掉帧，仅在中小屏启用 */
@media (max-width: 1024px) {
  .edit-modal-overlay {
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

.edit-modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  width: 92%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
  animation: scaleIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg), transparent);
}

.edit-modal-header h3 {
  font-size: 17px;
  font-weight: 650;
  margin: 0;
  color: var(--text);
}

.edit-modal-close {
  background: var(--bg-alt);
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.edit-modal-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
  transform: rotate(90deg);
}

.edit-modal-body {
  padding: 24px;
}

/* ===== 评论表单 ===== */
#comment-form textarea {
  border-radius: var(--radius) !important;
  border: 2px solid var(--border) !important;
  transition: all 0.25s ease;
  resize: vertical;
  min-height: 80px;
}

#comment-form textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(181,100,59,0.1) !important;
  outline: none;
}

/* ===== 状态指示器 ===== */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(74,124,89,0.3);
  animation: badge-pulse 2s infinite;
}

.status-dot.offline {
  background: var(--text-muted);
}

/* ===== 分割线装饰 ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  margin: 16px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ===== 选中效果 ===== */
::selection {
  background: rgba(181,100,59,0.2);
  color: var(--primary-dark);
}

/* ===== 打印优化 ===== */
/* ===== 桌面端布局优化（仅 >= 769px，手机端样式不变） ===== */
@media (min-width: 769px) {
  .mui-content {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
  }


  .resource-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
  }
}

/* ===== 导航栏激活状态 ===== */
.nav-link-active {
  color: var(--primary) !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
}

/* ================================================================
   登录/注册模态框（内联版 · 双栏卡片）
   ================================================================ */

/* 遮罩层 */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* 把弹窗的布局影响限制在自身，避免整页重排 */
  contain: layout style;
  overscroll-behavior: contain;
}

.auth-modal-overlay.visible {
  display: flex !important;
}

/* 半透明背景：默认纯色（大屏全屏高斯模糊开销与视口面积成正比，会明显掉帧） */
.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 13, 0.58);
  animation: authBackdropIn 0.22s ease;
}

/* 仅在中小屏保留毛玻璃：像素量小，能承受 */
@media (max-width: 1024px) {
  .auth-modal-backdrop {
    background: rgba(9, 20, 13, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

@keyframes authBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 对话框容器 */
.auth-modal-dialog {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 780px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow:
    0 32px 72px -16px rgba(6, 32, 16, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: authDialogIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 入场动画只跑一次，之后释放合成层，避免长期占用显存 */
.auth-modal-dialog.is-settled {
  animation: none;
}

@keyframes authDialogIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ================================================================
   左侧品牌区
   ================================================================ */
.auth-aside {
  position: relative;
  flex: 0 0 42%;
  padding: 38px 34px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: #fff;
  /* AI 生成背景图 + 暗化遮罩保证文字可读；最后的渐变作为图片加载前的兜底 */
  background:
    linear-gradient(172deg, rgba(6, 28, 15, 0.5) 0%, rgba(6, 28, 15, 0.18) 42%, rgba(3, 18, 10, 0.78) 100%),
    url('/images/auth-side.webp') center / cover no-repeat,
    linear-gradient(160deg, #0a3a1e 0%, #14532d 42%, #15803d 100%);
}

.auth-aside-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-aside-glow-a {
  width: 280px;
  height: 280px;
  top: -110px;
  right: -110px;
  background: radial-gradient(circle, rgba(190, 242, 200, 0.32) 0%, transparent 68%);
}

.auth-aside-glow-b {
  width: 200px;
  height: 200px;
  bottom: -90px;
  left: -70px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
}

.auth-aside-inner {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.auth-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  color: #0a3a1e;
  background: linear-gradient(140deg, #d9f99d 0%, #4ade80 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.auth-brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-aside-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-aside-desc {
  margin: 0 0 26px;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.auth-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-perks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.auth-perks .mui-icon {
  font-size: 12px;
  color: #86efac;
}

/* ================================================================
   右侧表单区
   ================================================================ */
.auth-main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  padding: 40px 38px 32px;
  background: var(--card-bg);
}

/* 关闭按钮 */
.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.auth-modal-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* 面板头部 */
.auth-panel .auth-header {
  padding: 0 0 22px;
  text-align: left;
}

.auth-panel .auth-header::before,
.auth-panel .auth-header::after {
  content: none;
}

.auth-panel .auth-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-panel .auth-header p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ================================================================
   面板主体（表单区域）
   ================================================================ */
.auth-panel .auth-body {
  padding: 0;
  background: transparent;
}

/* 输入框：由 .auth-field 提供唯一边框，内部 input 完全透明无背景 */
.auth-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: transparent;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.auth-field:hover {
  border-color: var(--border);
}

.auth-field:focus-within {
  border-color: var(--primary);
}

.auth-field-icon {
  flex: 0 0 auto;
  margin-right: 10px;
  font-size: 16px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.auth-field:focus-within .auth-field-icon {
  color: var(--primary);
}

.auth-field input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
  font-size: 14px !important;
  line-height: normal;
  color: var(--text);
}

.auth-field input::placeholder {
  color: #9daa9f;
}

.auth-field input:focus {
  outline: none;
  box-shadow: none !important;
}

/* 浏览器自动填充：不让它产生可见背景块 */
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-shadow: 0 0 0 100px var(--card-bg) inset !important;
  caret-color: var(--text);
  transition: background-color 99999s ease-in-out 0s;
}

/* 密码可见切换 */
.auth-eye {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.auth-eye .mui-icon {
  font-size: 16px;
  color: var(--text-muted);
  transition: color 0.18s ease, opacity 0.18s ease;
}

.auth-eye:not(.is-visible) .mui-icon {
  opacity: 0.55;
}

.auth-eye:hover {
  background: var(--primary-light);
}

.auth-eye:hover .mui-icon,
.auth-eye.is-visible .mui-icon {
  color: var(--primary);
  opacity: 1;
}

/* 提交按钮 */
.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
  box-shadow: 0 10px 22px -10px rgba(22, 163, 74, 0.85);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(22, 163, 74, 0.95);
  filter: saturate(1.08);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 6px 14px -8px rgba(22, 163, 74, 0.9);
}

.auth-submit:disabled {
  opacity: 0.72;
  cursor: default;
  box-shadow: none;
}

/* 切换链接区域 */
.auth-panel .auth-switch {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-panel .auth-switch p {
  margin: 0;
}

.auth-panel .auth-switch a {
  margin-left: 4px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s ease;
}

.auth-panel .auth-switch a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== 移动端：单栏 ===== */
@media (max-width: 719px) {
  .auth-aside {
    display: none;
  }

  .auth-modal-dialog {
    max-width: 400px;
    border-radius: 18px;
  }

  .auth-main {
    padding: 32px 22px 24px;
  }

  .auth-panel .auth-header {
    padding-bottom: 18px;
  }

  .auth-panel .auth-header h2 {
    font-size: 20px;
  }

  .auth-modal-close {
    top: 10px;
    right: 10px;
  }
}

/* ===== 移动端：消除 hover 导致的点击延迟 ===== */
@media (hover: none) and (pointer: coarse) {
  .mui-pagination button:hover:not(:disabled) {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  .resource-card:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--border);
  }
  .resource-card:hover::before {
    opacity: 0;
  }
  .type-tab:hover {
    color: var(--text-secondary);
    background: var(--card-bg);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    transform: none;
  }
  .search-box .mui-btn:hover {
    transform: none;
    box-shadow: none !important;
  }
  .search-history-clear:hover {
    color: var(--text-tertiary, #999);
    background: none;
  }
  .search-history-item:hover {
    background: transparent;
  }
  .search-history-item:hover .history-delete {
    opacity: 0;
  }
  .search-history-item .history-delete:hover {
    color: var(--text-muted);
  }
  .custom-select-trigger:hover {
    border-color: var(--border);
    background: var(--card-bg);
  }
  .custom-select-option:hover {
    background: transparent;
  }
  .link-item:hover {
    border-color: var(--border);
    box-shadow: none;
    background: linear-gradient(135deg, var(--bg), var(--bg-alt));
    transform: none;
  }
  .link-url:hover {
    color: var(--primary);
  }
  .comment-item:hover {
    background: transparent;
  }
  .message-card:hover {
    box-shadow: none;
    transform: none;
  }
  .admin-sidebar a:hover {
    background: transparent;
    color: var(--text-secondary);
    transform: none;
  }
  .stat-card:hover {
    box-shadow: var(--shadow);
    transform: none;
    border-color: var(--border);
  }
  .stat-card:hover::after {
    opacity: 0;
    transform: none;
  }
  .data-table tr:hover td {
    background: transparent;
  }
  .nav-hamburger:hover {
    background: transparent;
  }
  .nav-mobile-menu .nav-menu-item:hover {
    background: var(--primary-light);
    color: var(--primary);
  }
  .fab:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(181,100,59,0.4);
  }
  .back-to-top:hover {
    transform: none;
    background: var(--card-bg);
  }
  a:hover {
    color: var(--primary);
  }
  .mui-card:hover {
    box-shadow: var(--shadow) !important;
  }
  .mui-btn:hover:not(:disabled) {
    transform: none;
  }
  .mui-btn-primary:hover:not(:disabled) {
    box-shadow: 0 2px 8px rgba(181,100,59,0.25) !important;
  }
  .mui-btn-outlined:hover:not(:disabled) {
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
    background: var(--card-bg) !important;
  }
  .mui-input-group .mui-input-row:hover {
    background: transparent;
  }
  .edit-modal-close:hover {
    background: var(--bg-alt);
    color: var(--text-muted);
    transform: none;
  }
  .auth-modal-close:hover {
    background: transparent;
    color: var(--text-muted);
  }
  .auth-field:hover {
    border-color: var(--border-light);
  }
  .auth-submit:hover:not(:disabled) {
    transform: none;
    box-shadow: 0 10px 22px -10px rgba(22, 163, 74, 0.85);
  }
  .auth-eye:hover {
    background: transparent;
  }
}