/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局样式 */
body {
/* 手机端导航简写优化 */
@media (max-width: 600px) {
  .site-header {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }

  .logo {
    display: none;
  }

  nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding: 5px 0;
  }

  nav a {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 手机端简写显示 */
  nav a[href="#jiaoyou"] {
    /* 使用伪元素显示简写文本 */
    position: relative;
  }

  nav a[href="#jiaoyou"]:before {
    content: "交友";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
  }

  nav a[href="#yuehui"]:before {
    content: "约会";
  }

  nav a[href="#huodong"]:before {
    content: "活动";
  }

  nav a[href="#shenghuo"]:before {
    content: "生活";
  }

  nav a[href="/"]::before {
    content: "首页";
  }
}

/* 桌面端保持完整显示 */
@media (min-width: 768px) {
  nav a {
    white-space: normal;
  }

  nav a[href="#jiaoyou"]:before {
    display: none;
  }
}
/* 移动端导航优化 */
@media (max-width: 767px) {
  .site-header {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }

  .logo {
    display: none;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    -webkit-scrollbar-width: none;
    -webkit-scrollbar-thumb: none;
    scrollbar-width: none;
    white-space: nowrap;
    padding: 5px 0;
  }

  nav a {
    display: inline-block;
    white-space: nowrap;
    margin: 0 5px;
    padding: 10px 15px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
  }

  nav a:hover {
    color: #007BFF;
  }
}

/* 桌面端恢复 Logo 显示 */
@media (min-width: 768px) {
  .logo {
    display: block;
  }

  nav {
    white-space: normal;
    overflow-x: visible;
  }
}
/* 内容区域样式 */
.content-sections {
  margin-top: 40px;
}

.content-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 25px;
  padding: 20px;
}

.content-card h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.content-card p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
}

.content-card a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 15px;
  color: #007BFF;
  text-decoration: none;
  border: 1px solid #007BFF;
  border-radius: 5px;
}

.content-card a:hover {
  background-color: #007BFF;
  color: #fff;
}

/* 响应式调整 */
@media (min-width: 768px) {
  .content-sections {
    margin-top: 60px;
  }

  .content-card {
    flex: 1 1 48%;
    margin: 10px 1%;
  }
}
  font-family: "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  padding: 0 10px;
}

/* 响应式容器 */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 适配手机竖屏 */
@media (max-width: 600px) {
  .container {
    padding: 0 10px;
  }
}

/* 头部样式 */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #ddd;
}

.logo {
  font-size: 18px;
  font-weight: bold;
  color: #007BFF;
  text-decoration: none;
}

nav a {
  margin: 0 10px;
  font-size: 16px;
  color: #333;
  text-decoration: none;
}

/* Hero 区域 */
.hero {
  padding: 40px 0;
  text-align: center;
}

.hero h1 {
  font-size: 24px;
  margin-bottom: 15px;
}

.hero p {
  font-size: 16px;
  margin-bottom: 30px;
}

.hero-actions a {
  margin: 0 10px;
  padding: 10px 20px;
  font-size: 16px;
  color: #fff;
  background-color: #007BFF;
  text-decoration: none;
  border-radius: 5px;
}

/* 卡片布局 */
.card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 20px 0;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

.card p {
  font-size: 15px;
  line-height: 1.6;
}

/* 响应式布局 - 电脑端 */
@media (min-width: 768px) {
  .site-header {
    flex-direction: row;
    justify-content: flex-start;
  }

  nav {
    margin-left: 20px;
  }

  .hero {
    padding: 60px 0;
  }

  .card {
    flex: 1 1 48%;
    margin: 10px 1%;
  }
}

/* 链接样式 */
a {
  color: #007BFF;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 导航文字：默认桌面端 */
.mobile-text {
    display: none;
}

/* 手机端导航 */
@media (max-width: 600px) {
    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }
}