@font-face {
    font-family: 'fz-ios';
    src: url('/public/libs/pingfang.ttf');
}

*{
    padding: 0;
    margin: 0;
    border: none;
    font-family: 'fz-ios';
}

html{
    scroll-behavior: smooth;
}

html::-webkit-scrollbar{
    display: none;
}

body{
    width: 100vw;
    height: auto;
    display: grid;
    justify-items: center;
    background: #f9f9f9;
}

header{
    width: 100vw;
    height: 70px;
    background: #f9f9f9be;
    backdrop-filter: blur(5px);
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    justify-items: center;
    align-items: center;
    z-index: 9000;
    user-select: none;
    position: fixed;
    top: 0;
}

.logo{
    width: 100%;
    height: auto;
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 15px;
}

.logo img{
    width: 2.6rem;
    margin-left: 2.5rem;
    user-select: none;
    -webkit-user-drag: none;
}

.logo h1{
    font-size: 1.3em;
}

.header-button{
    width: 100%;
    height: auto;
    display: flex;
    justify-content: right;
    align-items: center;
    gap: 20px;
}

.header-button a{
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: #434753;
    font-size: 1rem;
    user-select: none;
    -webkit-user-drag: none;
    transition: all 0.1s ease-in-out;
}

.header-button a:hover{
    background: #e9e9eb;
}

.header-button a:nth-child(5){
  background: #e9e9eb;
  margin-right: 25px;
}

.header-button a:active{
    transform: scale(0.95);
}

.header-button button{
    width: 38px;
    height: 38px;
    display: grid;
    justify-items: center;
    align-items: center;
    background: none;
    border-radius: 50%;
    margin-left: 10px;
    margin-right: 2rem;
    transform: translateX(-5px) translateY(2px);
    transition: all 0.2s ease-in-out;
    border: solid 2px #dfe0e2;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
}

.header-button button:hover{
    background: #e9e9eb;
}

.header-button button img{
    width: 23px;
    opacity: 0.8;
    user-select: none;
    -webkit-user-drag: none;
}

.header-button button:hover .user_p{
    display: block;
}

.user_p{
    display: none;
    width: 70px;
    padding: 5px 8px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 -1.5px 8px #00000027;
    transform: translateY(45px) translateX(2px);
    position: absolute;
    z-index: 1000;
    color: #434753;
    animation: userpmove 0.4s ease-in-out;
}

@keyframes userpmove {
    0%{
        transform: translateY(50px) translateX(2px);
        opacity: 0;
    }
    100%{
        transform: translateY(45px) translateX(2px);
        opacity: 1;
    }
}

.user_p::before{
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background: #fff;
    position: absolute;
    transform: rotate(45deg) translateY(-21px) translateX(7px);
    z-index: 999;
}




/*主要区域*/
.wall_container{
    width: 650px;
    min-width: 380px;
    margin-top: 70px;
    display: grid;
    justify-items: center;
    gap: 20px;
}
.active_header{
    background: #e9e9eb;
}


/*校园墙分类控件*/
.wall_cgi{
    display: flex;
    flex-direction: row;
    justify-items: center;
    align-items: center;
    gap: 13px;
}
.wallcgi_btn{
    padding: 3px 12px;
    border-radius: 3px;
    font-size: 0.9rem;
    color: #8d8d8d;
    user-select: none;
    transition: all 0.15s ease-in-out;
}
.wallcgi_btn:hover{
    background: #e3e3e3de;
    color: #595959;
}
.wallcgi_active{
    background: #e3e3e3;
    color: #2b2b2b;
}
.wallcgi_active:hover{
    background: #e3e3e3 !important;
    color: #2b2b2b !important;
}







/*帖子容器*/
section{
    width: 650px;
    min-width: 380px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    align-items: flex-start;
    column-gap: 15px;
    row-gap: 18px;
    position: relative;
}
.postbt{
    margin-bottom: 60px !important;
}

/*卡片容器*/
.totop_post{
    width: 100%;
    height: auto !important;
      display: grid;
      gap: 20px;
      z-index: 0;
      position: relative;
      z-index: 1;
      background: none;
      border-radius: 10px;
    grid-column: span 2;
    margin-bottom: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background: none;
}
.ttp_card{
    padding: 22px 20px !important;
}
.totop_post_tag{
    position: absolute;
    display: flex;
    flex-direction: row;
    justify-content: right;
    align-items: center;
    gap: 3px;
    color: #ff7423;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 5vh;
    background: #ffe7cacf;
    right: 15px;
    top: 24px;
}
.post {
    width: 100%;
      display: grid;
      gap: 20px;
      z-index: 0;
      position: relative;
      z-index: 1;
      background: none;
      border-radius: 10px;
  }
  
  /* 热点卡片样式 */
  .post_card {
      background: rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(10px);
      border-radius: 12px;
      padding: 15px 20px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
  }
  
  /* 卡片头部 */
  .pd_header {
      display: flex;
      align-items: center;
      gap: 0.8rem;
      margin-bottom: 0.8rem;
  }
  
  .pd_header img {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      object-fit: cover;
      user-select: none;
      -webkit-user-drag: none;
  }
  
  .post-info h4 {
      font-size: 1rem;
      color: #2d2f33;
      display: flex;
      flex-direction: row;
      justify-content: left;
      align-items: center;
      gap: 2px;
  }

  .post-info span{
      font-size: 0.7rem;
      color: #ff7423;
      border-radius: 3px;
      padding: 1px 4px;
      background: #ffe7cacf;
  }
  .post-info span:first-child{
    margin-left: 5px !important;
  }
  .post-info span{
    margin-left: 4px;
  }
  
  .post-info p {
      margin: 0.2rem 0 0;
      font-size: 0.85rem;
      color: #6b7280;
      background: none;
  }
  
  /* 内容区域 */
  .top_pd_p {
    color: #374151;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow:hidden;
    margin-bottom: 0.2rem;
    display: grid;
    justify-items: left;
    gap: 8px;
    max-height: 75px;
    text-overflow: ellipsis;
}
  .pd_p {
      color: #374151;
      line-height: 1.6;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow:hidden;
      margin-bottom: 0.2rem;
      display: grid;
      justify-items: left;
      gap: 8px;
      max-height: 75px;
      text-overflow: ellipsis;
      cursor: pointer;
  }
  .pd_p span{
    font-size: 1rem;
  }
  .pd_p_imgbox{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-items: left;
    gap: 10px;
  }
  .pd_p_imgbox img{
    width: 100px;
    height: 100px;
    object-fit: cover;
    transition: all 0.12s ease-in-out 0s;
    cursor: pointer;
  }
  .pd_p_imgbox_atc{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: left;
    gap: 10px;
    max-height: 50px;
    overflow: hidden;
  }
  .pd_p_imgbox_atc img{
    width: 100px;
    height: 50px;
    object-fit: cover;
    transition: all 0.12s ease-in-out 0s;
    cursor: pointer;
  }
  .pd_p img:hover{
    transform: scale(1.05);
  }
  .pdp_detail_imgbox{
    margin-top: 13px !important;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-items: center;
    max-height: none;
  }
  .pdp_detail_imgbox img{
    width: 100%;
    height: 100px;
    box-shadow: 0 0 10px #00000015;
    border-radius: 3px;
  }
  
  /* 底部互动栏 */
  .pd_footer {
      display: flex;
      justify-content: right;
      align-items: center;
      gap: 20px;
      margin-top: 5px;
  }
  
  .pd_footer span{
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      font-size: 0.8rem;
      color: #6b7280;
      cursor: pointer;
  }
  
  .pd_footer span:first-child{
      gap: 3px;
  }
  
  .pd_footer span:nth-child(2){
      gap: 7px;
      margin-left: 3px;
  }
  
  .pd_footer span:nth-child(3){
    gap: 7px;
    margin-left: 1px;
}










/*图片查看器CSS*/
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    z-index: 9999;
    touch-action: none;
}
.viewer-content {
    width: 100%;
    height: 100%;
    position: relative;
}
.main-image {
    max-width: 100%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
    cursor: grab;
}
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    display: none;
}
.close-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.image-counter {
    position: fixed;
    top: 20px;
    left: 30px;
    color: white;
    font-size: 16px;
}





/*PC端发布按钮*/
.post_button {
    background: linear-gradient(140.14deg, #ec750e 15.05%, #d6561f 114.99%)
        padding-box,
      linear-gradient(142.51deg, #ffaa65 8.65%, #af3805 88.82%) border-box;
    border-radius: 7px;
    border: 2px solid transparent;
  
    text-shadow: 1px 1px 1px #00000040;
    box-shadow: 8px 8px 20px 0px #45090059;
    padding: 10px 70px;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-size: 18px;
    font-weight: 500;
    position: fixed;
    bottom: 35px;
    z-index: 8000;
  }
  
  .post_button:hover {
    box-shadow: none;
    opacity: 80%;
}
.post_button:active {
    transform: scale(0.97);
}
  

/*移动端发布按钮*/
.post_btn{
    display: none;
    visibility: hidden;
}







/* wall.css 新增 */
.postbt {
    position: relative;
}

.postbt.loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #ff7423;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}




/* 添加点赞按钮样式 */
.like-btn {
    cursor: pointer;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #8a8a8a;
    transition: color 0.3s ease;
}

.like-btn:hover {
    color: #ff6b6b;
}

.like-btn.liked {
    color: #ff6b6b;
}

.like-btn.liked svg path {
    fill: #ff6b6b;
}

.like-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.like-btn svg {
    width: 18px;
    height: 18px;
}







/*响应式布局*/
@media (max-width: 860px){
    header{
        padding: 0;
        grid-template-columns: 2fr 1fr;
    }
    .logo{
        gap: 10px;
      }
      .logo img{
        margin-left: 15px;
        width: 1.9rem;
      }
      .logo h1{
          font-size: 1em;
      }
      .user_profile_link{
        display: block;
        visibility: visible;
      }
      .header-button a:first-child{
        display: none;
      }
      .header-button a:nth-child(2){
        display: none;
      }
      .header-button a:nth-child(3){
        display: none;
      }
      .header-button a:nth-child(4){
        display: none;
      }
      .header-button button{
        width: 1.9rem;
        height: 1.9rem;
        margin-right: 10px;
      }
      .header-button button img{
        width: 20px;
        height: 20px;
      }
      .user_p{
        display: none;
        visibility: hidden;
      }
      .user_profile_link{
        display: block;
        visibility: visible;
    }
    .wall_cgi{
        gap: 30px;
    }

    /*控件*/
    .wall_container{
        width: 100vw;
        min-width: 320px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 35px;
        background: #fbfbfba1;
        backdrop-filter: blur(10px);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-radius: 4px;
        position: fixed;
        bottom: 0px;
        margin-top: 0;
        z-index: 9995;
        padding: 16px 0;
    }
    .wallcgi_active{
        background: none;
        color: #2b2b2b;
    }
    .wallcgi_btn{
        font-size: 0.9rem;
    }

    /*主要区域*/
    .totop_post{
        margin-top: 60px !important;
    }
    .top_pd_p{
        font-size: 0.96rem;
    }
    section{
        width: 88vw;
        min-width: 350px;
        grid-template-columns: 1fr;
        gap: 13px !important;
    }
    .postbt{
        margin-bottom: 100px !important;
    }
    .ttp_card {
        padding: 15px 16px !important;
    }
    .post{
        height: auto !important;
    }
    .pd_header{
        margin-bottom: 0.6rem;
    }
    .pd_header img{
        width: 42px;
        height: 42px;
    }
    .post-info h4{
        font-size: 0.95rem;
    }
    .post-info span{
        font-size: 0.65rem;
    }
    .post-info p{
        font-size: 0.8rem;
    }
    .pd_p span{
        font-size: 0.96rem;
        margin-bottom: 4px;
    }
    .pd_p{
        font-size: 0.96rem;
    }
    .pd_p_imgbox{
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        margin-bottom: 8px;
    }
    .pd_p_imgbox img{
        width: 100%;
        max-height: 70px;
        height: auto;
        object-fit: cover;
    }
    .pd_p_imgbox_atc img{
        height: 90px;
    }
    .totop_post_tag{
        padding: 3px 9px;
        font-size: 0.65rem;
        top: 16px;
    }
    .totop_post_tag svg{
        width: 11px;
    }
    .pdp_detail_imgbox{
        grid-template-columns: repeat(3, 1fr);
    }

    /*PC端发布按钮*/
    .post_button{
        display: none;
        visibility: hidden;
    }
    /*移动端发布按钮*/
    .post_btn{
        position: fixed;
        right: 12px;
        bottom: 80px;
        display: grid;
        visibility: visible;
        justify-items: center;
        align-items: center;
        background: #ffaf3f;
        box-shadow: 0 2px 10px #ff9b3db7;
        border-radius: 50%;
        z-index: 9990;
        padding: 14px;
    }
}