/* Core Setup & Typography */
body {
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    color: #333;
    scroll-behavior: smooth;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* --- Floating Animation --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.floating-element {
    animation: float 3s ease-in-out infinite;
}

/* Navigation Menu */
header {
    background-color: #ded895;
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    border-bottom: 4px solid #555;
    z-index: 100;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 3rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
}

nav a:hover {
    color: #e9524a;
}

/* Sections */
section {
    padding: 8rem 2rem 4rem 2rem;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

#home {
    background-color: #70c5ce;
    color: white;
}

#games {
    background-color: #f4f4f4;
}

#about {
    background-color: #a0d873;
}

/* Buttons and Cards */
.btn, .btn-small {
    display: inline-block;
    padding: 15px 30px;
    background-color: #e9524a;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    border: 3px solid #333;
    margin-top: 1rem;
    cursor: pointer;
}

.btn-small {
    padding: 10px 20px;
    font-size: 1rem;
}

.btn:hover, .btn-small:hover {
    background-color: #d13a33;
}

.game-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.game-card {
    background: white;
    padding: 2rem;
    border: 4px solid #333;
    border-radius: 12px;
    width: 300px;
    text-align: left;
}

/* Make sure the injected logos fit inside the cards */
.game-logo {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: #333;
    color: white;
}

/* --- Automatic System Dark Mode --- */
@media (prefers-color-scheme: dark) {
    body {
        color: #e0e0e0;
        background-color: #121212;
    }

    header {
        background-color: #2b2b2b; /* Darker header */
        border-bottom: 4px solid #777;
    }

    nav a {
        color: #e0e0e0;
    }

    /* Darken the background of the sections */
    #home {
        background-color: #2d555a; 
    }

    #games {
        background-color: #1a1a1a;
    }

    #about {
        background-color: #3f602b; 
    }

    /* Darken the game cards and adjust borders */
    .game-card {
        background: #2a2a2a;
        border: 4px solid #777;
        color: #e0e0e0;
    }

    /* Make button borders pop on dark backgrounds */
    .btn, .btn-small {
        border: 3px solid #e0e0e0;
    }
}