:root {
    /* 新年色彩主题 */
    --primary-red: #DC143C;
    --primary-gold: #FFD700;
    --primary-orange: #FF8C00;
    --primary-pink: #FFB6C1;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(220, 20, 60, 0.3);
    --text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 50%, rgba(220, 20, 60, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 140, 0, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="%23FFD700" opacity="0.1"/><circle cx="80" cy="40" r="1.5" fill="%23FF8C00" opacity="0.08"/><circle cx="60" cy="80" r="0.8" fill="%23DC143C" opacity="0.12"/><circle cx="90" cy="10" r="1.2" fill="%23FFD700" opacity="0.06"/><circle cx="10" cy="70" r="0.9" fill="%23FF8C00" opacity="0.1"/></svg>');
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1400px;
    padding: 40px 20px;
    position: relative;
}

.title {
    text-align: center;
    background: linear-gradient(45deg, var(--primary-gold), var(--primary-red), var(--primary-orange));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 60px;
    text-shadow: var(--text-shadow);
    animation: titleFloat 4s ease-in-out infinite, gradientShift 6s ease-in-out infinite;
    letter-spacing: 2px;
    position: relative;
}

.title::after {
    content: '🎊✨🎉';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    animation: emojiFloat 3s ease-in-out infinite;
}

.pools-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 40px;
    flex-wrap: wrap;
}

.pool-button {
    position: relative;
    width: 320px;
    height: 420px;
    border-radius: 32px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px var(--shadow-color),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 40px rgba(255, 215, 0, 0.1);
}

.pool-a {
    background:
        linear-gradient(135deg, rgba(220, 20, 60, 0.8), rgba(255, 140, 0, 0.6)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    border: 2px solid rgba(220, 20, 60, 0.3);
}

.pool-a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.pool-b {
    background:
        linear-gradient(135deg, rgba(255, 140, 0, 0.8), rgba(255, 215, 0, 0.6)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    border: 2px solid rgba(255, 140, 0, 0.3);
}

.pool-b::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(220, 20, 60, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite reverse;
}

.pool-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    padding: 30px;
}

.pool-title {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow:
        0 2px 8px rgba(0,0,0,0.5),
        0 0 20px var(--primary-gold);
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-align: center;
}

.pool-icon {
    font-size: 5rem;
    margin-top: 25px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    animation: iconPulse 2s ease-in-out infinite;
}

.pool-button:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow:
        0 25px 60px var(--shadow-color),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 0 60px rgba(255, 215, 0, 0.2);
}

.pool-button:hover .pool-icon {
    animation: iconPulse 1s ease-in-out infinite, iconGlow 0.3s ease-out;
}

.pool-button:active {
    transform: translateY(-8px) scale(0.98);
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-15px) rotate(1deg);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes emojiFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0) rotate(0deg);
    }
    33% {
        transform: translateX(-50%) translateY(-10px) rotate(10deg);
    }
    66% {
        transform: translateX(-50%) translateY(5px) rotate(-10deg);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes iconGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .pools-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        padding: 20px;
    }

    .pool-button {
        width: 280px;
        height: 360px;
    }

    .pool-title {
        font-size: 2.4rem;
    }

    .pool-icon {
        font-size: 4rem;
    }

    .title {
        font-size: 3rem;
        margin-bottom: 40px;
    }

    .modal-content {
        width: 95%;
        padding: 30px 20px;
    }

    .probability-container {
        width: 95%;
        padding: 30px 20px;
    }

    .prize-alert {
        padding: 30px 40px;
    }

    .prize-alert .prize-name {
        font-size: 2.5rem;
    }

    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .card {
        height: 140px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 90%;
    width: 450px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 40px rgba(255, 215, 0, 0.1);
    animation: modalSlideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: modalShimmer 2s ease-in-out infinite;
}

.cards-container {
    width: 800px;
    max-width: 95%;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
}

/* 统一输入组样式 */
.input-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

/* 统一输入框样式 */
#studentName, #studentNameB {
    flex: 1;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 1rem;
    width: 200px;
    height: 20px;
}

#studentName {
    border: 2px solid var(--pool-a-color);
}

#studentNameB {
    border: 2px solid var(--pool-b-color);
}

/* 统一按钮样式 */
#startLottery, #startLotteryB {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 1rem;
    font-weight: bold;
    min-width: 120px;
    height: 48px;
}

#startLottery {
    background: var(--pool-a-color);
}

#startLotteryB {
    background: var(--pool-b-color);
}

#startLottery:hover, #startLotteryB:hover {
    transform: scale(1.05);
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    width: 100%;
    height: 340px;  /* 固定高度 */
    position: relative;
}

/* 卡片样式 */
.card {
    position: relative;
    height: 160px;
    perspective: 1200px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover {
    transform: translateY(-8px);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.card-front {
    background:
        linear-gradient(135deg, var(--primary-red), var(--primary-orange)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-front::before {
    content: '🎁';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    animation: cardSparkle 2s ease-in-out infinite;
}

.card-back {
    background:
        var(--glass-bg),
        linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(220, 20, 60, 0.1));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: rotateY(180deg);
    border: 1px solid var(--glass-border);
    padding: 15px;
    text-align: center;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

@keyframes cardSparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .card {
        height: 120px;
    }
} 


/* 修改确认模态框样式 */
.confirm-container {
    width: 400px;
    padding: 30px;
    text-align: left;
}

.confirm-container h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.confirm-btn,
.cancel-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-btn {
    background-color: #4CAF50;  /* 绿色 */
}

.cancel-btn {
    background-color: #f44336;  /* 红色 */
}

.confirm-btn:hover {
    background-color: #45a049;  /* 深绿色 */
    transform: scale(1.05);
}

.cancel-btn:hover {
    background-color: #da190b;  /* 深红色 */
    transform: scale(1.05);
}

/* 奖品提示框样式 */
.prize-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 40px 60px;
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 40px rgba(255, 215, 0, 0.2);
    text-align: center;
    opacity: 0;
    z-index: 2000;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: alertGlow 2s ease-in-out infinite;
}

.prize-alert.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.prize-alert h2 {
    background: linear-gradient(45deg, var(--primary-gold), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 25px 0;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: var(--text-shadow);
}

.prize-alert .prize-name {
    background: linear-gradient(45deg, var(--primary-red), var(--primary-gold), var(--primary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    font-weight: 800;
    margin: 15px 0;
    text-shadow: var(--text-shadow);
    letter-spacing: 1px;
    animation: prizeGlow 1.5s ease-in-out infinite;
}

@keyframes alertGlow {
    0%, 100% {
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 0 40px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 0 60px rgba(255, 215, 0, 0.4);
    }
}

@keyframes prizeGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
} 

/* B奖池卡片正面样式 */
#cardsBModal .card-front {
    background:
        linear-gradient(135deg, var(--primary-orange), var(--primary-gold)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#cardsBModal .card-front::before {
    content: '🎯';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    animation: cardSparkle 2s ease-in-out infinite;
}

#cardsBModal .card-back {
    background:
        var(--glass-bg),
        linear-gradient(135deg, rgba(255, 140, 0, 0.1), rgba(255, 215, 0, 0.1));
    border: 1px solid var(--glass-border);
}

/* B奖池输入框样式 */
#studentNameB {
    border: 2px solid var(--pool-b-color);
}

#startLotteryB {
    background: var(--pool-b-color);
} 

/* 使用结果提示框样式 */
.result-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: white;
    padding: 30px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    opacity: 0;
    z-index: 2000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.result-alert.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.result-icon {
    font-size: 3rem;
}

.result-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.result-success {
    color: #4CAF50;
}

.result-error {
    color: #f44336;
} 


/* 概率设置样式 */
.probability-container {
    width: 900px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.probability-section {
    margin: 20px 0;
}

.probability-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.probability-item {
    display: grid;
    grid-template-columns: 150px 1fr 60px;
    align-items: center;
    gap: 15px;
}

.probability-slider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.probability-slider:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.probability-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(45deg, var(--primary-gold), var(--primary-red));
    border-radius: 50%;
    cursor: pointer;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.probability-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.3);
}

.probability-value {
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-size: 1.1rem;
}

.probability-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.probability-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.probability-buttons button {
    padding: 15px 30px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#saveProbability {
    background: linear-gradient(45deg, var(--primary-gold), var(--primary-orange));
    color: #333;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

#saveProbability:hover {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-gold));
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(255, 215, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

#resetProbability {
    background: linear-gradient(45deg, var(--primary-red), #ff6b6b);
    color: white;
    border: 1px solid rgba(220, 20, 60, 0.3);
}

#resetProbability:hover {
    background: linear-gradient(45deg, #ff6b6b, var(--primary-red));
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(220, 20, 60, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
} 

/* 修改概率设置样式 */
.probability-container {
    width: 800px;
    max-width: 95%;
    max-height: 80vh;  /* 限制最大高度为视窗高度的80% */
    overflow-y: auto;  /* 允许垂直滚动 */
    padding: 30px;
}

/* 添加B奖池的所有奖品 */
.probability-section:nth-child(2) .probability-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 添加滚动条样式 */
.probability-container::-webkit-scrollbar {
    width: 8px;
}

.probability-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.probability-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.probability-container::-webkit-scrollbar-thumb:hover {
    background: #555;
    border-radius: 4px;
} 

/* 添加洗牌动画样式 */
@keyframes shuffle {
    0% {
        transform: translateX(0) rotate(0);
    }
    25% {
        transform: translateX(20px) rotate(5deg);
    }
    50% {
        transform: translateX(-20px) rotate(-5deg);
    }
    75% {
        transform: translateX(20px) rotate(5deg);
    }
    100% {
        transform: translateX(0) rotate(0);
    }
}

.shuffling .card {
    animation: shuffle 0.5s ease-in-out;
}

.shuffling .card:nth-child(2n) {
    animation-delay: 0.1s;
}

.shuffling .card:nth-child(3n) {
    animation-delay: 0.2s;
}

.shuffling .card:nth-child(4n) {
    animation-delay: 0.3s;
}

.shuffling .card:nth-child(5n) {
    animation-delay: 0.4s;
} 

/* 添加洗牌动画相关样式 */
.card.shuffling {
    position: absolute;
    width: calc(20% - 15px);  /* 保持与网格布局时相同的宽度 */
    height: 150px;
    margin: 0;
    transition: all 0.3s ease;
    transform-origin: center center;
}

/* 洗牌时的网格样式 */
.cards-grid.shuffling {
    display: block;
    height: 340px;  /* 与正常状态保持相同高度 */
    width: 100%;
    position: relative;
}

/* 动画结束后恢复网格布局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 20px;
}
