/* body height set to 100% to keep header and footer at the edges */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #2b124c;
    color: #ffffff;
}
h2, h3, p {
    color: #ffffff;
    margin-left: 2.5rem;
    padding-bottom: 0.8rem;
}
li {
    color: #ffffff;
    margin-left: 2rem;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.landing-logo {
    height: 200px;
    width: 200px;
    object-fit: contain;
}
/*banner styling*/
.banner {
    background-color: #ffffff;
    color: #2b124c;
    padding: 0.4rem 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
/* play button styling */
.play-btn {
    position: absolute;
    top: 78%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}
.play-icon {
    width: 160px;
    height: auto;
    display: block;
}
.play-btn:hover .play-icon {
    transform: scale(1.07);
    transition: transform 0.2s ease;
}
/* play button text styling */
.play-text {
    position: absolute;
    top: 9%;
    left: 20%;
    color: rgb(0, 0, 0);
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    margin-top: 0.5rem;
}
/* logo styling */
.logo {
    height: 100px;
    margin-right: 15px;
}
/* navigation bar styling */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: rgb(251, 206, 2);
}
/* left links */
.nav-left {
    flex: 1; /* align left */
    display: flex;
    text-decoration: underline;
    color: rgb(69, 7, 110);
    align-items: center;
}

.nav-title {
    flex: 2; /* center title */
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(228, 53, 228);
    margin: 0.25rem;
    line-height: 1;
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-right {
    flex: 1; /* align right */
    justify-content: flex-end;
    display: flex;
    gap: 1.2rem;
}
/* right links */
.nav-right .nav-left .nav-link{
    font-weight: 700;
    text-decoration: underline;
     color: rgb(69, 7, 110);
}

/* landing page background img */
.hero-picture {
   width: 100%;
   height: 100vh;
   overflow: hidden;
   display: block;
   position: relative;
}
/* hero image styling */
.hero-image {
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: center;
   display: block;
}

/* footer styling */
footer {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 1rem;
    height: 30px;
    background: linear-gradient(90deg, #5d2971, #8e44ad);
    font-size: 0.9rem;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr)); /* 2 cards per row, each at least 260px wide */
    gap: 1.5rem;
    margin: 2rem 0;
    justify-items: center; /* center cards horizontally */
}
   /* adjust cards for smaller screens  */
   @media (max-width: 900px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr)); /* 2 cards per row */
    }
}
/* adjust cards for smaller screens  */
    @media (max-width: 600px) {
     .category-grid {
          grid-template-columns: 1fr; /* 1 card per row */
     }
}
.category-card {
    max-width: 350px;
    height: 250px;
    background: #3b1a63;
    border: 5px solid #ffd84a;
    border-radius: 25px;
    overflow:hidden;
    flex-direction: column;
    display: flex;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 35);
    cursor: pointer;
}
/* add a text label on top */
.category-label {
    flex: 0 0 50px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd84a;
    text-align: center;
}
/* add a hover zoom in effect */
.category-card:hover .category-image {
    transform: scale(1.05);
}
/* category image fill the rest of the card container */
.category-image {
    flex: 1 1 auto;
    width: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease; /* smooth zoom effect */
}
/* card game css */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    justify-items: center;
    margin: 2rem 0;
}
.memory-card {
    width: 140px;
    height: 190px;
    perspective: 1000px;
    margin: 1rem;
}
/* flipped card  */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}
/* when card flipped, rotate animation to show vocab word */
.card-flipped .card-inner {
    transform: rotateY(180deg);
}
.card-front, .card-reveal {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    backface-visibility: hidden;
    overflow: hidden;
}
.card-back {
    background-color: #2b124c;
}
.card-back-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* card reveal face up */
.card-reveal {
    background-color: #ffd84a;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-word {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2b124c;
}
/* when card flipped, reveal vocab word */
.card-flipped .card-inner {
    transform: rotateY(180deg);
}
/* change color when match is positive */
.card-matched .card-reveal {
    background-color: #bbf7d0;
}

.card-matched {
    cursor: default;
    opacity: 0.9;
}
/* buttons on game board */
.game-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}
/* buttons on game board refresh game and return to categories */
.game-buttons button {
    background-color: #ffd84a;
    color: #2b124c;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 0.7 1.4rem;
    font-size: 1rem;
    cursor: pointer;
}
.game-buttons button:hover {
    background-color: #ffec8c;
}
