.card-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    background-color: #f0f8ff; /* 使用柔和的背景色 */
}

.card-grid-container {
    perspective: 1000px; /* 為了3D翻轉效果 */
    margin: 30px 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 的網格 */
    gap: 20px;
    width: 280px;
}

.card {
    width: 130px;
    height: 180px;
    background-color: transparent;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 15px;
}

.card.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    border: 3px solid white;
}

.card-front {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    color: white;
    font-size: 80px;
}

.card-back {
    background-color: #ffffff;
    color: #333;
    transform: rotateY(180deg);
}

.card-back img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.card-back p {
    font-weight: bold;
    font-size: 1.1em;
}

#draw-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.cooldown-text {
    margin-top: 15px;
    font-weight: bold;
    color: #ff6347;
}