/* =========================================================
   GameNest — lightweight site style
   ========================================================= */

* { box-sizing: border-box; }

:root { --accent: #2563eb; }

html, body { margin: 0; padding: 0; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f5f7;
    color: #222;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; }

main { flex: 1; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #18181b;
    text-decoration: none;
    letter-spacing: .3px;
}

.logo:hover { color: var(--accent); }

.topnav a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    margin-left: 18px;
}

.topnav a:hover { color: var(--accent); }

/* ---------- Buttons ---------- */
.button {
    display: inline-block;
    padding: 12px 26px;
    background: #18181b;
    color: #fff;
    font-size: 15px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s ease;
}

.button:hover { background: var(--accent); }

/* ---------- Hero (home) ---------- */
.hero {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    padding: 60px 20px;
}

.hero h1 { margin: 0 0 12px; font-size: 38px; line-height: 1.2; }
.hero p  { max-width: 620px; margin: 0 auto 26px; color: #666; }

/* ---------- Generic sections ---------- */
.section { padding: 46px 0; }
.section h2 { margin: 0; font-size: 26px; }
.section .sub { margin: 4px 0 0; color: #777; }

/* ---------- Game grid / cards ---------- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.game-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    transition: transform .15s ease, box-shadow .15s ease;
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.card-thumb {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #334155, #0f172a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    text-decoration: none;
}

.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body h3 { margin: 0 0 6px; font-size: 18px; }
.card-body p  { margin: 0 0 14px; font-size: 14px; color: #666; flex: 1; }

.play-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.play-link:hover { text-decoration: underline; }

/* ---------- Static pages (about / privacy / terms / contact) ---------- */
.page { background: #fff; padding: 46px 0; }
.page h1 { margin: 0 0 10px; font-size: 30px; }
.page h2 { margin: 26px 0 8px; font-size: 21px; }
.page p  { color: #3f3f46; }
.page ul { padding-left: 20px; color: #3f3f46; }
.page .updated { color: #888; font-size: 14px; margin: 0 0 18px; }

.contact-list { list-style: none; padding: 0; margin: 10px 0; }
.contact-list li { margin: 8px 0; }
.contact-list a { color: var(--accent); }

/* ---------- Game play page ---------- */
.play-section { padding: 40px 0; }

.play-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.play-head h1 { margin: 0; font-size: 28px; }

.back-link { font-size: 14px; color: #666; text-decoration: none; }
.back-link:hover { color: var(--accent); }

.game-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
}

.game-container iframe {
    width: 100%;
    height: 640px;
    border: 0;
    display: block;
    background: #000;
}

.about-game {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-top: 26px;
}

.about-game h2 { margin: 0 0 8px; font-size: 20px; }
.about-game h2 + p { margin: 0 0 18px; color: #3f3f46; }

/* ---------- Footer ---------- */
footer {
    background: #18181b;
    color: #a1a1aa;
    margin-top: 46px;
}

.footer-inner { padding: 30px 0 24px; }

.footer-links a {
    color: #d4d4d8;
    text-decoration: none;
    font-size: 14px;
    margin-right: 20px;
}

.footer-links a:hover { color: #fff; }

footer p { margin: 14px 0 0; font-size: 13px; color: #71717a; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    .header-inner { height: auto; flex-direction: column; padding: 12px 0; gap: 10px; }
    .topnav a { margin: 0 8px; }
    .hero { padding: 44px 20px; }
    .hero h1 { font-size: 28px; }
    .page, .section, .play-section { padding: 30px 0; }
    .game-container iframe { height: 430px; }
}
