/* --- Navigation Bar --- */
nav {
    width: 100%;
    background: #222;
    box-shadow: 0 2px 8px #000a;
    margin-bottom: 20px;
}

.navbar {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    height: 56px;
}

.logo {
    font-size: 1.6rem;
    color: #fff;
    font-weight: bold;
    letter-spacing: 1px;
}

.navbar ul {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 8px 0;
    transition: color 0.2s;
}

.navbar ul li a:hover {
    color: #33ccff;
}

/* --- Main Layout --- */
body {
    background: #222;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    justify-content: center;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 12px;
}

.game-preview {
    background: #292929;
    border-radius: 10px;
    margin-bottom: 32px;
    box-shadow: 0 0 16px #000a;
    padding: 18px 18px 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: start;
}

.game-preview h2 {
    margin: 0 0 10px 0;
    color: #33ccff;
    font-size: 1.4rem;
}

.preview-container {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 12px;
}

.preview-frame {
    width: 320px;
    height: 200px;
    border: 2px solid #fff;
    border-radius: 8px;
    box-shadow: 0 0 12px #0005;
    background: #111;
}

.preview-link {
    display: flex;
    flex-direction: column;
}

.preview-link a {
    display: inline-block;
    background: #33ccff;
    color: #222;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 7px;
    transition: background 0.2s, color 0.2s;
}

.preview-link a:hover {
    background: #fff;
    color: #33ccff;
}

/* --- Pong Game Styles --- */
#pongCanvas {
    background: #111;
    border: 3px solid #fff;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 20px #000;
}

/* --- Minesweeper Styles --- */
#minefield {
    display: grid;
    background: #333;
    box-shadow: 0 0 12px #000;
    margin: 0 auto;
    user-select: none;
}

.mine_tile {
    width: 34px;
    height: 34px;
    background: #888;
    border: 1px solid #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.mine_tile.open {
    background: #eee;
    color: #222;
    cursor: default;
}

.mine_tile.bomb {
    background: #e74c3c !important;
    color: #fff;
}

.mine_tile.flagged {
    background: #f1c40f;
    color: #222;
}

.mine_tile:active {
    filter: brightness(0.9);
}

/* --- 2048 Styles --- */
#game-container {
    background: #444;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 0 18px #000;
}

#board {
    display: grid;
    grid-template-rows: repeat(4, 64px);
    grid-template-columns: repeat(4, 64px);
    gap: 8px;
    border-radius: 8px;
}

.tile {
    width: 64px;
    height: 64px;
    background: #bbb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 27px;
    transition: background 0.18s, color 0.18s;
    color: #333;
}

.tile-0 {
    background: #bbb;
    color: #bbb;
}

.tile-2 {
    background: #eee4da;
    color: #333;
}

.tile-4 {
    background: #ede0c8;
    color: #333;
}

.tile-8 {
    background: #f2b179;
    color: #fff;
}

.tile-16 {
    background: #f59563;
    color: #fff;
}

.tile-32 {
    background: #f67c5f;
    color: #fff;
}

.tile-64 {
    background: #f65e3b;
    color: #fff;
}

.tile-128 {
    background: #edcf72;
    color: #fff;
}

.tile-256 {
    background: #edcc61;
    color: #fff;
}

.tile-512 {
    background: #edc850;
    color: #fff;
}

.tile-1024 {
    background: #edc53f;
    color: #fff;
}

.tile-2048 {
    background: #edc22e;
    color: #fff;
}
