body {
    background-color: #16a085;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Arial Black', sans-serif;
    color: white;
}

.game-container { text-align: center; }

h1 { font-size: 3rem; text-shadow: 3px 3px #0e6655; margin-bottom: 10px; }

p { font-size: 1.2rem; margin-bottom: 40px; opacity: 0.9; }

.cards-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    perspective: 1000px; /* საჭიროა 3D ეფექტისთვის */
}

.card {
    width: 150px;
    height: 220px;
    cursor: pointer;
    background-color: transparent;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-radius: 15px;
}

/* როცა კარტს დავაჭერთ, დაემატება ეს კლასი */
.card.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* მალავს უკანა მხარეს როცა წინა ჩანს */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    border: 5px solid white;
}

.card-front {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: #f1c40f;
    font-size: 4rem;
}

.card-back {
    background-color: #ecf0f1;
    color: #333;
    font-size: 5rem;
    transform: rotateY(180deg);
}

/* Modal Window */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); display: none; justify-content: center; align-items: center;
    z-index: 1000;
}
.modal {
    background: white; padding: 40px; border-radius: 25px; text-align: center; color: #333; width: 320px;
}
.prize-display { font-size: 5rem; margin: 20px 0; }
#closeModalBtn {
    background: #16a085; color: white; border: none; padding: 15px 40px; border-radius: 50px; cursor: pointer; font-size: 1.2rem;
}