/*  */

@property --＠color-1 {
  syntax: "<color>";
  inherits: false;
  initial-value: hsl(340, 100%, 62%);
}

@property --＠color-2 {
  syntax: "<color>";
  inherits: false;
  initial-value: hsl(258, 100%, 59%);
}

@keyframes gradient-change {
  to {
    --＠color-1: hsl(276, 100%, 59%);
    --＠color-2: hsl(310 100% 59%);
  }
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: url('../img/frutas-background.avif');
    background-size: contain;
    background-attachment: fixed;
    user-select: none;
}

main {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem 6rem;
}

.gradient {
    animation: gradient-change 2s linear infinite alternate;
    background: linear-gradient(to right in oklch, var(--＠color-1), var(--＠color-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
}

.reset {
    padding: 0.80rem 5rem;
    width: 100%;
    color: rgb(59, 0, 25);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0.5rem;
    background: #9935e6;
    background: radial-gradient(circle, rgba(153, 53, 230, 1) 0%, rgba(199, 87, 178, 1) 50%, rgba(237, 83, 109, 1) 100%);
    border: none;
}

.game {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    transform-style: preserve-3d;
    perspective: 500px;
    width: 430px;
    height: 430px;
}

.item {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100px;
    height: 100px;
    background: #00f5ac;
    background: linear-gradient(333deg, rgba(0, 245, 172, 1) 0%, rgba(87, 124, 199, 1) 50%, rgba(129, 83, 237, 1) 100%);
    font-size: 2rem;
    transform: rotateY(180deg);
    transition: transform 0.25s;
}

.item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #d53369 0%, #daae51 100%);
    transition: 0.25s;
    transform: rotateY(0deg);
    backface-visibility: hidden;
}

.item.boxOpen {
    transform: rotateY(0deg);
}

.boxOpen::after, .boxMatch::after {
    transform: rotateY(180deg);
}

.reset:focus {
    color: rgb(87, 124, 199);
}

