/* ========== 全局重置与滚动条 ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(136, 136, 136, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(85, 85, 85, 0.7);
}

body.dark ::-webkit-scrollbar-thumb {
  background: rgba(200, 200, 200, 0.4);
}

body.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 220, 220, 0.6);
}

/* ========== 登录页专用样式 ========== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(120deg, #e0e7ff 0%, #f8fafc 100%);
  transition: background 0.3s;
  font-family: 'Inter', sans-serif;
}

.login-body.dark {
  background: linear-gradient(120deg, #1e293b 0%, #0f172a 100%);
}

.login-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
  transition: background 0.3s, border-color 0.3s;
}

.dark .login-card {
  background: rgba(30, 32, 40, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
}

.login-card h3 {
  font-weight: 500;
  font-size: 1.8rem;
  margin-bottom: 28px;
  color: #1e1f2a;
}

.dark .login-card h3 {
  color: #f0f4ff;
}

.login-card .form-group {
  margin-bottom: 24px;
}

.login-card label {
  font-weight: 500;
  color: #3d506e;
  display: block;
  margin-bottom: 8px;
}

.dark .login-card label {
  color: #b0c2e0;
}

.login-card input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #e2e8f2;
  border-radius: 12px;
  background: #fbfdff;
  font-size: 1rem;
  transition: 0.2s;
}

.login-card input:focus {
  outline: none;
  border-color: #6366f1;
  background: white;
}

.dark .login-card input {
  background: #272e3f;
  border-color: #475873;
  color: #e0e4f0;
}

.login-card .actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.login-card .btn,
.login-card .btn-primary {
  margin-right: 10px;
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  border-radius: 8px;
  padding: 6px 16px;
  background: #e0e7ff;
  transition: background 0.2s, color 0.2s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-card .btn-primary {
  background: #6366f1;
  color: white;
}

.login-card .btn:hover {
  background: #c7d2fe;
  color: #4f46e5;
}

.login-card .btn-primary:hover {
  background: #4f46e5;
}

.dark .login-card .btn,
.dark .login-card .btn-primary {
  background: #2d3445;
  color: #e0e4f0;
}

.dark .login-card .btn-primary {
  background: #6366f1;
  color: white;
}

.dark .login-card .btn:hover {
  background: #3f4a60;
}

.login-card .error {
  color: #c25a4a;
  margin-top: 8px;
  font-size: 0.85rem;
}

@media (max-width: 480px) {
      /* 标题栏整体强制不换行 */
  .panel > div:first-child {
    flex-wrap: nowrap !important;
    gap: 6px;
    align-items: center;
  }

  /* 标题适度缩小 */
  .panel h2 {
    font-size: 1.1rem !important;
    flex-shrink: 1;
    white-space: nowrap;
  }
  .panel h2 span {
    font-size: 1.2rem;
  }

  /* 下拉框进一步缩小 */
  .filter-select {
    font-size: 11px !important;
    padding: 4px 6px !important;
    max-width: 90px;
    min-width: auto !important;
  }

  /* 按钮组不换行 */
  .panel > div:first-child > div:last-child {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
  }

  /* 按钮缩小 */
  .btn {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    gap: 3px;
  }
  .btn span {
    font-size: 0.9rem;
  }
  .login-card {
    padding: 24px 20px;
  }

  .login-card .btn,
  .login-card .btn-primary {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* ========== 前台 / 后台通用样式 ========== */
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(120deg, #e0e7ff 0%, #f8fafc 100%);
  background-attachment: fixed;
  color: #1e1f2a;
  padding: 0 0 40px;
  min-height: 100vh;
  line-height: 1.5;
  transition: background 0.3s, color 0.3s;
  position: relative;
  z-index: 0;
}

body.dark {
  background: linear-gradient(120deg, #1e293b 0%, #0f172a 100%);
  color: #e0e4f0;
}

/* --- 模糊背景球 --- */
.bg-blur {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s, filter 0.3s;
}

.bg-blur1 {
  top: -120px;
  left: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 30% 30%, #a5b4fc 0%, #6366f1 80%, transparent 100%);
  filter: blur(80px) opacity(0.55);
}

.bg-blur2 {
  bottom: -100px;
  right: -100px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 70% 70%, #fca5a5 0%, #f87171 80%, transparent 100%);
  filter: blur(80px) opacity(0.45);
}

.bg-blur3 {
  top: 40%;
  left: 50%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 50% 50%, #fde68a 0%, #f59e0b 80%, transparent 100%);
  filter: blur(70px) opacity(0.4);
  transform: translate(-50%, -50%);
}

body.dark .bg-blur1 {
  background: radial-gradient(circle at 30% 30%, #818cf8 0%, #4f46e5 80%, transparent 100%);
  filter: blur(80px) opacity(0.35);
}

body.dark .bg-blur2 {
  background: radial-gradient(circle at 70% 70%, #f87171 0%, #dc2626 80%, transparent 100%);
  filter: blur(80px) opacity(0.3);
}

body.dark .bg-blur3 {
  background: radial-gradient(circle at 50% 50%, #fbbf24 0%, #d97706 80%, transparent 100%);
  filter: blur(70px) opacity(0.3);
}

/* --- 导航栏 --- */
.navbar {
  width: 100%;
  box-sizing: border-box;
  background: rgba(248, 250, 252, 0.75);
  box-shadow: 0 2px 16px 0 rgba(80, 120, 255, 0.08);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  border-radius: 0 0 18px 18px;
  min-height: 60px;
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(160, 170, 255, 0.13);
  transition: background 0.3s, box-shadow 0.3s;
}

body.dark .navbar {
  background: rgba(30, 32, 40, 0.8);
  box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(100, 120, 180, 0.15);
}

.navbar .logo img {
  height: 40px;
  width: auto;
  transition: filter 0.3s;
}

body.dark .logo-invert {
  filter: brightness(0) invert(1);
}

/* --- 按钮基础风格 --- */
.btn,
.btn-primary,
.btn-warning {
  margin-right: 10px;
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  border-radius: 8px;
  padding: 6px 16px;
  background: #e0e7ff;
  transition: background 0.2s, color 0.2s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: #6366f1;
  color: white;
}

.btn:hover,
.btn-primary:hover,
.btn-warning:hover {
  background: #c7d2fe;
  color: #4f46e5;
}

body.dark .btn,
body.dark .btn-primary,
body.dark .btn-warning {
  background: #2d3445;
  color: #e0e4f0;
}

body.dark .btn:hover,
body.dark .btn-primary:hover,
body.dark .btn-warning:hover {
  background: #3f4a60;
  color: #f0f4ff;
}

body.dark .btn-primary:hover {
  background: #4f46e5;
}

/* 昼夜切换开关 */
.switch {
  --width-of-switch: 3.5em;
  --height-of-switch: 2em;
  --size-of-icon: 1.4em;
  --slider-offset: 0.3em;
  display: block;
  position: relative;
  width: var(--width-of-switch);
  height: var(--height-of-switch);
  margin-left: 10px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: 0.4s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: var(--size-of-icon);
  width: var(--size-of-icon);
  border-radius: 20px;
  left: var(--slider-offset);
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(40deg, #ff0080, #ff8c00 70%);
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #303136;
}

input:checked + .slider:before {
  left: calc(100% - (var(--size-of-icon) + var(--slider-offset)));
  background: #303136;
  box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
}

body.dark .slider {
  background-color: #3a3b3c;
}

body.dark input:checked + .slider {
  background-color: #6366f1;
}

/* --- 布局容器 --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 0;
  position: relative;
  z-index: 1;
}

.admin-layout {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.sidebar {
  flex: 0 0 200px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  border-radius: 28px;
  padding: 20px 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  height: fit-content;
}

body.dark .sidebar {
  background: rgba(45, 52, 69, 0.6);
  border-color: #4a5670;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 8px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 40px;
  text-decoration: none;
  color: #1e2b3c;
  font-weight: 500;
  transition: 0.2s;
  white-space: nowrap;
}

body.dark .sidebar-menu a {
  color: #e0e4f0;
}

.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.6);
}

body.dark .sidebar-menu a:hover {
  background: #3f4a60;
}

.sidebar-menu a.active {
  background: white;
  box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.05);
}

body.dark .sidebar-menu a.active {
  background: #3a455c;
}

@media (max-width: 700px) {
  .sidebar {
    flex: auto;
    width: 100%;
    padding: 10px 8px;
    border-radius: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-menu {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 0;
  }
  .sidebar-menu li {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .sidebar-menu a {
    padding: 8px 14px;
    font-size: 13px;
    gap: 6px;
    border-radius: 30px;
  }
}

.main-content {
  flex: 1;
  min-width: 280px;
}

.panel {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  border-radius: 32px;
  padding: 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

body.dark .panel {
  background: rgba(45, 52, 69, 0.5);
  border-color: #4a5670;
}

/* --- 消息提示 --- */
.message {
  background: #d4edda;
  color: #0f5132;
  padding: 12px 18px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.error {
  background: #f8d7da;
  color: #842029;
  padding: 12px 18px;
  border-radius: 30px;
  margin-bottom: 20px;
}

/* --- 表单 --- */
.form-card {
  background: white;
  border-radius: 28px;
  padding: 20px;
  margin-bottom: 30px;
  border: 1px solid #eef2f9;
}

body.dark .form-card {
  background: #2a3340;
  border-color: #4a5670;
  color: #e0e4f0;
}

.form-group {
  margin-bottom: 18px;
}

label {
  font-weight: 500;
  color: #3d506e;
  display: block;
  margin-bottom: 6px;
}

body.dark label {
  color: #b0c2e0;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f2;
  border-radius: 30px;
  background: #fbfdff;
  font-size: 1rem;
  font-family: inherit;
  transition: 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #6366f1;
}

body.dark input,
body.dark textarea {
  background: #272e3f;
  border-color: #475873;
  color: #e0e4f0;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* --- 列表 & 项 --- */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-item {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 60px;
  padding: 10px 16px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #eef2f9;
}

body.dark .list-item {
  background: rgba(45, 52, 69, 0.6);
  border-color: #4a5670;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.item-info .icon {
  font-size: 1.9rem;
}

.meta .title {
  font-weight: 600;
}

.meta .url {
  font-size: 0.75rem;
  color: #68788e;
}

body.dark .meta .url {
  color: #a0b4d0;
}

.sort-badge {
  background: #eef2f9;
  padding: 2px 8px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: #3a4c66;
  margin-left: 8px;
}

body.dark .sort-badge {
  background: #3a455c;
  color: #b0c2e0;
}

.item-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: rgba(240, 245, 255, 0.5);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #54657e;
  font-size: 1.2rem;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s;
}

.icon-btn:hover {
  background: #eef2f9;
  color: #1f2b44;
}

body.dark .icon-btn {
  color: #b0c2e0;
  background: rgba(60, 70, 90, 0.5);
}

body.dark .icon-btn:hover {
  background: #4a5670;
  color: #f0f4ff;
}

/* --- 分页 --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-link {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 6px 14px;
  border-radius: 40px;
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.page-link:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
  color: #6366f1;
}

.page-link.active {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* 暗色模式分页 */
body.dark .page-link {
  background: rgba(45, 52, 69, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
  color: #e0e4f0;
}

body.dark .page-link:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

body.dark .page-link.active {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.page-ellipsis {
  padding: 6px 4px;
  color: #7c8ba0;
}

body.dark .page-ellipsis {
  color: #a0b4d0;
}

/* --- 分类标签（滚动胶囊） --- */
/* ========== 分类标签（电脑/手机统一滚动胶囊） ========== */
.category-tabs-wrapper {
  margin-bottom: 0;
}

.category-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar {
  display: none;
}
/* 暗色模式容器 */
body.dark .category-tabs {
  background: rgba(45, 52, 69, 0.6);
  border-color: #4a5670;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.6);
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-tab:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: #a0b8e0;
  color: #6366f1;
}

.category-tab.active {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* 暗色模式标签 */
body.dark .category-tab {
  background: rgba(45, 52, 69, 0.6);
  color: #e0e4f0;
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark .category-tab:hover {
  background: rgba(69, 78, 100, 0.8);
  color: #a5b4fc;
}
body.dark .category-tab.active {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
}

/* --- 风格管理 --- */
.style-card-option.active .style-card-inner {
  background: #eef6ff !important;
  border-color: #1e1f2a !important;
}

body.dark .style-card-option.active .style-card-inner {
  background: #3a455c !important;
  border-color: #b0c2e0 !important;
}

.style-card-option:hover .style-card-inner {
  border-color: #a0b8e0 !important;
  transform: translateY(-2px);
}

/* --- 美化复选框 --- */
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  display: none;
}

.custom-checkbox .toggle {
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  position: relative;
  transition: background 0.3s;
}

body.dark .custom-checkbox .toggle {
  background: #4a5670;
}

.custom-checkbox .toggle::after {
  content: "";
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.custom-checkbox input:checked + .toggle {
  background: #6366f1;
}

body.dark .custom-checkbox input:checked + .toggle {
  background: #818cf8;
}

.custom-checkbox input:checked + .toggle::after {
  left: 22px;
}

/* --- 前台卡片网格 --- */
.section {
  margin-bottom: 40px;
}

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

.section-header h2 {
  font-weight: 600;
  font-size: 1.5rem;
  color: #1a2638;
}

body.dark .section-header h2 {
  color: #e0e4f0;
}

.tools-grid,
.links-grid {
  display: grid;
  gap: 22px;
}

.tools-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.links-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

@media (min-width: 768px) {
  .links-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
      .category-tab {
    padding: 5px 10px;   /* 原 8px 14px 缩小 */
    font-size: 12px;      /* 原 13px 缩小为 12px */
    gap: 4px;             /* 图标与文字间距缩小 */
  }
  .category-tabs {
    padding: 6px 6px;     /* 容器内边距也适当减小 */
    gap: 6px;             /* 标签之间间距减小 */
  }
      .section-header h2 {
    font-size: 1.15rem;       /* 缩小字号，原约 1.5rem */
    white-space: nowrap;      /* 防止标题换行 */
    margin-bottom: 4px;       /* 与分类标签的间距 */
  }
  .section-header {
    flex-wrap: nowrap;        /* 标题和分类栏尽量同行 */
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .navbar {
    padding: 0 10px;
    min-height: 48px;
    border-radius: 0 0 14px 14px;
  }
  .navbar .logo img {
    height: 26px;
  }
  .navbar .btn,
  .btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    gap: 4px;
  }
  .switch {
    --width-of-switch: 2.8em;
    --height-of-switch: 1.5em;
    --size-of-icon: 1em;
  }
}

/* --- 通用卡片样式 --- */
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  min-height: 140px;
  height: 100%;
  word-break: break-word;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

.tool-icon {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 12px;
}

.tool-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.tool-desc {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 40px;
  text-align: center;
  color: #8596ad;
}

.footer {
  margin-top: 30px;
  text-align: center;
  opacity: 0.6;
  font-size: 0.8rem;
  color: #5b6f89;
}

/* ========== 卡片风格 (style4 ~ style12) ========== */
body.style4 .tool-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
  border-radius: 10px;
  padding: 24px 12px 20px;
  box-shadow: 0 10px 18px -8px rgba(70, 90, 140, 0.12);
  border: 1px solid rgba(120, 140, 200, 0.15);
}
body.style4 .tool-card:hover {
  box-shadow: 0 24px 36px -12px rgba(50, 80, 160, 0.2);
  transform: translateY(-4px);
}
body.style4 .link-card {
  background: linear-gradient(105deg, #f9fbff 0%, #ffffff 100%);
  border-radius: 10px;
  padding: 14px 18px;
  border: 1px solid #d6e1f5;
  box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.05);
}
body.style4 .link-card:hover {
  border-color: #8da4d0;
  background: white;
}
body.dark.style4 .tool-card {
  background: linear-gradient(145deg, #262e40, #1f2636);
  border-color: #475873;
}
body.dark.style4 .link-card {
  background: linear-gradient(105deg, #262e40, #1f2636);
  border-color: #475873;
}

body.style5 .tool-card {
  background: #ecf0f5;
  border-radius: 10px;
  padding: 24px 12px 20px;
  box-shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
body.style5 .tool-card:hover {
  box-shadow: 4px 4px 10px #d1d9e6, -4px -4px 10px #ffffff;
  transform: translateY(2px);
}
body.style5 .link-card {
  background: #ecf0f5;
  border-radius: 10px;
  padding: 14px 20px;
  box-shadow: 5px 5px 10px #d1d9e6, -5px -5px 10px #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
body.dark.style5 .tool-card,
body.dark.style5 .link-card {
  background: #2a3348;
  box-shadow: 8px 8px 16px #1a1f2a, -8px -8px 16px #3a455a;
}

body.style6 .tool-card {
  background: transparent;
  border: 2px solid #b0c2e0;
  border-radius: 10px;
  padding: 24px 12px 20px;
}
body.style6 .tool-card:hover {
  border-color: #4a7ec7;
  box-shadow: 0 0 15px rgba(74, 126, 199, 0.3);
  background: rgba(255, 255, 255, 0.05);
}
body.style6 .link-card {
  background: transparent;
  border: 2px solid #b0c2e0;
  border-radius: 10px;
  padding: 14px 16px;
}
body.dark.style6 .tool-card,
body.dark.style6 .link-card {
  border-color: #5f73a0;
  background: rgba(30, 35, 50, 0.6);
}
body.dark.style6 .tool-card:hover,
body.dark.style6 .link-card:hover {
  border-color: #8aa4e0;
}

body.style8 .tool-card {
  background-color: #f8f5f0;
  background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.02) 0px, rgba(0, 0, 0, 0.02) 2px, transparent 2px, transparent 6px);
  border-radius: 10px;
  padding: 24px 12px 20px;
  border: 1px solid #e0d6c8;
  box-shadow: 0 8px 0 #c0b6a8, 0 8px 16px rgba(0, 0, 0, 0.05);
}
body.style8 .tool-card:hover {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #c0b6a8, 0 8px 16px rgba(0, 0, 0, 0.05);
}
body.style8 .link-card {
  background-color: #f8f5f0;
  background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.02) 0px, rgba(0, 0, 0, 0.02) 2px, transparent 2px, transparent 6px);
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #e0d6c8;
  box-shadow: 0 5px 0 #c0b6a8, 0 5px 12px rgba(0, 0, 0, 0.04);
}
body.dark.style8 .tool-card,
body.dark.style8 .link-card {
  background-color: #2d3440;
  border-color: #505a6c;
  box-shadow: 0 6px 0 #3a4252, 0 8px 16px rgba(0, 0, 0, 0.2);
}

body.style9 .tool-card {
  background: #fcf9f2;
  border-radius: 10px 30px 10px 30px;
  padding: 24px 12px 20px;
  border: 1.5px solid #ffffff;
  box-shadow: 6px 6px 0 #cfd9e6, 0 12px 20px -8px rgba(0, 0, 0, 0.1);
}
body.style9 .tool-card:hover {
  box-shadow: 8px 8px 0 #b7c4da;
  transform: translate(-2px, -2px);
}
body.style9 .link-card {
  background: #fcf9f2;
  border-radius: 10px 24px 10px 24px;
  padding: 14px 16px;
  border: 1.5px solid #ffffff;
  box-shadow: 5px 5px 0 #cfd9e6, 0 8px 16px -6px rgba(0, 0, 0, 0.1);
}
body.dark.style9 .tool-card,
body.dark.style9 .link-card {
  background: #2e384b;
  box-shadow: 6px 6px 0 #1c2332, 0 12px 20px -8px rgba(0, 0, 0, 0.4);
  border-color: #4b5a74;
}

body.style10 .tool-card {
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 0.666667px solid rgba(255, 255, 255, 0.18);
  box-shadow: rgba(142, 142, 142, 0.19) 0px 6px 15px 0px;
  border-radius: 10px;
  padding: 24px 12px 20px;
  color: rgba(0, 0, 0, 0.85);
}
body.style10 .tool-card:hover {
  background-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}
body.style10 .link-card {
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 0.666667px solid rgba(255, 255, 255, 0.18);
  box-shadow: rgba(142, 142, 142, 0.19) 0px 6px 15px 0px;
  border-radius: 10px;
  padding: 14px 18px;
  color: rgba(0, 0, 0, 0.85);
}
body.style10 .link-card:hover {
  background-color: rgba(255, 255, 255, 0.4);
}
body.dark.style10 .tool-card,
body.dark.style10 .link-card {
  background-color: rgba(30, 32, 40, 0.4);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
}

body.style11 .tool-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 24px 12px 20px;
  color: #1a1a1a;
}
body.style11 .tool-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.02);
}
body.style11 .link-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 14px 18px;
  color: #1a1a1a;
}
body.style11 .link-card:hover {
  background: rgba(255, 255, 255, 0.25);
}
body.dark.style11 .tool-card,
body.dark.style11 .link-card {
  background: rgba(20, 25, 40, 0.35);
  color: #f0f0f0;
  border-color: rgba(255, 255, 255, 0.15);
}

body.style12 .tool-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 24px 12px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
body.style12 .tool-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
body.style12 .link-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
body.style12 .link-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}
body.dark.style12 .tool-card,
body.dark.style12 .link-card {
  background: #24263cfa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
}
body.dark.style12 .tool-card:hover,
body.dark.style12 .link-card:hover {
  background: #2a2a2d;
}

/* 前台导航栏补充样式 */
.navbar-left {
  display: flex;
  align-items: center;
  height: 100%;
}
.logo-text {
  font-weight: 600;
  font-size: 1.4rem;
  color: #0f1419;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.dark .logo-text { color: #f0f4ff; }
.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 前台 Logo 图片样式 */
.logo-img {
  height: 40px;
  width: auto;
  transition: filter 0.3s;
}
body.dark .logo-invert {
  filter: brightness(0) invert(1);
}
@media (max-width: 480px) {
  .logo-img { height: 30px; }
  .tool-card {
    min-height: 120px;
    padding: 16px 8px 14px;
  }
  .tool-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
  }
  .tool-title {
    font-size: 0.95rem;
  }
  .tool-desc {
    font-size: 0.65rem;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    white-space: normal;
  }
  .tools-grid {
    gap: 14px;
  }
}

/* 链接/工具图片图标 */
.link-icon-img {
  width: 2em;
  height: 2em;
  object-fit: contain;
  flex-shrink: 0;
}
.admin-link-icon {
  width: 1.9rem;
  height: 1.9rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}
.tool-icon-img {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
  margin-bottom: 12px;
}
/* 后台分类筛选下拉框 */
.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: none;          /* 完全去除箭头 */
  background-repeat: no-repeat;    /* 可保留 */
  background-position: right 8px center; /* 无影响 */
  padding-right: 12px !important;  /* 恢复普通内边距，不再为箭头留空 */
  cursor: pointer;
  min-width: 81px;
  transition: background-color 0.2s, border-color 0.2s;
}

/* 暗色模式也无需设置新的箭头 */
body.dark .filter-select {
  background-image: none;
}