/* ======================== DESTRE技术站 · 自定义样式 ======================== */
/* 本文件保存后自动热更新                                     */
/* 规则：默认浅色模式；.dark 前缀覆盖为深色模式                  */

/* ---- 页面最大宽度 ---- */
.container {
  max-width: 1300px !important;
}

/* ---- 背景适配 ---- */
#background {
  background-image: linear-gradient(150deg, #f1f5f9 0%, #e8edf3 40%, #f8fafc 100%) !important;
}
.dark #background {
  background-image: linear-gradient(rgb(var(--bg-color) / 0), rgb(var(--bg-color) / 0)), url('/images/background.svg') !important;
}

/* ---- 服务卡片图标：浅色模式加深 SVG ---- */
.service-icon img {
  filter: brightness(0.25);
}
.dark .service-icon img {
  filter: none;
}

/* ---- 自定义透明标题栏 ---- */
.custom-header {
  text-align: center;
  padding: 1.5rem 1rem 0.5rem 1rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  font-family: inherit;
}

#custom-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(24, 24, 27, 0.9);
}
.dark #custom-header-title {
  color: rgba(228, 228, 231, 0.9);
}

#custom-header-divider {
  color: rgba(82, 82, 91, 0.25);
  font-size: 1.3rem;
  font-weight: 200;
}
.dark #custom-header-divider {
  color: rgba(148, 163, 184, 0.3);
}

#custom-header-time {
  font-size: 0.95rem;
  color: rgba(82, 82, 91, 0.6);
}
.dark #custom-header-time {
  color: rgba(148, 163, 184, 0.68);
}

/* ---- 天气+日历并排容器 ---- */
.weather-calendar-row {
  display: flex;
  gap: 1rem;
  margin: 1rem 1rem 1rem 1rem;
}
@media (min-width: 640px) {
  .weather-calendar-row { margin: 1.5rem 2rem 2rem 2rem; }
}
@media (max-width: 768px) {
  .weather-calendar-row { flex-direction: column; }
}

/* ---- 面板公共样式 ---- */
.weather-panel,
.calendar-panel {
  font-family: inherit;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(24, 24, 27, 0.9);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.dark .weather-panel,
.dark .calendar-panel {
  color: rgba(228, 228, 231, 0.9);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

/* ---- 天气面板（flex 子项，占 60%） ---- */
.weather-panel {
  flex: 3;
  min-width: 0;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
}

/* ---- 日历面板（flex 子项，占 40%） ---- */
.calendar-panel {
  flex: 2;
  min-width: 240px;
  padding: 1.25rem 1.25rem 1rem 1.25rem;
  overflow: hidden;
}

/* 日历：今日概览 */
.calendar-today { margin-bottom: 0.75rem; text-align: center; }

.calendar-today-date {
  font-size: 0.85rem; font-weight: 600;
  color: rgba(24, 24, 27, 0.85); margin-bottom: 2px;
}
.dark .calendar-today-date { color: rgba(228, 228, 231, 0.85); }

.calendar-today-meta {
  font-size: 0.7rem; color: rgba(82, 82, 91, 0.45);
}
.dark .calendar-today-meta { color: rgba(148, 163, 184, 0.5); }

/* 日历：月历 */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }

.calendar-weekday {
  font-size: 0.7rem; color: rgba(82, 82, 91, 0.4); padding: 4px 0;
}
.dark .calendar-weekday { color: rgba(148, 163, 184, 0.45); }

.calendar-day {
  font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto; width: 28px; height: 28px; border-radius: 50%;
  transition: background 0.15s ease; color: rgba(24, 24, 27, 0.7);
}
.dark .calendar-day { color: rgba(228, 228, 231, 0.75); }

.calendar-day span { line-height: 1; }

.calendar-day:hover { background: rgba(0, 0, 0, 0.05); }
.dark .calendar-day:hover { background: rgba(255, 255, 255, 0.08); }

.calendar-day-today { background: rgba(34, 211, 238, 0.22); font-weight: 700; }
.calendar-day-today span { color: #22d3ee; }

.calendar-day-other { opacity: 0.3; }

/* 日历：月历标题分隔线 */
.calendar-title {
  text-align: center; font-size: 0.85rem; font-weight: 600;
  padding-top: 0.6rem; margin-bottom: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06); color: rgba(24, 24, 27, 0.8);
}
.dark .calendar-title {
  border-top: 1px solid rgba(148, 163, 184, 0.08); color: rgba(228, 228, 231, 0.8);
}

/* 日历：节假日倒计时 */
.calendar-section-title {
  font-size: 0.72rem; color: rgba(82, 82, 91, 0.4);
  margin-bottom: 0.4rem; padding-top: 0.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.dark .calendar-section-title {
  color: rgba(148, 163, 184, 0.45);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.calendar-holiday-item { display: flex; align-items: center; gap: 0.5rem; padding: 3px 0; font-size: 0.78rem; }

.calendar-holiday-name { font-weight: 500; color: rgba(24, 24, 27, 0.75); min-width: 48px; }
.dark .calendar-holiday-name { color: rgba(228, 228, 231, 0.75); }

.calendar-holiday-date { font-size: 0.72rem; color: rgba(82, 82, 91, 0.5); min-width: 72px; }
.dark .calendar-holiday-date { color: rgba(148, 163, 184, 0.55); }

.calendar-holiday-days { font-size: 0.72rem; color: #22d3ee; margin-left: auto; }

/* ---- 天气面板：内部组件 ---- */
.weather-loading,
.weather-error { text-align: center; padding: 1rem; color: rgba(82, 82, 91, 0.55); font-size: 0.875rem; }
.dark .weather-loading,
.dark .weather-error { color: rgba(148, 163, 184, 0.7); }

.weather-error { color: rgba(220, 38, 38, 0.65); }
.dark .weather-error { color: rgba(244, 114, 114, 0.7); }

.weather-current { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.weather-current-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 140px; }

.weather-city { font-size: 0.8rem; color: rgba(82, 82, 91, 0.7); }
.dark .weather-city { color: rgba(148, 163, 184, 0.75); }

.weather-temp {
  font-size: 2.5rem; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #0891b2, #4f46e5);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dark .weather-temp {
  background: linear-gradient(135deg, #22d3ee, #a5b4fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.weather-today-range { font-size: 0.75rem; color: rgba(82, 82, 91, 0.5); margin-top: 0.15rem; }
.dark .weather-today-range { color: rgba(148, 163, 184, 0.55); }

.weather-current-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; flex: 1; }
.weather-meta-item { display: flex; flex-direction: column; align-items: center; min-width: 50px; }
.weather-meta-value { font-size: 1.1rem; font-weight: 600; }

.weather-meta-label { font-size: 0.7rem; color: rgba(82, 82, 91, 0.5); margin-top: 1px; }
.dark .weather-meta-label { color: rgba(148, 163, 184, 0.55); }

.weather-section-title { font-size: 0.72rem; color: rgba(82, 82, 91, 0.4); margin-bottom: 0.4rem; }
.dark .weather-section-title { color: rgba(148, 163, 184, 0.45); }

.weather-hourly-scroll {
  display: flex; gap: 0.65rem; overflow-x: auto; padding-bottom: 0.4rem;
  scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.dark .weather-hourly-scroll { scrollbar-color: rgba(100,116,139,0.3) transparent; }

.weather-hourly-scroll::-webkit-scrollbar { height: 3px; }
.weather-hourly-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
.dark .weather-hourly-scroll::-webkit-scrollbar-thumb { background: rgba(100,116,139,0.3); }

.weather-hourly-item { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 48px; flex-shrink: 0; }

.weather-hourly-time { font-size: 0.7rem; color: rgba(82, 82, 91, 0.5); }
.dark .weather-hourly-time { color: rgba(148, 163, 184, 0.55); }

.weather-hourly-icon { font-size: 1.05rem; }
.weather-hourly-temp { font-size: 0.8rem; font-weight: 500; }

.weather-daily { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid rgba(0,0,0,0.06); }
.dark .weather-daily { border-top: 1px solid rgba(148,163,184,0.08); }

.weather-daily-grid { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.15rem; }

.weather-daily-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 84px; flex-shrink: 0; padding: 0.4rem 0.6rem; border-radius: 8px;
  background: rgba(0,0,0,0.02); transition: background 0.2s ease;
}
.dark .weather-daily-item { background: rgba(255,255,255,0.03); }

.weather-daily-item:hover { background: rgba(0,0,0,0.05); }
.dark .weather-daily-item:hover { background: rgba(255,255,255,0.06); }

.weather-daily-label { font-size: 0.7rem; color: rgba(82, 82, 91, 0.6); }
.dark .weather-daily-label { color: rgba(148, 163, 184, 0.65); }

.weather-daily-icon { font-size: 1.15rem; margin: 1px 0; }
.weather-daily-temps { font-size: 0.75rem; font-weight: 500; }

.weather-daily-desc { font-size: 0.65rem; color: rgba(82, 82, 91, 0.4); }
.dark .weather-daily-desc { color: rgba(148, 163, 184, 0.45); }

/* ---------- 服务卡片：大圆角 + 细描边 + 悬停上浮青色微光 ---------- */
.service-card {
  border-radius: 12px !important;
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.dark .service-card { border: 1px solid rgba(148,163,184,0.12); }

.service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6,182,212,0.4);
  box-shadow: 0 4px 20px rgba(6,182,212,0.12), 0 2px 8px rgba(0,0,0,0.08) !important;
}
.dark .service-card:hover {
  border-color: rgba(34,211,238,0.35);
  box-shadow: 0 4px 20px rgba(34,211,238,0.15), 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
.dark ::-webkit-scrollbar-track { background: rgba(15,23,42,0.6); }

::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: rgba(100,116,139,0.5); }

::-webkit-scrollbar-thumb:hover { background: rgba(6,182,212,0.6); }
.dark ::-webkit-scrollbar-thumb:hover { background: rgba(34,211,238,0.5); }

html { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) rgba(0,0,0,0.05); }
.dark html { scrollbar-color: rgba(100,116,139,0.5) rgba(15,23,42,0.6); }

/* ---------- 文字选中色 ---------- */
::selection { background: rgba(6,182,212,0.28); }
.dark ::selection { background: rgba(34,211,238,0.3); }

/* ---- 备案页脚 ---- */
#beian-footer {
  text-align: center; padding: 4px 0 16px; font-size: 12px; line-height: 1.8;
  color: rgba(82, 82, 91, 0.55);
}
.dark #beian-footer { color: rgba(148, 163, 184, 0.65); }

#beian-footer a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
#beian-footer a:hover { color: #0891b2; }
.dark #beian-footer a:hover { color: #22d3ee; }

#beian-footer .beian-divider { margin: 0 10px; opacity: 0.4; }

