/* ===== Homepage 暗色/亮色模式 ===== */
/* 重要: homepage 使用 .light 和 .dark class */

.light {
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(0, 0, 0, 0.08);
  --text-primary: #000000;
  --text-secondary: #333333;
}

.dark {
  --card-bg: rgba(30, 35, 50, 0.9);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f0f0f5;
  --text-secondary: rgba(255, 255, 255, 0.65);
}

/* ===== 服务卡片 ===== */
.service-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 16px;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* 卡片内文字 */
.service-card .service-name,
.service-card .bookmark-name {
  color: var(--text-primary) !important;
}

.service-card .service-description {
  color: var(--text-secondary) !important;
}

/* ===== 分类标题 ===== */
.section-header,
.service-section-header {
  color: var(--text-primary) !important;
}

/* ===== 页面标题区 ===== */
.header {
  background: var(--card-bg) !important;
  border-bottom: 1px solid var(--card-border);
}

/* ===== 搜索框隐藏 ===== */
.search,
[data-widget-type="search"],
.header .search-container {
  display: none !important;
}

/* ===== 仪表盘小部件 (resources/docker) ===== */
.widget {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 12px;
  padding: 16px;
}

/* 部件内文字 */
.widget,
.widget span,
.widget .text-gray,
.resource-label,
.resource-value {
  color: var(--text-primary) !important;
}

.widget .text-accent,
.text-teal {
  color: #39c5bb !important;
}

/* ===== 时间显示 ===== */
.datetime {
  color: var(--text-primary) !important;
}

/* ===== 全局文字 ===== */
body,
main {
  color: var(--text-primary) !important;
}

/* ===== 背景图暗色遮罩（暗色模式下） ===== */
.dark #background {
  filter: brightness(0.4) saturate(0.7);
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.light ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.dark ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(57, 197, 187, 0.5), rgba(57, 197, 187, 0.3));
  border-radius: 4px;
}

/* ===== 链接 ===== */
a {
  color: var(--text-primary);
  transition: color 0.2s;
}

a:hover {
  color: #39c5bb;
}
