.card {
    width: 200px;
    height: 250px;
    -webkit-box-shadow: 0px 0px 6px 5px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 0px 0px 6px 5px rgba(34, 60, 80, 0.2);
    box-shadow: 0px 0px 6px 5px rgba(34, 60, 80, 0.2);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.5s ease;
    position: relative;
    overflow: hidden;
    margin: 10px;
}

.card {
    transition: width 2s, height 2s, transform 0.5s;
}

.card:hover {
    transform: rotate(360deg);
}

.content {
    text-align: center;
    padding: 20px;
    z-index: 1;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 191, 255, 0.5), rgba(14, 2, 255, 0.5)); /* Голубой и фиолетовый */
    transform: scaleX(4);
    transform-origin: 0 50%;
    transition: transform 0.5s ease;
}

.card:hover::before,
.card:active::before {
    transform: scaleX(1);
}

.card:hover,
.card:active {
    background-color: transparent;
}

#container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* Медиа-запросы для адаптации под мобильные устройства */
@media (max-width: 768px) {
    .card {
        width: 150px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .card {
        width: 120px;
        height: 160px;
    }
}
