/* Universal Style */
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #0b1e3f, #0d2247, #091a32);
    color: white;
    line-height: 1.6;
}

.stars {
    width: 2px;
    height: 2px;
    background: white;
    box-shadow: 
        50px 100px white,
        150px 200px white,
        300px 80px white,
        600px 120px white,
        800px 50px white,
        1000px 300px white,
        1200px 250px white,
        1400px 100px white,
        1600px 200px white;
    animation: moveStars 50s linear infinite;
}

.stars2 {
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 
        60px 200px white,
        180px 300px white,
        360px 400px white,
        540px 250px white,
        720px 350px white,
        900px 180px white,
        1080px 500px white,
        1260px 400px white;
    animation: moveStars 150s linear infinite;
} 

.stars3 {
    width: 4px;
    height: 4px;
    background: transparent;
    box-shadow: 
        150px 500px white,
        450px 600px white,
        750px 700px white,
        1050px 300px white,
        1350px 450px white;
    animation: moveStars 200s linear infinite;
}

h1, h2, h3 {
    line-height: 1.2;
    text-align: center;
    justify-content: center;
    color: beige;
}

h1 {
    font-size: 3rem;
    margin: 30px;
    font-weight: 600;
}

h2 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

h3 {
    color: #1C7CCC;
}

/* Navigation Bar */
nav {
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    justify-content: space-between;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    flex-wrap: wrap;
    z-index: 1000;
}

nav a {
    text-align: right;
    font-weight: 600;
    color: beige;
    border: 1px solid transparent;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 5px;
}

nav a:hover {
    color: #1C7CCC;
}

/* Homepage */
#home {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
}

#home p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: white;
}

/* Game Page */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin: 3rem auto;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}

.game-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(34,34,59,0.08);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 32px rgba(34,34,59,0.12);
}

.game-card p {
    font-size: 0.9rem;
    color: black;
}

.btn, .back {
  display: inline-block;
  padding: 10px 20px;
  background-color: #007BFF;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* About Page */
.about-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-text {
    flex: 1;
}

.about-image img {
    max-width: 300px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.about-text p {
    text-align: justify;
    line-height: 1.6;
    color: white;
}

.bold {
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: grey;
    font-size: 1rem;
    background: beige;
    margin-top: 3rem;
    border-top: 1px solid #e0e7ff;
}

/* ===================== */
/* Responsive Adjustments */
/* ===================== */

@media screen and (max-width: 1024px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 2.2rem; }
    p { font-size: 1.1rem; }
    nav a { font-size: 0.9rem; padding: 8px 12px; }
    .about-container { gap: 20px; padding: 0 1rem; }
}

@media screen and (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.8rem; }
    p { font-size: 1rem; }

    /* Navigation Bar */
    nav { flex-direction: column; gap: 0.3rem; }

    /* About Us */
    .about-container {
        flex-direction: column;
        text-align: center;
    }
    .about-image img {
        max-width: 220px;
        margin: 0 auto;
    }

    /* Memory Game */
    .memory-game {
        width: 90vw;
        height: 90vw;
    }
    .memory-card {
        width: calc(25% - 6px);
        height: calc(33.333% - 6px);
        margin: 3px;
    }
}

@media screen and (max-width: 480px) {
    h1 { font-size: 1.3rem; }
    h2 { font-size: 1.5rem; }
    p { font-size: 0.9rem; }

    nav a { font-size: 0.8rem; padding: 6px 10px; }

    .about-image img { max-width: 180px; }
}

@keyframes moveStars {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}