* {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: unset;
}

body.no-scroll {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

.card-wrap {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.card-modal {
    position: relative;
    transition: all 0.7s;
    transform: scale(0);
    opacity: 0;
}

.card-title {
    font-size: 60px;
    font-weight: bold;
    color: #dfcb90;
    text-align: center;
}

.card-title p {
    /* 使用线性渐变作为背景 */
    background: linear-gradient(90deg, #dfcb90 25%, #ffd700 50%, #dfcb90 75%);
    background-size: 200% 100%;
    /* 将背景裁剪到文字 */
    -webkit-background-clip: text;
    background-clip: text;
    /* 让文字透明，显示背景 */
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

.new-title {
    display: none;
}

.card {
    display: flex;
    width: 600px;
    margin: 8% auto 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
}

.card .card-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28%;
    aspect-ratio: 90 / 113;
    border-radius: 7%;
    perspective: 1000px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7%;
}

.card-front {
    background-image: url('/skin/images/card/card-bg.webp');
    background-size: cover;
    background-position: center;
}

.card-back {
    display: flex;
    /* background: linear-gradient(to bottom right, #ffd700, #ffb830); */
    transform: rotateY(180deg);
    flex-wrap: wrap;
    align-content: center;
    box-sizing: border-box;
}

.card-item.flipped {
    transform: rotateY(180deg);
    /* 添加scale变量 */
    transition: all 0.5s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* 合并过渡效果 */
}


.card .card-item:nth-of-type(n+4) {
    margin-top: 6%;
}

.card-front p {
    color: #fef3c7;
    font-size: 36px;
    font-weight: bold;
    font-style: oblique;
}

.awards {
    width: 100%;
    text-align: center;
    height: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #FFF;
    font-size: 40px;
    font-weight: bold;
}

.coupons {
    position: relative;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 7%;
}

.coupons img {
    width: 100%;
}

.coupons img:nth-of-type(2) {
    position: absolute;
    top: 5%;
    width: 80%;
}

.coupons-intro {
    position: absolute;
    top: 37%;
    width: 88%;
    clip-path: inset(0 100% 0 0);
}

.coupons-intro img {
    width: 100%;
    display: block;
}

.coupons-intro p {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8px;
    top: 0;
    left: 0;
    text-align: center;
    width: 100%;
    height: 100%;
    line-height: 100%;
    color: #fff;
    white-space: nowrap;
}

.coupouns-mail {
    position: absolute;
    bottom: -15%;
    opacity: 0;
    width: 84%;
    z-index: 2;
}

.coupouns-mail img:nth-of-type(2) {
    width: 91%;
    top: 7%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.coupouns-mail img:nth-of-type(3) {
    width: 78%;
    position: absolute;
    bottom: 22%;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    animation-fill-mode: both;
}


/* 定义果冻跳动动画 */
@keyframes jelly-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-15px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(-10px);
    }
}


.card .card-item {
    animation: none;
    /* 初始不应用动画 */
}

.card .card-item.bouncing {
    animation: jelly-bounce 1.3s ease-in-out 1;
}


.card-tips {
    position: absolute;
    bottom: -8%;
    left: 0%;
    width: 100%;
    text-align: center;
    font-size: 18px;
    color: #fff;
}

.bounce-button {
    position: absolute;
    bottom: 26%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    padding: 3px 8px;
    background: #ffffff;
    border-radius: 30px;
    text-decoration: none;
    color: #ff8400;
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    z-index: 3;
    box-shadow: 0px 3px 0px 0px #d1a749;
    opacity: 0;
    transition: all 0.3s ease;
}


.bounce-button span {
    display: inline-block;
    /* animation: bounce-up 2s ease-in-out infinite; */
    position: relative;
    z-index: 2;
    padding: 0 0.5px;

}

@keyframes button-press {

    0%,
    100% {
        transform: translateX(-50%);
        box-shadow: 0px 3px 0px 0px #d1a749;
    }

    50% {
        transform: translateX(-50%) scale(0.95);
        box-shadow: 0px 1px 0px 0px #d1a749;
    }
}

.bounce-button.animate {
    animation: button-press 0.5s ease;
}

@keyframes span-press {

    0%,
    100% {
        transform: scale(1);
        padding: 0 0.5px;
    }

    50% {
        transform: scale(0.9);
        padding: 0;
    }
}

.bounce-button span.animate {
    animation: span-press 0.5s ease;
}

.coupons-400 {
    animation-fill-mode: both;
    opacity: 0;
    transform: scale(0.4);
}

.coupouns-mail .hand-image {
    position: absolute;
    bottom: 17%;
    left: 70%;
    width: 20px;
    z-index: 5;
    transform: rotate(-20deg);
    opacity: 0;
}

/* 定义手按下动画 */
@keyframes hand-press {

    0%,
    100% {
        transform: rotate(-20deg) scale(1);
    }

    50% {
        transform: rotate(-20deg) scale(0.8);
        /* 模拟按下向下移动 */
    }
}

.hand-image.animate {
    animation: hand-press 0.5s ease;
    /* 动画时长 0.5 秒 */
}

@keyframes scaleShow {
    0% {
        opacity: 0;
        transform: scale(0.4);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.scaleShow {
    animation: scaleShow 0.6s ease-out forwards;
}

@keyframes revealFromLeft {
    0% {
        clip-path: inset(0 100% 0 0);
        /* 初始状态：右侧完全裁剪（不可见） */
    }

    100% {
        clip-path: inset(0 0 0 0);
        /* 结束状态：完全显示 */
    }
}

.reveal-left {
    animation: revealFromLeft 0.2s linear forwards;
}

@keyframes moveUp {
    0% {
        bottom: 22%;
    }

    100% {
        bottom: 40%;
    }
}

.moveUp {
    animation: moveUp 0.7s linear forwards;
}

@keyframes moveUp2 {
    0% {
        bottom: -15%;
        opacity: 0;
    }

    100% {
        bottom: 5%;
        opacity: 1;
    }
}

.moveUp2 {
    animation: moveUp2 1s linear forwards;
}


.show-button {
    opacity: 1 !important;
    transition: opacity 0.5s ease;
}

.show-hand {
    opacity: 1 !important;
    transition: opacity 0.5s ease;
}

.moveUp2,
.moveUp,
.scaleShow,
.reveal-left {
    will-change: transform, opacity;
}

.card-close {
    position: absolute;
    top: 14%;
    right: -6%;
    width: 50px;
    z-index: 5;
    cursor: pointer;
}

.card-close img {
    display: block;
    width: 100%;
}

/* 闪光扫过效果 */
.card-item.highlight-card {
    position: relative;
    overflow: hidden;
}

.card-item.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(25deg);
    animation: glow-animation 5s infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes glow-animation {
    0% {
        left: -100%;
    }

    20% {
        left: -100%;
    }

    40% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

/* 倒计时样式 */
.countdown-container {
    position: absolute;
    top: 53%;

    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.countdown-container.ready {
    opacity: 1;
    transform: scale(1);
}

#countdown-container1 {
    left: 10%;
}

#countdown-container2 {
    right: 10%;
}


.countdown {
    position: relative;
    background-color: #2d2d44;
    border-radius: 12px;
    padding: 1vw;
    display: inline-block;
    border: 2px solid transparent;
    background-clip: padding-box;
    animation: glow 1s infinite alternate;
}

.countdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    background: linear-gradient(45deg,
            #ffdf00,
            #ffaa00,
            #ffdf00,
            #ffaa00) border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotate 3s linear infinite;
}

.seconds {
    font-size: 2vw;
    font-weight: bold;
    color: white;
}

.message {
    color: #FFC107;
    margin-top: 10px;
    font-size: 1.4vw;
    font-weight: 500;
}


/* 动画效果 */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5),
            0 0 10px rgba(255, 215, 0, 0.3);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.8),
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 30px rgba(255, 215, 0, 0.4);
    }
}

/* 新增红色光圈动画 */
@keyframes glow-red {
    0% {
        box-shadow: 0 0 5px rgba(230, 57, 70, 0.5),
                    0 0 10px rgba(230, 57, 70, 0.3);
    }
    100% {
        box-shadow: 0 0 10px rgba(230, 57, 70, 0.8),
                    0 0 20px rgba(230, 57, 70, 0.6),
                    0 0 30px rgba(230, 57, 70, 0.4);
    }
}

/* 红色光圈类 */
.countdown.red-glow {
    animation: glow-red 0.5s infinite alternate !important;
}

@keyframes rotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes flash {

    0%,
    100% {
        background-color: rgba(230, 57, 70, 0.2);
        color: #E63946;
    }

    50% {
        background-color: rgba(230, 57, 70, 0.6);
        color: white;
    }
}

@keyframes warning {
    from {
        color: #FFC107;
    }

    to {
        color: #E63946;
    }
}

.number-pulse {
    animation: pulse 0.5s ease-in-out;
}

.countdown-end {
    animation: flash 0.3s ease-in-out 5;
}

.warning {
    animation: warning 1s ease-in-out infinite alternate;
}


/* 大屏幕适配 (1400px以下) */
@media screen and (max-width:1400px) {
    .card {
        width: 80%;
        /* 改用百分比宽度 */
        margin-top: 5%;
    }

    .card-title {
        font-size: 50px;
    }

    .card-front p {
        font-size: 32px;
    }

    .awards {
        font-size: 36px;
    }
}

@media screen and (max-width:1024px) {
    .card-title {
        font-size: 40px;
    }

    #countdown-container1 {
        left: 4%;
    }

    #countdown-container2 {
        right: 4%;
    }


}

/* 平板横屏适配 (768px以下) */
@media screen and (max-width:768px) {
    .card {
        width: 90%;
    }

    .card .card-item:nth-of-type(n+4) {
        /* 调整换行位置 */
        margin-top: 6%;
    }

    .card-modal {
        margin-top: 5%;
    }

    .card-title {
        font-size: 40px;
    }

    .card-tips {
        font-size: 16px;
        bottom: -10%;
    }

    .card-close {
        right: -4%;
    }

    .bounce-button {
        font-size: 12px;
        padding: 2px 6px;
    }

    #countdown-container1 {
        width: 60%;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    #countdown-container1 .countdown {
        width: 100%;
        box-sizing: border-box;
    }

    #countdown-container2 {
        display: none;
    }

    .seconds {
        font-size: 1rem;
    }

    .message {
        font-size: 0.9rem;
    }
}

/* 手机横屏适配 (425px以下) */
@media screen and (max-width:425px) {
    .card {
        margin-top: 8%;
    }

    .card .card-item:nth-of-type(n+4) {
        margin-top: 8%;
    }

    .card-modal {
        width: 95%;
        margin-top: -5%;
    }

    .card-title {
        font-size: 8vw;
    }

    .card-modal .new-title {
        margin-bottom: 24%;
    }

    .card-front p {
        font-size: 28px;
    }

    .awards {
        font-size: 32px;

    }

    .card-tips {
        font-size: 14px;
        bottom: -22%;
    }

    .coupons-intro p {
        font-size: 1.2vw;
        line-height: unset;
        font-weight: bold;
    }

    .bounce-button {
        font-size: 2vw;
        padding: 2% 6%;
        box-shadow: 0px 2px 0px 0px #d1a749;
    }

    .coupouns-mail .hand-image {
        width: 13px;
    }

    .card-close {
        top: 20%;
        right: 0%;
        width: 30px;
    }

    #countdown-container1 {
        width: 88%;
        top: 8%;
    }

    .seconds {
        font-size: 6vw;
    }
    
    .message {
        margin-top: 0;
        font-size: 5.5vw;
    }

}