* {
    box-sizing: border-box;
    font-family: "PingFang SC",Arial,Microsoft YaHei,Helvetica;
}
/*让选中元素背景变黄色*/
::selection{
    background-color: #fff12f;
}

body {
    background-color: #333;
    color: white;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 顶部盒子 */
.header-box {
    width: 100%;
    height: 270px;
    background-color: rgba(0, 0, 0, 1.0);
    background-image: url('https://picsum.photos/1206/250');
    background-size: cover;
    background-position: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 5px;
    position: relative; /* 添加相对定位，以便伪元素相对于它定位 */
}

/* 添加半透明遮罩 */
.header-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 纯黑色半透明遮罩 */
}

.header-box > * {
    z-index: 1; /* 确保子元素显示在遮罩之上 */
}

.logo {
    font-size: 32px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 4px;
}

.site-description {
    font-size: 16px;
    margin-top: 10px;
    line-height: 1.5;
    width: calc(100% - 20px);
}

/* 超级链接幽灵按钮 */
.ghost-button {
    display: inline-block;
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 8px 12px;
    margin: 25px 0 0;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.ghost-button:hover {
    color: #fff12f;
    border: 1px solid #fff12f;
    background-color: rgba(0, 0, 0, 0.5);
}
/*腾讯公益公式*/
.gongyi {
    font-size: 14px;
    padding-bottom: 20px;
}
.gongyi a{
    color: #fff;
}
/* 中部筛选组件 */
.filter-container {
    overflow-x: auto;
    white-space: nowrap;
    background-color: #444;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 1;
    width: 1206px;
}

.filter-button {
    display: inline-block;
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 5px;
}
.filter-button:hover {
    color: #fff12f;
}


/* 选中状态的样式 */
.filter-button.selected {
    background-color: #fff12f;
    color: black;
}

/* 中部字体列表组件 */
.font-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0px;
    width: 1206px;
}

.font-item {
    width: calc(50% - 6px);
    margin: 16px 0px 0px 0;
    background-color: #444;
    aspect-ratio: 96 / 15;
    position: relative;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    border: solid 1px #6a6a6a;
    background-size: 100%;
    transition: all 0.2s ease;
}
.font-item:hover{
    border: solid 1px #fff12f;
    /*background-size: 104%;*/
    background-position: -3px ;
    box-shadow: 0px 0px 15px 1px #fff12f  inset;
}

.font-name {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

/* 字体风格标题 */
.font-style-title {
    width: 100%;
    text-align: center;
    font-size: 24px;
    margin:0px;
    padding-top: 60px;
    position: relative;
}
.font-style-title:before{
    content: "wangzhanyunying.com/ziti";
    position: absolute;
    width: auto;
    color: #656565;
    height: auto; 
    letter-spacing: 4px;
    text-align: center;
    font-weight: 100;
    font-size: 12px;
    top: 30px;
    transform: translate(-50%);
    left: 50%;
    border-bottom: 2px solid #4a4a4a;
}

/* 底部捐赠按钮组件 */
.donate-button {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FF5722;
    color: white;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    border-radius: 5px;
    z-index: 2;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.time-icon{
    display: inline-block;
    width: 28px;
    height: 20px;
    background-image: url(../imgs/time.png);
    background-repeat: no-repeat;
    background-size: auto 100%;
    text-indent: 35px;
}
.donate-button:hover{
    background-color: #cc0f0f;
}

/* 网页最底部信息 */
.footer_top{
    background-color: #222;
    margin-top: 50px;
    width: 100%;
}
.footer {
    background-color: #222;
    width: 1206px;
    margin: 20px auto 0px auto;
    display: flex;
    flex-wrap: wrap;
    color: #888;
    justify-content: space-between;
}

.footer .website-intro {
    text-align: justify;
    width: 35%;
}

.footer .latest-fonts {
    text-align: left;
}

.footer .font-count {
    text-align: left;
}

.footer .wechat-qrcode {
    text-align: left;
    width: 30%;
}

.footer .copyright {
    font-size: 12px;
    background-color: #000;
    width: 100%;
    margin: 20px 0 25px;
    padding: 5px 10px;
}
.copyright p{
    margin: 5px 0;
}
.footer h3 {
    margin: 0 0px 20px;
    padding: 0;
    font-size: 18px;
}
.footer #font-count{
    display: block;
    font-size: 50px;
    height: 50px;
    line-height: 50px;
    font-weight: bold;
    position: relative;
}
.footer #font-count:before{
    content: "款";
    font-size: 12px;
    position: absolute;
    left: 90px;
    bottom: 0;
    line-height: 22px;
}

.footer img {
    width: 1080px;
    height: 394px;
    max-width: 100%;
    height: auto;
}
.footer ul{
    margin: 0;
    padding: 0;
    color: #888;
}
.footer li{
    list-style: none;
    text-indent: 0;
    margin: 0;
    font-size: 14px;
}
.footer a{
    text-decoration: none;
    color: #888;
}
.footer a:hover{
    text-decoration: underline;
}
.footer .info{
    font-size: 12px;
}
.footer .tips{
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 1206px) {
    .filter-container,
    .font-list,
    .footer {
        width: 94%;
    }
}
/*ipad pro*/
@media (max-width: 1024px) {
    .font-name{
        font-size: 14px;
        bottom: 6px;
        padding: 2px 5px;
    }
}


@media (max-width: 768px) {
    .font-item {
        width: 100%;
        margin: 6px auto;
    }
    .header-box{
        height: 210px;
    }
    .logo{
        font-size: 20px;
    }
    .logo img{
        width: 24px;
        height: 24px;
    }
    .site-description{
        font-size: 14px;
        width: 90%;
    }
    .ghost-button{
        font-size: 10px;
        margin: 20px 0 0;
        padding: 6px 10px;
        /*display: none;*/
    }
    .gongyi a{
        font-size: 10px;
    }
    .font-style-title{
        font-size: 18px;
    }
    .font-style-title:before{
        margin-top: 8px;
        font-size: 10px;
    }
    .font-name{
        font-size: 12px;
        bottom: 5px;
        padding: 2px 5px;
    }
    .donate-button{
        padding: 15px 20px;
        font-size: 14px;
        width: 94%;
    }
    /*版权部分*/
    .footer .website-intro{
        width: 100%;
        margin-bottom: 20px;
    }
    .footer .latest-fonts{
        width: 50%;
        margin-bottom: 20px;
    }
    .footer .font-count{
        width: 40%;
        margin-bottom: 20px;
    }
    .footer .wechat-qrcode{
        width: 100%;
        margin-top: 12px;
    }

    .footer .copyright {
        width: 100%;
        margin-bottom: 80px;
        font-size: 10px;
    }
    .footer li{
        font-size: 12px;
    }
    .footer .tips{
        text-align: left;
    }
    .footer h3{
        font-size: 20px;
        margin-bottom: 10px;
    }
}

/* 新增到顶部和到底部组件样式 */
.scroll-buttons {
    position: fixed;
    bottom: 90px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #444;
    padding: 8px;
    z-index: 2;
    border: 1px solid #000;
}

.scroll-button {
    background-color: #555;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    width: 30px;
    height: 30px;
    text-align: center;
    font-family: "PingFang SC",Arial,Microsoft YaHei,Helvetica;
    padding: 0;
    margin: 0;
    text-indent: 0;
}
.scroll-button:hover{
    background-color: #fff12f;
    color: black;
}
