/* 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, #a8d52d, #83ac29, #74a727, #83ac29, #a8d52d);
}

.blue {
    background: linear-gradient(135deg, #6fb9f6, #4ca3f9, #2587f8, #4ca3f9, #6fb9f6);
}

.purple {
    background: linear-gradient(135deg, #f09bfe, #cd5ffb, #a92bf7, #cd5ffb, #f09bfe);
}

.orange {
    background: linear-gradient(135deg, #f4cb8d, #fca44d, #fe8922, #fca44d, #f4cb8d);
}

.red {
    background: linear-gradient(135deg, #f79c95, #fc5353, #f70707, #fc5353, #f79c95);
}

.yellow {
    background: linear-gradient(135deg, #ffe96e, #f8d300, #dcbb01, #f8d300, #ffe96e);
}
.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: #111; 
    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 */

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

body {
    font-family: "Audiowide", sans-serif;
    background-image: url('../img/frutiger-world.webp');
    background-repeat: no-repeat;
    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: #ffffff;
    margin-bottom: 20px;
    font-size: 2.5em;
}

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

.stat {
    text-align: center;
}

.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, #74a727 0%, #2587f8 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, #74a727 100%);
    color: white;
}

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

.controls {
    text-align: center;
}

button {
    background: linear-gradient(360deg, #74a727 0%, #2587f8 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px;
    transition: all 0.3s ease;
    font-family: "Audiowide", sans-serif;
    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(135deg, #11998e 0%, #38ef7d 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;
}