:root{
    --primary: #FF7675;    
    --secondary: #FAB1A0;  
    --dark: #2D3436;
    --white: #ffffff;
    --accent: #fdcb6e;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body{
    background-color: #ffb7b2;
    color: var(--dark);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-header{
    position: absolute;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    align-items: center;
}

.stats-bar{
    display: flex;
    gap: 20px;
    background: var(--white);
    padding: 10px 25px;
    border-radius: 50px;
    border: 2px solid var(--secondary);
}

.game-board{
    display: grid;
    gap: 12px;
    margin-top: 60px;
    max-width: 90vw;
}

.card{
    width: 80px;
    height: 80px;
    position: relative;
    cursor: pointer;
    background-color: transparent;
    perspective: 1000px;
}

.card-inner{
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flip .card-inner{transform: rotateY(180deg);}
.card.matched{visibility: hidden;}

.card-face{
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-radius: 10px;
    border: 2px solid var(--dark);
}
.card-front{background-color: var(--primary); color: white;}
.card-back{background-color: white; transform: rotateY(180deg);}

.overlay{
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-card{
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 4px solid var(--primary);
    width: 400px;
    max-width: 90%;
}

.hidden{display: none !important;}

.btn{
    padding: 12px 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin: 5px;
    transition: 0.2s;
}
.btn:hover { transform: scale(1.05); }

.btn-easy { background-color: #55E6C1; color: var(--dark); }
.btn-med { background-color: #0984e3; color: white; }
.btn-hard { background-color: #d63031; color: white; }

.btn-play-again{
    background-color: #d63031; 
    width: 100%; 
    padding: 15px; 
    font-size: 1.1rem; 
    border-radius: 50px; 
    box-shadow: 0 10px 20px rgba(214, 48, 49, 0.3);
    margin-top: 20px;
}

.controls-area{
    position: fixed; 
    bottom: 30px; 
    display: flex; 
    gap: 10px;
}
