*{
    box-sizing: border-box;
    padding: 0;
    margin:0;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body{
    background: linear-gradient(120deg,#6a11cb 0% ,#2575fc 100%);
    min-height: 100vh;
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding:20px;
}

.container{
    width:100%;
    max-width:800px;
    background-color: rgba(255,255,255,0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding:30px;
    text-align: center;
}
h1{
    color:#333;
    margin-bottom: 20px;
    font-size: 2.8rem;
    text-shadow: 3px 3px 10px rgba(0, 0,0,0.16);
}

.theme-selector{
    display:flex;
    justify-content: center;
    gap:20px;
    margin:20px 0;
}
.theme-btn{
    padding:15px 30px;
    font-size: 1.2rem;
    border:none;
    border-radius: 50px;
    cursor:pointer;
    transition:all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);

}

.theme-btn:hover{
    transform:translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

#animal-theme{
    background: linear-gradient(to right,#ff9a9e,#fad0c4);
    
}

#food-theme{
    background: linear-gradient(to right,#a1c4fd,#c2e9fb);
    
}

.stats{
    display:flex;
    justify-content: space-around;
    margin:25px 0;
    background-color: #f0f8ff;
    padding:15px;
    border-radius: 15px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0,0.05);

}

.stat-box{
    padding:10px;
}

.stat-value{
    font-size: 1.8rem;
    font-weight: bold;
    color:#2575fc;
}
.game-board{
    display:grid;
    grid-template-columns: repeat(4,1fr);
    gap:15px;
    margin:20px auto;
    max-width: 600px;

}
.card{
    aspect-ratio: 1/1;
    border-radius: 12px;
    cursor:pointer;
    position:relative;
    transform-style:preserve-3d;
    transition: transform 0.6s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);

}
.card.flipped{
    transform: rotateY(180deg);
}
.card-face{
    display:flex;
    position: absolute;
    width:100%;
    height:100%;
    backface-visibility: hidden;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 2.5rem;
}
.card-front{
    background:linear-gradient(135deg,#f5f7fa 0%,#c3cfe2 100%);

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

.controls{
    margin-top:25px;
}

.btn{
    padding:12px 30px;
    font-size: 1.1rem;
    background:#2575fc;
    color:white;
    border:none;
    border-radius: 50px;
    cursor:pointer;
    transition:all 0.3s ease;
    margin:0 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.btn:hover{
    background:#1a65e0;
    transform:translateY(-5px);
    box-shadow:0 6px 12px rgba(0,0,0,0.15);
}

#reset-btn{
    background:#ff6b6b;
}
#reset-btn:hover{
    background: #ff5252;
}

.instructions{
    background-color: #f0f8ff;
    padding:20px;
    border-radius: 15px;
    margin-top: 25px;
    text-align: left;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);

}

.instructions h2{
    color:#2575fc;
    margin-bottom: 10px;
}

.instructions ul{
    padding-left: 20px;
}
.instructions li{
    margin:8px 0;
    color:#444;
}
.win-message{
    position:center;
    top:0;
    left:0;
    width:100%;
    height:100%;
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events:none;
    transition: opacity 0.5s;
}
.win-message.show{
    opacity:1;
    pointer-events:all;
}
.win-content{
    background: white;
    padding:40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width:90%;
}
.win-content h2{
    font-size: 2.5rem;
    color:#ff6b6b;
    margin-bottom: 20px;
}
@media(max-width:600px){
    .game-board{
        grid-template-columns: repeat(3,1fr);
    }
}
