/* ===== Homepage 天依主题 — v6 ===== */
/* 目标：Kimi 9+ / 多列网格 / 高质感卡片 / 品牌图标书签 */

/* --- LAYER 0: 天依全屏背景 --- */
body {
  background: url('/tianyi-bg.jpg') center 30% / cover no-repeat fixed !important;
  position: relative;
  min-height: 100vh;
}

/* --- LAYER 1: 深色冷调叠加 --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(8, 8, 16, 0.70) 0%,
    rgba(8, 8, 16, 0.40) 35%,
    rgba(8, 8, 16, 0.50) 65%,
    rgba(8, 8, 16, 0.78) 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* --- LAYER 2: 前景内容 --- */
#__next, #page_wrapper {
  position: relative;
  z-index: 1;
}

#page_wrapper {
  padding: 0;
}

/* ===== 顶部监控栏 — 极简晶片 ===== */
#information-widgets {
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 14px !important;
  padding: 0.35rem 1rem !important;
  margin: 0.75rem 1rem 0.25rem !important;
  display: flex !important;
  align-items: center !important;
}

#widgets-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
}

.information-widget-resource {
  display: flex !important;
  align-items: center !important;
  padding: 0.1rem 0.5rem 0.1rem 0 !important;
  margin-right: 0.5rem !important;
}

.information-widget-resource svg {
  width: 0.7rem !important;
  height: 0.7rem !important;
  opacity: 0.35 !important;
}

.information-widget-resource .flex.flex-col {
  margin-left: 0.25rem !important;
  min-width: 60px !important;
}

.information-widget-resource .text-xs {
  font-size: 0.5rem !important;
  color: rgba(255, 255, 255, 0.35) !important;
  letter-spacing: 0.05em !important;
}

.resource-usage {
  height: 1.5px !important;
  border-radius: 1px !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.information-widget-resource div:first-child div:first-child {
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 0.65rem !important;
  font-weight: 500 !important;
}

#information-widgets-right {
  flex: 1 !important;
  display: flex !important;
  justify-content: flex-end !important;
}

.information-widget-search {
  max-width: 18rem !important;
}

input[placeholder='搜索…'] {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  color: rgba(255, 255, 255, 0.70) !important;
  padding-left: 0.85rem !important;
  font-size: 0.75rem !important;
  height: 1.8rem !important;
  transition: all 0.3s ease;
}

input[placeholder='搜索…']:focus {
  border-color: rgba(148, 163, 184, 0.2) !important;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.06) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* ===== 内容区 — 网格布局 ===== */
.container {
  justify-content: center !important;
  padding: 0 1rem !important;
}

/* 服务/书签组用网格取代单列 */
#services, #bookmarks {
  padding: 0 0.5rem !important;
  margin-top: 0.15rem !important;
}

/* 分组标题 */
.service-group-name, .bookmark-group-name {
  font-size: 0.5rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.18) !important;
  padding-bottom: 0.25rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

/* 覆盖Homepage的响应式列宽：服务区2列 */
.services-group {
  flex: 1 1 100% !important;
  max-width: 100% !important;
}

/* 服务列表item改为行内块：实现多列 */
.services-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.4rem !important;
}

.services-list li {
  margin-bottom: 0 !important;
}

/* ===== 服务卡片 — 高质感毛玻璃 ===== */
.service-card {
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  transition: all 0.3s ease;
  height: 100% !important;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

/* 服务内容区 */
.service-card .px-2 {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.service-card .py-2 {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

.service-name {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 500 !important;
  font-size: 0.78rem !important;
}

.service-description, p[class*='text-xs'] {
  color: rgba(255, 255, 255, 0.40) !important;
  font-size: 0.65rem !important;
}

/* 服务图标 */
.service-card img {
  width: 1.2rem !important;
  height: 1.2rem !important;
  opacity: 0.8 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 5px !important;
  padding: 3px !important;
}

/* ===== 书签 — 网格 + 品牌图标 ===== */
.bookmark-group {
  flex: 1 1 100% !important;
  max-width: 100% !important;
}

/* 书签网格 */
.bookmark-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  gap: 0.4rem !important;
}

.bookmark-list li {
  flex: unset !important;
}

/* 书签卡片 - 与服卡统一风格 */
.bookmark a {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255,255,255,0.03) !important;
  transition: all 0.25s ease !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  padding: 0.3rem 0.5rem !important;
  min-width: unset !important;
  height: 100% !important;
}

.bookmark a:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

/* 隐藏abbr标签 - 用图标替代 */
.bookmark-icon {
  display: none !important;
}

/* 书签图标 (使用icon字段) */
.bookmark a img[src*="/github.svg"],
.bookmark a img[src*="/bilibili.svg"] {
  width: 1.1rem !important;
  height: 1.1rem !important;
  margin-right: 0.4rem !important;
  opacity: 0.6 !important;
  filter: brightness(1.5) !important;
  transition: opacity 0.2s;
}

.bookmark a:hover img {
  opacity: 0.85 !important;
}

/* 书签文字 */
.bookmark-name {
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 0.7rem !important;
  font-weight: 400 !important;
}

.bookmark-description {
  display: none !important;
}

/* 书签容器内flex调整 */
.bookmark-text .pl-3 {
  padding-left: 0 !important;
}

.bookmark-text .py-2 {
  padding-top: 0.1rem !important;
  padding-bottom: 0.1rem !important;
}

/* ===== 底部 ===== */
#footer {
  padding: 0.5rem !important;
}

#version {
  opacity: 0 !important;
}
#version:hover {
  opacity: 0.3 !important;
}

svg[cursor-pointer] {
  opacity: 0.15;
}
svg[cursor-pointer]:hover {
  opacity: 0.4;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  #information-widgets {
    flex-direction: column !important;
  }
  .services-list {
    grid-template-columns: 1fr !important;
  }
  .bookmark-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
