body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-image: url('images/phone.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    text-align: center;
    background: rgba(0, 0, 0, 0.75);
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
    border: 1px solid #d4af37;
    max-width: 90%;
    width: 100%;
    box-sizing: border-box;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 15px 0;
    perspective: 1000px;
    gap: 10px;
}

.selected-cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
    min-height: 150px;
    gap: 10px;
}

.card {
    width: 75px;
    height: 135px;
    background-image: url('images/back.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: transform 0.6s, opacity 0.5s;
    transform-style: preserve-3d;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.card.flip {
    transform: rotateY(180deg);
}

.hidden {
    display: none;
}

.grouped {
    margin: 5px;
    transition: transform 0.5s, opacity 0.5s;
    z-index: 1;
}

#continueButton {
    padding: 12px 25px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(to bottom, #d4af37, #b89735);
    color: #2c2c2c;
    border: none;
    border-radius: 6px;
    transition: all 0.4s;
    opacity: 0;
    margin-top: 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

#continueButton.visible {
    opacity: 1;
    transform: translateY(0);
}

#continueButton:hover {
    background: linear-gradient(to bottom, #c9a634, #a8862d);
    transform: translateY(-2px);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.4);
}

#continueButton:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#chooseCardsTitle {
    transition: opacity 0.4s;
    font-size: 26px;
    margin: 10px 0 25px;
    background: linear-gradient(to right, #d4af37, #f9e9b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #d4af37;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    font-weight: 700;
}

@media (max-width: 480px) {
    .card {
        width: 65px;
        height: 120px;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    #chooseCardsTitle {
        font-size: 22px;
    }
}