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

/* BODY */
body {
    font-family: Arial, sans-serif;
    background: #121212;
    color: white;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #1e1e1e;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 10px;
}

.logo span {
    font-size: 20px;
    font-weight: bold;
    color: #00c3ff;
}

/* NAV */
nav a {
    margin: 0 12px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

nav a:hover {
    color: #00c3ff;
}

/* HERO */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 40px;
    margin-bottom: 10px;
}

.hero p {
    color: #aaa;
}

/* GAMES SECTION */
.games-section {
    padding: 30px 20px;
    text-align: center;
}

.games-section h2 {
    margin-bottom: 20px;
}

/* GRID FIX (IMPORTANT) */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

/* GAME CARD */
.game {
    display: block;
    background: #222;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.game:hover {
    transform: scale(1.08);
    background: #2a2a2a;
}

.game img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

.game h3 {
    margin-top: 8px;
    font-size: 16px;
}

/* POPUP (FIXED) */
#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: none;
    z-index: 9999;
}

.game-box {
    width: 100%;
    height: 100%;
    position: relative;
}

#game-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* CLOSE BUTTON */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 10px 14px;
    background: red;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 10000;
    border-radius: 6px;
}

/* CONTACT */
#contact {
    text-align: center;
    padding: 50px 20px;
}

#contact h2 {
    margin-bottom: 20px;
}

#contact input,
#contact textarea {
    display: block;
    margin: 10px auto;
    padding: 12px;
    width: 90%;
    max-width: 400px;
    border: none;
    border-radius: 6px;
}

#contact textarea {
    min-height: 100px;
}

#contact button {
    padding: 12px 25px;
    background: #00c3ff;
    border: none;
    color: black;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.2s;
}

#contact button:hover {
    background: #00a6d6;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    background: #1e1e1e;
    margin-top: 30px;
}

/* 🔥 MOBILE OPTIMIZATION */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 10px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .game img {
        height: 120px;
    }
}
