/* 首页样式 - Mintlify 风格优化 */

/* ─── 顶部导航栏 ─── */
.home-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.home-top-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0d0d0d;
}

.admin-entry-btn {
  padding: 7px 18px;
  background: #0d0d0d;
  color: #ffffff;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s ease;
  display: inline-block;
  border: 1px solid #0d0d0d;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.06) 0px 1px 2px;
}

.admin-entry-btn:hover {
  opacity: 0.9;
  color: #ffffff;
}

/* ─── 页面主体 ─── */
.home-page-wrapper {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 80px;
}

/* ─── 标题区域 ─── */
.home-page-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 48px;
  padding: 40px 0 36px;
  position: relative;
}

.home-page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: #18E299;
  border-radius: 1px;
}

.home-page-header h2 {
  font-size: 40px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.8px;
  text-transform: none;
  color: #0d0d0d;
  line-height: 1.15;
  background: none;
  -webkit-text-fill-color: unset;
  transform: none;
}

/* ─── 搜索框 ─── */
.search-container {
  margin-bottom: 28px;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  font-size: 15px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  background: #ffffff;
  transition: all 0.15s ease;
  outline: none;
  color: #0d0d0d;
  box-shadow: rgba(0, 0, 0, 0.03) 0px 2px 4px;
}

.search-input:focus {
  border-color: #18E299;
  outline: 1px solid #18E299;
  box-shadow: none;
  background: #ffffff;
}

.search-input::placeholder {
  color: #888888;
}

/* ─── 文章列表 ─── */
ul.home-post-list {
  display: grid !important;
  gap: 8px !important;
  padding: 0 !important;
  list-style: none !important;
  margin: 0 0 48px !important;
}

li.home-post-item {
  padding: 18px 24px !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  box-shadow: rgba(0, 0, 0, 0.03) 0px 2px 4px !important;
}

li.home-post-item:hover {
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 16px !important;
  transform: none !important;
  background: #ffffff !important;
}

.home-post-title {
  font-weight: 500;
  font-size: 15px;
  color: #0d0d0d;
  letter-spacing: -0.01em;
}

.home-post-meta {
  color: #888888;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 16px;
}

/* ─── 分页 ─── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.page-link {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #0d0d0d;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-link:hover {
  background: #f5f5f5;
  color: #0d0d0d;
}

.page-info {
  font-size: 13px;
  color: #888888;
}

/* ─── 搜索隐藏 ─── */
li.home-post-item.search-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* ─── 响应式 ─── */
@media (max-width: 640px) {
  .home-top-bar {
    padding: 12px 20px;
  }

  .home-top-title {
    font-size: 15px;
  }

  .admin-entry-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  .home-page-header {
    margin-bottom: 32px;
    padding: 28px 0 24px;
  }

  .home-page-header h2 {
    font-size: 28px;
    letter-spacing: -0.56px;
  }

  li.home-post-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  .home-post-title {
    width: 100%;
  }

  .home-post-meta {
    margin-left: 0;
  }

  .search-input {
    padding: 10px 16px;
    font-size: 14px;
  }

  .page-link {
    padding: 8px 16px;
    font-size: 13px;
  }
}
