html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
}

a:link {
    text-decoration: none; 
}

.navbar {
    position: fixed;
    width: 100%;
    transition: all 0.4s ease;
    z-index: 9;
}

.navbar-side {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 0.1em 0;
    margin: 0 1%;
    border-width: 1px;
    border-bottom: solid 1px #ffffffa2;
    height: 45px;
}

.navbar-side a {
    color: white;
}

.navbar-side a:hover {
    color: #e73749eb;
}

.navbar-side a:hover .dropdown-menu {
    visibility: visible;
}

.navbar-side .nav-logo {
    align-self: center;
}

.navbar-side .nav-logo img {
    display: block;
}

.navbar-side .list {
    width: 100%;
}

.navbar-side .list li:hover .dropdown-menu {
    visibility: visible;
}

.navbar-side ul {
    margin: 0;
    text-align: end;
}

.navbar-side li {
    display: inline-block;
    margin: 0 0 0 1.5%;
}

.navbar-side .listb {
    position: static;
}

.navbar-side .dropdown-menu {
    visibility: hidden;
    position: absolute;
    display: flex;
    flex-direction: column;
    padding: 2px;
    background: #ffffff;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.1);
    border-radius: 3%;
    overflow: hidden;
    width: 9em;
}

.navbar-side .dropdown-menu a {
    color: #0E074E;
}

.navbar-side .dropdown-menu li {
    margin: 0;
    padding: 0.4em 1em;
    border-bottom: solid 1px #e7e8eb;
    text-align: center;
}

.navbar-side .dropdown-menu li:last-child {
    border-bottom: none;
}

.navbar-side .dropdown-menu li:hover {
    padding-right: 10px;
    transition: all 0.2s;
    background-color: #F8F9FA;
}

.navbar-side .dropdown-menu li:hover a {
    color: #e73749eb;
}

.navbar-side .button-solid {
    border: solid 1px #e73749eb;
    border-radius: 3em;
    background: #e73749eb;
    padding: 5px 10px;
}

.navbar-side .button-solid img {
    vertical-align: middle;
}

.navbar-side .button-solid:hover {
    border-color: #e73749eb;
    background: #c72e3deb;
    color: #ffffff;
}

.navbar.scrolled {
    background-color: #0E074E;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .navbar-side {
    border-bottom: none;
    height: 40px;
    transition: all 0.4s ease;
}

.hero {
    width: 100%;
    height: 100vh;
    background: url('../images/bg/hero2025-1.webp') no-repeat center/cover transparent;
}

.products {
    background: url("../images/bg/bg-01.webp") no-repeat right top 20%/27% auto,
                url("../images/bg/bg-02.webp") no-repeat center top 80%/100% auto,
                url("../images/bg/bg-04.webp") no-repeat right bottom/52% auto;
    padding-bottom: 5%;
}

.products-1, .products-2, .products-3, .products-4 {
    max-width: 800px;
    margin: 0 auto 4em auto;
    padding: 0 1em;
    background-color: hsla(0, 0%, 100%, 0.6);
}

.products-1 h1, .products-2 h1, .products-3 h1, .products-4 h1 {
    font-size: clamp(1.4em, 5vw, 2em);
    display: inline;
    font-weight: 400;
    color: #0E074E;
}

.products-1 h1::after, .products-2 h1::after, .products-3 h1::after, .products-4 h1::after {
    content: " |";
    color: #ccccccff;
}

.products-1 a, .products-2 a, .products-3 a, .products-4 a {
    color: #ccccccff;
    transition: all 0.2s;
}

.products-1 a:hover, .products-2 a:hover, .products-3 a:hover, .products-4 a:hover {
    color: #e73749eb;
    padding-left: 3px;
}

.poster {
    position: relative;
    overflow: hidden;
    border: solid 2px #ccccccff;
    border-radius: 20px;
    margin: 1.5% auto;
}

.poster:hover {
    border: solid 2px #e73749eb;
    box-shadow: 3px 1px 5px 0px rgba(0,0,0,0.3); 
}

.poster:hover .post-overlay {
    bottom: 0%;
}

.poster-bg {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.2s ease;
}

.poster:hover .poster-bg {
    transform: scale(1.03);
}

.post-overlay {
    position: absolute;
    bottom: -50%;
    width: 100%;
    height: 6em;
    color: #e7e8eb;
    background: linear-gradient(180deg, rgb(0 0 0/0%) 39%, rgb(0 0 0/60%) 96%);
    padding-top: 2.5em;
    transition: all 0.2s ease;
}

.post-overlay h3 {
    text-align: center;
    font-weight: 400;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    align-self: center;
    justify-content: center;
    transform: translate(-50%, -50%); 
    transition: all 0.3s ease;
    opacity: 0.8;
    background: url("../images/icon/icon-play-ex.png") no-repeat center/contain;
    width: 20%;
    padding-bottom: 20%; 
}

#gallery {
    background: url("../images/bg/bg-gray-02-ex.svg") no-repeat top right/100%,
                linear-gradient(45deg, #151058, #b0e2f4ff);
    min-height: 100vh;
}

#gallery .container {
    max-width: 1400px;
    margin: 0 auto;
}

#gallery .container .head {
    padding: 2em 0 0;
    text-align: center;
}

#gallery .container .head h1 {
    font-size: 6vw;
    font-size: clamp(4em, 6vw, 8em);
    display: inline;
    font-weight: 500;
    line-height: 1.2;
    color: #ffffff;
    background: linear-gradient(to bottom, #D63449, hsla(352, 66%, 52%,0));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#gallery .container .head .filter-group {
    margin: 1em 0;
}

#gallery .container .head .filter-group button {
    font-size: medium;
    padding: 0.3em 0.8em;
    margin: 0 0.2em;
    background-color: hsla(0, 0%, 100%, 0);
    border: 2px;
    border-bottom: solid 2px hsla(0, 0%, 100%, 0);
    color: rgb(0, 0, 0);
}

#gallery .container .head .filter-group button:hover {
    color: #ffffff;
    border-bottom: solid 2px #ffffff;
}

#gallery .container .head .filter-group button.active {
    color: #D63449;
    border-bottom: solid 2px #D63449;
}

#gallery .container .items {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    padding: 1%;
    padding-bottom: 6em;
    gap: 5vw 1.5%;
    /* 移动端回退方案 */
    margin: -2.5vw -0.7%;
}

#gallery .container .element-item {
    flex: 1 20%;
    border-radius: 0.3em;
    border: solid 1px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    box-shadow: 2px 2px 5px 1px rgba(0,0,0,0.1);
    opacity: 1;
    transition: all 0.3s ease;
    /* 为每个子项添加margin来模拟gap */
    margin: 2.5vw 0.7%;
    
    /* 确保在现代浏览器中不使用margin */
    @supports (gap: 5vw 1.5%) {
        margin: 0;
    }
}

#gallery .container .element-item:hover {
    border: solid 1px #D63449;
    transform: translate(0, -5px);
}

#gallery .container i {
    flex: 1 20%;
    border: solid 10px;
    visibility: hidden;
}

#gallery .container .element-item img {
    display: block;
    width: 100%;
}

#gallery .container .element-item .card {
    position: relative;
}

#gallery .container .element-item .card .card-title {
    position: absolute;
    top: 70%;
    bottom: 0;
    width: 100%;
    background: linear-gradient(180deg, rgb(0 0 0/0%) 39%, rgb(0 0 0/60%) 96%);
    transform: translate(0, 100%); 
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}


#gallery .container .element-item .card .card-title p {
    font-size: small;
    color: #e7e8eb;
    margin:0.3em 0.8em;
}


#gallery .container .element-item .card .play-button {
    opacity: 0;
    width:30%;
    padding-bottom: 30%;
}

#gallery .container .element-item:hover .play-button {
    opacity: 1;
}

#gallery .container .element-item:hover .card-title {
    transform: translate(0, 0%); 
}

.filter-group button.active {
    color: #ffffff;
    background-color: #D63449;
    border: solid 1px #D63449;
}

.element-item.hidden {
    display: none;
}

.element-item:not(.hidden) {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

footer {
    width: 100%;
    background-color: #0E074E;
    color: white;
}

footer .contact {
    padding: 0 1% 3em;
    display: flex;
}

footer .contact .directions {
    flex: 1;
}

footer .contact .directions h1 {
    font-size: 2em;
    font-weight: 400;
}

footer .contact .directions p {
    color: hsla(0, 0%, 100%, 0.6);
}

footer .contact .directions div {
    padding: 0 1% 0;
}

footer .contact .directions div:first-child {
    max-width: 500px;
}

footer .contact .details {
    flex: 1;
    display: flex;
}

footer .contact .details .qq-phone {
    flex: 1 40%;
    margin-top: 2em;
}

footer .contact .details .qq-phone > div {
    margin-bottom: 1em;
}

footer .contact .details .qq-phone img {
    vertical-align: middle;
    margin-bottom: 7px;
    margin-right: 0.5em;
}

footer .contact .details .qq-phone .button {
    display: inline-block;
    font-size: 1.5em;
    color: white;
    background-color: hsla(0, 0%, 100%, 0.2);
    border: solid 1px hsla(0, 0%, 100%, 0.3);
    border-radius: 1em;
    padding: 0em 0.5em 0.1em;
}

footer .contact .details .qq-phone .button:hover {
    background-color: hsl(352, 66%, 52%);
    border: solid 1px hsla(347, 80%, 90%, 0.6);
    box-shadow: 1px 1px 8px 3px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

footer .contact .details .QRcode {
    flex: 1 40%;
}

footer .contact .details .QRcode > div {
    display: inline-block;
    background-color: hsla(0, 0%, 100%, 0.2);
    border: solid 1px hsla(0, 0%, 100%, 0.3);
    text-align: center;
    margin-top: 1em;
    padding: 0.5em;
}

footer .contact .details .QRcode img {
    background-color: white;
    width: 100%;
}

footer .copyright {
    color: #c0c2c3ef;
    padding: 0.5%;
}

footer .copyright > div {
    display: flex;
    width: 100%;
    border-top: solid 1px hsla(0, 0%, 100%, 0.3);
    justify-content: space-between;
}

footer .copyright > div a {
    color: #9a9c9c;
}

footer .copyright > div:last-child {
    text-align: end;
}

footer .copyright > div:last-child a {
    color: #c0c2c3ef;
}

@media (max-width: 768px) {
    .products-1 a, .products-2 a, .products-3 a, .products-4 a {
        font-size: small;
    }
    #gallery .container .element-item {
        flex: 1 30%;
    }
    #gallery .container i {
    flex: 1 30%;
    }
    footer .contact {
        flex-direction: column;
    }
    
    footer .contact .details {
        flex-direction: column;
    }
    
    footer .contact .details .qq-phone {
        margin: 0 0 0 1em;
    }
    
    footer .contact .details .qq-phone > div {
        margin-bottom: 0.5em;
    }
    
    footer .contact .details .qq-phone img {
        width: 2em;
    }
    
    footer .contact .details .QRcode > div {
        margin: 0.5em 1em 2em;
    }
}

@media (max-width: 576px) {
    .nav-logo img {
        max-width: 80px;
    }
    
    .navbar-side .listb {
        display: none;
        visibility: hidden;
    }
    
    .hero {
        height: 70vh;
    }
    
    .products-1 {
        padding: 0 20px;
    }
    
    #gallery .container .element-item {
        flex: 1 40%;
    }
    #gallery .container i {
    flex: 1 40%;
    }
    .copyright {
        font-size: small;
    }
}