/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    text-align: center;
}

header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo img {
    width: 60px;
    height: 60px;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    font-weight: bold;
    color: black;
    padding: 5px 10px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    border-bottom: 3px solid #28a745;
    color: #28a745;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0d614b;
    padding: 40px 60px;
    margin-top: 20px;
    border-radius: 10px;
}

h2 {
    font-size: 3em;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.reset {
    padding: 15px 20px;
    color: #267c65;
    background: #fff;
    border: none;
    font-size: 1.5em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 600;
    margin-top: 20px;
}

.reset:focus {
    color: #fff;
    background: #267c65;
}




/* Memory Game Grid */
.game {
    width: 440px;
    height: 440px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transform-style: preserve-3d;
    perspective: 500px;
}

/* Memory Game Cards */
.item {
    position: relative;
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    cursor: pointer;
}

/* Front & Back Faces */
.item .front, .item .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    text-align: center;
    padding: 5px;
    border-radius: 0; /* No rounded corners */
}

/* Default Green Side */
.item .front {
    background-color: rgb(76, 154, 125);
    z-index: 2;
    transform: rotateY(180deg);
}

/* Revealed Side */
.item .back {
    background-color: white;
}

/* Flip Animation */
.item.boxOpen {
    transform: rotateY(180deg);
}

/* Image Styling */
.box-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

