/*************** 通用样式区 ***************/
body {
  margin: 0;
  padding: 0;
  font-family: "Microsoft YaHei", sans-serif;
  background-color: #f8f9fa;
}

.page-wrapper {
  min-height: 900px;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

/*************** 电脑端样式区 ***************/
@media (min-width: 769px) {
  .hero-section {
    position: relative;
    width: 100%;
    height: 100dvh;
    background: url("../img/bc6.jpg") no-repeat center center/cover;
    overflow: hidden;

    opacity: 0; /* 初始透明 */
    transform: translateY(-120px); /* 初始状态稍微上移 */
    transition: opacity 1s ease-out, transform 1s ease-out; 
  }

  /* 头图显示时的样式 */
  .hero-section.hero-show {
    opacity: 1; /* 完全可见 */
    transform: translateY(0); /* 位置恢复正常 */
  }
.hero-overlay {
    position: absolute;
    top: 50%;  
    left: 50%;  
    width: 90%;  
    height: 20%; /* 覆盖的高度：可以调整 */
    background: rgba(0, 0, 0, 0.004);  /* 半透明黑色遮罩 */
    backdrop-filter: blur(5px); 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    /* 使用 transform 使它精确居中 */
    transform: translate(-50%, -50%);  /* 精确居中 */
}


  .hero-content {
    color: #fff;
    padding: 20px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
  }

  .hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-align: center;
  }

  .hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    opacity: 0.9;
    white-space: nowrap;
    display: inline-block;
    border-right: 2px solid #efecec;
    animation: blink 0.75s step-end infinite;
    text-align: center;

    min-height: 1.8em;
    line-height: 1.8em;
    height: 1.8em; /* 固定高度 */
    overflow: hidden; /* 超长文字隐藏 */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  @keyframes blink {
    50% {
      border-color: transparent;
    }
  }

  /* 博客区域 */
  .blog-container {
    width: 60%;
    display: flex;
    flex-direction: column;
    padding: 40px 0;
    box-sizing: border-box;
  }

  /* 帖子 */
  .post-list {
    position: relative;
    margin-top: 5%;
    left: 15%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
  }

  .post-card {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    height: 175px;
  }

  .post-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .post-card.reveal {
    opacity: 1;
    transform: translateY(0);
  }

  .post-card.hide {
    opacity: 0;
    transform: translateY(30px);
  }

  .post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
  }

  .post-image {
    width: 35%;
    height: 100%;
    border-right: #666 solid 2px;
  }

  .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .post-content {
    width: 65%;
    padding: 15px 20px;
    box-sizing: border-box;
  }

  /* 主标题锚点样式 */
  .post-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
  }

  .post-title a:hover {
    color: #007bff;
    border-bottom: #007bff solid 1px;
  }

  .post-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
  }

  .post-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
  }

  .pagination {
    /* position: absolute;
    left: 9%;
    top: 104%; */
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10%;
  }

  .page-btn {
    border: 1px solid #ccc;
    background-color: white;
    color: #333;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .page-btn:hover {
    background-color: #b7a3e3;
    color: white;
  }

  .page-btn.active {
    background-color: #b7a3e3;
    color: white;
    font-weight: bold;
  }

  .sidebarAuthor {
    position: absolute;
    right: 10%;
    top: 109%;
    width: 20%;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* transition: all 0.6s ease; */
  }

  .sidebarAuthor.sticky-sidebar {
    position: fixed;
    top: 9%;
  }

  .sidebarTag {
    position: absolute;
    right: 10%;
    top: 155%;
    width: 20%;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* transition: all 0.6s ease; */
  }

  .sidebarTag.sticky-sidebar {
    position: fixed;
    top: 55%;
  }

  /* 站主卡片 */
  .author-card {
    text-align: center;
    height: 100%;
  }

  .author-card img {
    position: relative;
    width: 95x;
    height: 95px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: #333 solid 3px;
  }

  .tag-card {
    text-align: center;
    height: 100%;
  }

  .p1 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #b7a3e3 !important;
    /* 柔和的紫色，和主调呼应 */
    letter-spacing: 1px;
    text-transform: uppercase;
    /* 全部大写 */
    margin-top: 8px;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  }

  .author-card h3 {
    margin-top: 5px;
    font-size: 16px;
    color: #333;
  }

  .author-card p {
    font-size: 16px;
    color: #666;
  }

  .tag-card p {
    font-size: 16px;
    color: #666;
  }

  .admin_info {
    display: flex;
    /* justify-content: center; */
  }

  .admin_info p {
    margin-left: 30%;
    font-size: 15px;
    color: #666;
  }

  .admin_info p span {
    margin-left: 5px;
    font-weight: bold;
    color: #333;
  }

  .tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px;
  }

  /* 单个标签卡片 */
  .tag-item {
    display: inline-block;
    padding: 6px 10px;
    background: #f0f0f5;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    border: 1px solid #e2e2e8;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
  }

  .tag-item:hover {
    background: #b7a3e3;
    color: white;
    border-color: #b7a3e3;
    transform: translateY(-2px);
  }

  .tag-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding: 10px 15px;
    margin: 0;
    border-bottom: 1px solid #eee;
  }
}

/*************** 手机端样式区 ***************/
@media (max-width: 768px) {
  .hero-section {
    display: none;
  }

  .blog-container {
    width: 96%;
    display: flex;
    flex-direction: column;
    padding: 40px 0;
    box-sizing: border-box;
  }

  .post-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
  }

  .post-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;

    opacity: 0;
    transform: translateY(30px);

    transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.25s ease;
  }

  .post-card.hide {
    opacity: 0;
    transform: translateY(30px);
  }

  .post-card.reveal {
    opacity: 1;
    transform: translateY(0);
  }

  .post-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }

  .post-image {
    width: 100%;
    height: 180px;
  }

  .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .post-content {
    padding: 12px 15px;
  }

  .post-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
  }

  .post-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
  }

  .post-title a:hover {
    color: #007bff;
  }

  .post-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
  }

  .pagination {
    display: flex;
    margin-left: 3%;
    align-items: center;
    gap: 8px;
  }

  .page-btn {
    border: 1px solid #ccc;
    background-color: white;
    color: #333;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .page-btn:hover {
    background-color: #007bff;
    color: white;
  }

  .page-btn.active {
    background-color: #007bff;
    color: white;
    font-weight: bold;
  }

  .sidebarAuthor {
    display: none;
  }
  .sidebarTag{
    display: none;
  }
}
