* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    background: #3E92CE; 
    display: flex;
    filter: blur(0.1px);
    align-items: flex-start;
    flex-direction: column;
    justify-content: center; /* Center elements vertically */
    height: 100vh; /* Full viewport height */
    margin: 0;
    background-image: url(back.jpg);
    background-size: cover; /* Cover the entire viewport */
    background-position: center; /* Center the image */
    background-attachment: fixed; /* Keep the image fixed when scrolling */
    

}


.board {
    position: relative;
    width: 100%; /* Use 100% of available width */
    max-width:680px; /* Set max width for the board */
    height: 600px;
    top: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly; /* Distribute cards evenly */
    background: linear-gradient(133.05deg, rgba(255, 255, 255, 0.6) 0.62%, rgba(255, 255, 255, 0.1) 102.4%);
    border-radius: 8px; 
    gap: 0; /* No gap between cards */
    margin: 0 auto; /* Center the board horizontally */
}

.card {
    width: calc(14.35% - 2px); /* Adjusted width to ensure no gap */
    height: calc(16.75% - 2px); /* Adjusted height */
    position: relative;
    margin: 0; /* Removed margin to avoid gaps */
    transform: scale(1);
    transform-style: preserve-3d;
    transition: transform .5s;
}

.card:active {
    transform: scale(.97);
    transition: transform .2s;
}

.card.flip {
    transform: rotateY(180deg);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images cover the card area while maintaining aspect ratio */
}

.ff, .bb {
    position: absolute;
    width: 100%;
    height: 100%; 
    padding: 10px;
    border-radius: 5px;
    backface-visibility: hidden;
}

.ff {
    transform: rotateY(180deg);
}

.Memory {
    position: absolute;
    width: 182px;
    height: 40px;
    left: 535px;
    top: 32px;
    font-family: Poppins;
    font-style: normal;
    font-weight: bold;
    font-size: 40.187px;
    line-height: 40px;
    letter-spacing: 0.0882153px;
    color: #ffffff;
}

.restartbutton, .exitbutton {
    text-align: center;
    padding: 16px;
    font-size: 18px;
    color: #ffffff;
    position: absolute;
    width: 160px;
    height: 52px;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.restartbutton {
    background: #F4A236;
    left: 528px;
    top: 5px;
}

.exitbutton {
    background: #D4190C;
    left: 698px;
    top: 5px;
}

.restartbutton:hover, .exitbutton:hover {
    background-color: #e38f23;
    transform: scale(1.05);
}

.restartbutton:active, .exitbutton:active {
    transform: scale(0.97);
    transition: transform 0.2s;
}

.frame169, .frame170 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Ensures content starts at the top */
    padding: 20px;
    position: absolute;
    width: 220px;
    height: 344px;
    top: 250px;
    background: linear-gradient(160.65deg, rgba(255, 255, 255, 0.6) 0.74%, rgba(255, 255, 255, 0.1) 102.03%);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Adds depth */
    overflow: hidden; /* Ensures content stays within borders */
}

.frame169 {
    left: 0px;
}

.frame170 {
    right: 0px;
}

.frame169 img, .frame170 img {
    width: 100px;
    height: 100px;
    border-radius: 80%; /* Circular profile picture */
    border: 4px solid rgba(255, 255, 255, 0.8); /* Highlight the image with a border */
    object-fit: cover; /* Ensures the image scales appropriately */
    margin-bottom: 10px; /* Adds space between the image and the text */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.Player1, .Player2 {
    text-align: center;
    font-family: "Poppins", sans-serif;
    color: #FFFFFF;
}
.leaderboard {
    position: fixed;
    top: 400px;
    right: 10px;
    width: 100px;
    padding: 45px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: Poppins, sans-serif;
}

.leaderboard h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.leaderboard ol {
    list-style: decimal;
    padding-left: 20px;
    text-align: left;
    font-size: 18px;
    color: #333;
}


.active-player {
    border: 3px solid #FFD700; /* Gold highlight */
    box-shadow: 0 0 15px #FFD700;
}
