:root {
    /* Fog-of-war overlay colour. Exposed here (global scope) so component-scoped
       `:root` selectors — which Blazor transforms to `:root[b-xxxxx]` and never
       match — can still read it via var(--fog-color). */
    --fog-color: rgba(60, 60, 60, 0.55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2329;
    background: #f6f7f9;
    line-height: 1.5;
}

a {
    color: #2c5cb6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header {
    background: #1f2329;
    color: #fff;
    padding: 0.75rem 0;
    border-bottom: 3px solid #2c5cb6;
    /* Lift above page-decoration art (login hero, game flanks) which paint at
       z-index 0. Without this, those fixed elements paint over the header's
       left and right corners. See issue #5. */
    position: relative;
    z-index: 2;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.site-header-actions .user-label {
    color: #cfd2d6;
    font-size: 0.9rem;
}

.btn-logout {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 120ms ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.08);
}

.site-header .brand {
    color: #fff;
    font-weight: 600;
    font-size: 1.15rem;
}

.site-main {
    padding: 2rem 0;
    min-height: calc(100vh - 7rem);
}

.site-footer {
    background: #eaecef;
    color: #555;
    font-size: 0.85rem;
    padding: 0.75rem 0;
    border-top: 1px solid #d8dadd;
    /* Lift above decorative art for the same reason as .site-header. */
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 2rem;
    margin: 0 0 1rem;
}

.hero .lead {
    font-size: 1.1rem;
    color: #3a3f47;
    max-width: 36rem;
}

.cta {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.25rem;
    background: #2c5cb6;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
}

.cta:hover {
    background: #244c98;
    text-decoration: none;
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero .lead {
        font-size: 1rem;
    }

    .site-header-actions .user-label {
        /* Tight headers: brand + logout button are the priority; the per-user
           label is nice-to-have and can be dropped on phones. */
        display: none;
    }

    .site-header .brand {
        font-size: 1rem;
    }
}

/* Mobile-only atmospheric detail strips. The fixed-position flank panels and the
   home hero are hidden under ~800-1200px (each page picks its own threshold), so
   on phone widths the pages would lose all the medieval / fog character. These
   small banner crops fill that dead space without rescaling the source artwork —
   each .jpg under /img/art/mobile-detail-*.jpg is a pixel-perfect crop of one of
   the larger images (no upscaling of source content, just JPEG re-encode of a
   sub-rectangle), so the visual fidelity matches the desktop art. */
.mobile-detail-banner {
    display: none;
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin: 1.25rem 0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.mobile-detail-home  { background-image: url('/img/art/mobile-detail-home.jpg'); }
.mobile-detail-game  { background-image: url('/img/art/mobile-detail-game.jpg'); }
.mobile-detail-lobby { background-image: url('/img/art/mobile-detail-lobby.jpg'); }

@media (max-width: 800px) {
    .mobile-detail-banner {
        display: block;
    }
}
