/* Звёздное небо =====================================*/

body {
    background: linear-gradient(to bottom, #0a0e24, #12122e, #1a1342);
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    filter: drop-shadow(0 0 5px #ffeb3b);
    animation: twinkle 2s infinite alternate;
    z-index: 1;
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}


/*  Таро  =================*/


.deck {

    width: 90%;

    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: start;
    flex-shrink: 0;

}

.deck-card {
    width: 65%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    background-image: url('/static/img/tarots/back.jpg');
    background-size: cover;
    transition: transform 0.3s ease;
}

#open-cards-list {
    width: 100%;
    max-height: 30vh;
    list-style-type: none;
    display: flex;
    flex-direction: column;
    align-items: start;
    flex-wrap: nowrap;
    overflow: auto;
    padding: 0;

    span {
        font-weight: bold;
    }

    .card-name {
        color: var(--yellow-color);
    }

    .card-reversed {
        color: var(--white-color);
    }

    @media (min-width: 2000px) {
        font-size: 2em;
    }
    @media (min-width: 3000px) {
        font-size: 3em;
    }
}

/* Центральная зона с картами ==========================*/


.deck:hover .deck-card {
    transform: translateY(-10px);
}

.reading-area {

    min-height: 50vh;
    max-height: 70vh;

    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: auto;
}

.tarot-card {

    width: 7vw;
    height: 20vh;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    margin-left: 1.5em;

    @media (min-width: 2000px) {
        margin-left: 2.5em;
    }

    @media (min-width: 3000px) {
        margin-left: 4.5em;
    }

}

.tarot-card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);


}

.card-back {
    background: linear-gradient(45deg, #2c1810, #4a2f24);
    background-image: url('/static/img/tarots/back.jpg');
    background-size: cover;
}

.card-front {
    transform: rotateY(180deg);
    background-size: cover;
    background-position: center;

    &:hover {
        cursor: pointer;
    }
}

.card-front-spin {
    transform: rotateX(180deg);
    background-size: cover;
    background-position: center;

    &:hover {
        cursor: pointer;
    }
}


/* Модалка ==================================================*/

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(to bottom, #1a1342, #12122e);
    margin: 10% auto;
    padding: 15px;
    width: 56%;
    max-width: 560px;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 15px;
}

.modal-image-container {
    flex: 0 0 210px;
}

.modal-image-container img {
    width: 100%;
    height: 35em;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.modal-description {
    flex: 1;
    color: #fff;
}

.modal-description h2 {
    margin-top: 0;
    color: #ffeb3b;
    font-size: 20px;
    margin-bottom: 12px;
}

.modal-description p {
    font-size: 14px;
    line-height: 1.5;
}

.close-button {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #ffeb3b;
}

@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        margin: 10% auto;
    }

    .modal-image-container {
        flex: 0 0 auto;
        max-width: 175px;
        margin: 0 auto;
    }
}