/* 👇 MENU 👇 */

.menu
{
    width: 200px;
    height: 200px;
    right: 230px;
    bottom: 400px;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.menu li
{
    width: 40px;
    height: 40px;
    position: absolute;
    left: 0;
    list-style: none;
    transform-origin: 100px;
    transition: 0.5s;
    transition-delay: calc(0.1s * var(--i));
    transform: rotate(0deg) translateX(80px) translateY(-15px);
}

.menu.active li
{
    transform: rotate(calc(225deg / 5 * var(--i))); 
}

.green {
    background: linear-gradient(135deg, #bee893, #a3ea5b, #88ea27, #a3ea5b, #bee893);
}

.blue {
    background: linear-gradient(135deg, #0cc6b8, #06c8b8, #00c5b4, #06c8b8, #0cc6b8);
}

.purple {
    background: linear-gradient(135deg, #8b9df2, #7c91f9, #6e85fa, #7c91f9, #8b9df2);
}

.orange {
    background: linear-gradient(135deg, #fdd7ac, #fbbd75, #f89f3a, #fbbd75, #fdd7ac);
}

.red {
    background: linear-gradient(135deg, #fdc0c7, #fca2ad, #fc8694, #fca2ad, #fdc0c7);
}

.yellow {
    background: linear-gradient(135deg, #ffe100, #fce006, #f9de0f, #fce006, #ffe100);
}

.round-button::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 19%;
    right: 19%;
    height: 40%;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.4) 0%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.05) 100%);
    border-radius: 50%;
    pointer-events: none;
}

li
{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: #ffffff; /*buttons color*/
    border-radius: 50%;
    box-shadow: 0 0px 4px rgba(0, 0, 0, 0.15);
    color: #ffffff; 
    transition: 0.5s;
}

ion-icon{
    transform: rotate(calc(225deg / -5 * var(--i)));
}

li:hover
{
    color: white;
    background-color: black;
}

.toggle
{
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0px 4px rgba(255, 255, 255, 0.15);
    font-size: 2em;
    transition: transform 1.25s;
}

.menu.active .toggle
{
    transform: rotate(360deg);
}

.menu.active .rotate
{
    transform: rotate(315deg);
}

/* 👆 MENU 👆 */

/* 👇 GAME 👇 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Nunito", sans-serif;
    font-style: normal;
    font-optical-sizing: auto;
    background-image: url('../img/acnh-8.jpg');
    background-repeat: no-repeat;
    background-position: right;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.400);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
}

h1 {
    text-align: center;
    color: 	#74e0aa;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fdc0c7 0%, #fdc0c7 100%);
    border-radius: 10px;
    color: white;
}

.stat {
    text-align: center;
    font-weight: bold;
    font-size: large;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    margin-top: 5px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #ffffff 0%, #8b9df2 100%);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: scale(1.05);
}

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

.card.matched {
    opacity: 0.6;
    cursor: default;
    animation: matched 0.6s ease;
}

@keyframes matched {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    font-size: 3em;
}

.card-back img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    border-radius: 5px;
}

.card-front {
    background: linear-gradient(135deg,#8b9df2 100%);
    color: white;
}

.card-back {
    background: white;
    transform: rotateY(180deg);
}

.controls {
    text-align: center;
}

button {
    background: linear-gradient(360deg, #74e0aa 0%, #0cc6b8 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: x-large;
    margin: 20px;
    transition: all 0.3s ease;
    font-family: "Nunito", sans-serif;
    font-weight: bold;
    position: relative;
}

button::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 4%;
    right: 4%;
    height: 40%;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.4) 5%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.05) 100%);
    border-radius: 5px;
    pointer-events: none;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active {
    transform: translateY(0);
}

.win-message {
    display: none;
    text-align: center;
    padding: 20px;
    background: linear-gradient(360deg, #74e0aa 0%, #74e0aa 100%);
    border-radius: 10px;
    margin-bottom: 20px;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.win-message.show {
    display: block;
}

/* 👆 GAME 👆 */