/* 活动组件样式 - activity-widget.css */

/* 基础容器样式 */
.activity-widget {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}

/* 卡片样式（核心修改：替换为50期侧边动画） */
.flip-card {
    perspective: 1000px;
    cursor: pointer;
    width: clamp(180px, 20vw, 220px);
    height: clamp(180px, 20vw, 220px);
    margin: 0;
    padding: 0;
}

/* 卡片内层（应用复杂翻转动画） */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d; /* 保持3D空间 */
    transition: transform .5s ease-in-out; /* 复用50期侧边过渡效果 */
    -webkit-transform-style: preserve-3d;
    -webkit-transition: transform .5s ease-in-out;
    animation: turnOut_actSpTips linear infinite 3.8s; /* 应用50期侧边动画 */
    -webkit-animation: turnOut_actSpTips linear infinite 3.8s;
}

/* 正面和背面样式（适配50期侧边动画逻辑） */
.flip-card-front, .flip-card-back {
    backface-visibility: hidden; /* 隐藏背面 */
    -webkit-backface-visibility: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* 正面初始状态 */
.flip-card-front {
    z-index: 2;
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
}

/* 背面初始状态（翻转180度） */
.flip-card-back {
    z-index: 1;
    transform: rotateY(-180deg);
    -webkit-transform: rotateY(-180deg);
}

/* 50期侧边复杂翻转动画关键帧（核心提取） */
@-webkit-keyframes turnOut_actSpTips {
    0% {
        transform: rotateY(0deg);
        -webkit-transform: rotateY(0deg);
    }
    10% {
        transform: rotateY(-180deg);
        -webkit-transform: rotateY(-180deg);
    }
    50% {
        transform: rotateY(-180deg);
        -webkit-transform: rotateY(-180deg);
    }
    60% {
        transform: rotateY(-360deg);
        -webkit-transform: rotateY(-360deg);
    }
    100% {
        transform: rotateY(-360deg);
        -webkit-transform: rotateY(-360deg);
    }
}
@keyframes turnOut_actSpTips {
    0% {
        transform: rotateY(0deg);
    }
    10% {
        transform: rotateY(-180deg);
    }
    50% {
        transform: rotateY(-180deg);
    }
    60% {
        transform: rotateY(-360deg);
    }
    100% {
        transform: rotateY(-360deg);
    }
}

/* 倒计时样式（保持不变） */
.countdown-container {
    margin-top: 10px;
    width: 100%;
    text-align: center;
    background: linear-gradient(90deg, #FF9933 0%, #FF3333 100%);
    border-radius: 20px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    box-sizing: border-box;
}

#countdown {
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

#countdown i {
    margin-right: 5px;
}

/* 关闭按钮（保持不变） */
.close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
    width: 28px;
    height: 28px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(0,0,0,0.7);
    transform: rotate(90deg);
}

/* 重新显示按钮（保持不变） */
.show-again-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(255, 107, 53, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
}

.show-again-btn.active {
    opacity: 1;
    visibility: visible;
}

.show-again-btn:hover {
    background-color: rgba(255, 107, 53, 1);
    transform: translateY(-2px);
}

/* 移动设备适配（保持不变） */
@media (max-width: 768px) {
    .activity-widget {
        left: 10px;
        bottom: 10px;
    }
    
    .flip-card {
        width: clamp(140px, 50vw, 180px);
        height: clamp(140px, 50vw, 180px);
    }
    
    .close-btn {
        top: -8px;
        right: -8px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .show-again-btn {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 14px;
    }
    
    #countdown span {
        font-size: 12px;
    }
}