* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f2027, #2c5364);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

h1 {
    font-size: 3rem;
    margin: 20px 0;
    text-align: center;
    color: #ffd700;
}

.intro,
.win-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}

.win-popup {
    position: absolute;
}

.noAllow {
    background: #333;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    opacity: 35%;
}

.hidden {
    display: none;
}

select,
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

select {
    font-size: 1rem;
}

.btn {
    background: #ffd700;
    color: #111;
}

.btn:hover {
    background: #ffc300;
}

#timer {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
    color: #00ffd0;
}

.game-container {
    display: grid;
    width: 75%;
    height: 100%;
    padding: 10px;
    gap: 10px;
    justify-content: center;
    align-content: center;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.card {
    aspect-ratio: 1 / 1;
    background: #f2f2f2 center / 50% no-repeat url('https://cdn-icons-png.flaticon.com/512/2476/2476190.png');
    border-radius: 15px;
    width: 100%;
    max-width: 100px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: transparent;
    cursor: pointer;
    transform: perspective(800px) rotateY(0deg);
    transition: transform 0.3s, color 0.3s;
    place-self: center;
}

.card.flipped {
    color: #fff;
    transform: perspective(800px) rotateY(180deg);
}

.card span {
    display: inline-block;
    transform: scaleX(-1);
}

.top-scores {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
    color: #ffd700;
    max-width: 200px;
}

.top-scores h3 {
    margin-bottom: 10px;
}

.top-scores ol {
    padding-left: 20px;
}