/* 全局重置与基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "SimSun", "宋体", serif; /* 宋体，怀旧感 */
  background-color: #fff8dc; /* 米黄色背景，复刻早期网页 */
  color: #333;
  line-height: 1.6;
}
.container {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
}

/* 头部导航 */
.header {
  margin-bottom: 20px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}
.nav {
  margin-bottom: 10px;
}
.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap; /* 手机端自动换行 */
  gap: 10px;
}
.nav-item {
  background-color: #faebd7; /* 浅粉色，复古按钮底色 */
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
}
.nav-item:hover {
  background-color: #ffdab9; /* hover变色，增强互动 */
}

/* 搜索栏 */
.search-bar {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}
.search-bar input {
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  width: 70%;
}
.search-bar button {
  padding: 5px 10px;
  background-color: #add8e6; /* 浅蓝色，复古按钮 */
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
}
.search-bar button:hover {
  background-color: #87ceeb;
}

/* 首页-最近更新列表 */
.recent-section h2 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  border-left: 3px solid #cd7f32; /* 古铜色边框，强化怀旧 */
  padding-left: 5px;
}
.random-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 8px 12px;
  background-color: #f0f8ff;
  border: 1px dashed #add8e6;
  border-radius: 4px;
}
.random-tag {
  background-color: #ffcc00;
  color: #333;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
}
.refresh-btn {
  background-color: #32cd32;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}
.refresh-btn:hover {
  background-color: #228b22;
}
.joke-list {
  list-style-type: disc; /* 项目符号，复刻BBS列表 */
  padding-left: 20px;
}
.joke-item {
  margin-bottom: 10px;
  font-size: 15px;
}
.joke-item a {
  color: #0000ee; /* 经典蓝色链接 */
  text-decoration: none;
}
.joke-item a:hover {
  text-decoration: underline;
}

/* 详情页-内容区 */
.detail-section {
  background-color: #fff; /* 白色卡片，突出内容 */
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 20px;
}
.detail-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
}
.detail-content {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  text-indent: 2em; /* 首行缩进，模仿文章排版 */
}
.back-btn {
  display: inline-block;
  padding: 5px 10px;
  background-color: #add8e6;
  border: 1px solid #ccc;
  border-radius: 3px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}
.back-btn:hover {
  background-color: #87ceeb;
}

/* 随机推荐区域 */
.recommend-section {
  background-color: #f9f9f9;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 20px;
}
.recommend-section h2 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  border-left: 3px solid #ff6347; /* 番茄色边框，区分区域 */
  padding-left: 5px;
}
.recommend-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}
.recommend-list {
  list-style-type: none;
  padding-left: 0;
}
.recommend-item {
  margin-bottom: 8px;
  padding: 8px 12px;
  background-color: #fff;
  border-left: 3px solid #32cd32;
  border-radius: 3px;
}
.recommend-item a {
  color: #2e8b57;
  text-decoration: none;
  font-size: 14px;
}
.recommend-item a:hover {
  color: #228b22;
  text-decoration: underline;
}

/* 手机端响应式（适配576px以下屏幕） */
@media (max-width: 576px) {
  .nav-list {
    flex-direction: column; /* 导航垂直排列 */
  }
  .search-bar {
    flex-direction: column; /* 搜索栏垂直排列 */
  }
  .search-bar input {
    width: 100%;
    margin-bottom: 5px;
  }
  .random-info {
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-content {
    font-size: 15px;
    line-height: 1.6;
  }
}
