/* =====================================================================
   RMaker Portal — Stylesheet
   Minimal · Light · Blue/light-blue palette · Dense layout
   ===================================================================== */

/* ── 1. Reset + Tokens ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #eef3fb;   /* light blue-gray page background */
    --bg-2:      #ffffff;   /* cards / panels */
    --bg-2-rgb:  255, 255, 255;
    --bg-3:      #e8eff9;   /* inputs / hover */
    --border:    #d3dded;   /* light blue border */
    --text:      #1c2733;   /* main text */
    --muted:     #5b6b82;   /* secondary text */
    --accent:    #2f6fed;   /* blue */
    --accent-2:  #0d9d6c;   /* green (free/success) */
    --danger:    #dc2626;
    --warning:   #d97706;
    --radius:    4px;
    --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Dark theme (toggle via html[data-theme="dark"]) ──────────────── */
html[data-theme="dark"] {
    --bg:        #12151c;
    --bg-2:      #1b2029;
    --bg-2-rgb:  27, 32, 41;
    --bg-3:      #232a35;
    --border:    #2e3644;
    --text:      #e6ebf2;
    --muted:     #97a3b4;
    --accent:    #5b8ff5;
}

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: .875rem;
    line-height: 1.45;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, .mono { font-family: var(--mono); }

::selection { background: rgba(47,111,237,.2); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #bcc9de; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #9fb0cb; }

/* ── 2. Layout utilities ──────────────────────────────────────────── */
.container { max-width: 1480px; margin: 0 auto; padding: 0 1rem; width: 100%; }

main.container { padding-top: 1rem; padding-bottom: 2rem; flex: 1; }

.section { margin-top: 1.25rem; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 1.5rem 0; padding: 1rem; }

.section__title {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section__title a { font-size: .8rem; font-weight: 500; text-transform: none; letter-spacing: 0; }

.page-header { padding: 1rem 0 .75rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.page-header h1 { font-size: 1.35rem; font-weight: 700; }
.page-header p { color: var(--muted); font-size: .85rem; margin-top: .2rem; }

.muted, .text-muted { color: var(--muted); }
.text-center { text-align: center; }
.small { font-size: .78rem; }
.d-block { display: block; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ── 3. Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .35rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-3);
    color: var(--text);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .45; pointer-events: none; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #3d7bf5; border-color: #3d7bf5; color: #fff; }
.btn-success { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-success:hover { background: #10b57d; border-color: #10b57d; color: #fff; }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-warning { background: transparent; border-color: var(--warning); color: var(--warning); }
.btn-warning:hover { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--bg-3); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg-3); }

.btn--sm, .btn-sm { padding: .18rem .5rem; font-size: .72rem; }
.btn--lg, .btn-lg { padding: .5rem 1.1rem; font-size: .9rem; }
.btn--full, .btn--block { width: 100%; }

/* ── 4. Header / Navigation ───────────────────────────────────────── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(var(--bg-2-rgb), .92);
    border-bottom: 1px solid var(--border);
    height: 48px;
    backdrop-filter: blur(8px);
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    gap: .75rem;
}
.logo { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); flex-shrink: 0; }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; color: var(--text); }

.nav-desktop { display: flex; align-items: center; gap: .15rem; }
.nav-desktop a {
    color: var(--muted);
    padding: .3rem .55rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: .85rem;
}
.nav-desktop a:hover, .nav-desktop a.active { color: var(--text); background: var(--bg-3); text-decoration: none; }

.search-form { display: flex; align-items: center; flex: 0 1 300px; position: relative; }
.search-form input[type="text"] {
    width: 100%;
    padding: .3rem .6rem .3rem 1.9rem;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .82rem;
    outline: none;
}
.search-form input:focus { border-color: var(--accent); }
.search-form .search-icon { position: absolute; left: .6rem; color: var(--muted); pointer-events: none; font-size: .8rem; }

.auth-section { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }

.avatar-sm, .avatar-sm img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.avatar-tiny { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; }
.avatar-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.user-dropdown { position: relative; }
.user-dropdown-toggle {
    display: flex; align-items: center; gap: .4rem;
    background: transparent; border: 1px solid transparent; border-radius: var(--radius);
    padding: .2rem .4rem; cursor: pointer; color: var(--text); font-weight: 500; font-size: .82rem;
}
.user-dropdown-toggle:hover { border-color: var(--border); background: var(--bg-3); text-decoration: none; }

.dropdown-menu {
    position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 170px; background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .3rem 0; z-index: 200;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: all .15s ease;
    box-shadow: 0 6px 18px rgba(30,60,110,.12);
}
.user-dropdown:hover .dropdown-menu, .user-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a, .dropdown-menu button {
    display: block; width: 100%; padding: .4rem .75rem; color: var(--muted);
    text-align: left; border: none; background: none; font-size: .82rem; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { color: var(--text); background: var(--bg-3); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border); }

.burger-btn { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 150; }
.burger-btn span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 1px; }
.nav-mobile { display: none; position: fixed; top: 48px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: .75rem; flex-direction: column; gap: .25rem; z-index: 90; box-shadow: 0 6px 18px rgba(30,60,110,.12); }
.nav-mobile.open { display: flex; }
.nav-mobile a, .nav-mobile button { display: block; padding: .5rem .75rem; color: var(--muted); background: none; border: none; text-align: left; border-radius: var(--radius); font-weight: 500; }
.nav-mobile a:hover, .nav-mobile button:hover { color: var(--text); background: var(--bg-3); text-decoration: none; }

/* ── 5. Hero (home) — compact strip ───────────────────────────────── */
.hero { border-bottom: 1px solid var(--border); background: linear-gradient(90deg, var(--bg-3), var(--bg)); display: flex; align-items: center; justify-content: center; padding: 1.25rem 1rem; }
.hero__title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }

/* ── 6. Game grid / cards ─────────────────────────────────────────── */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.game-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.game-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(47,111,237,.12); }
.card-link { display: contents; }

.card-img-wrap { overflow: hidden; }
.card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-3); }

.card-body { padding: .55rem .65rem .65rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.card-body h3 { font-size: .95rem; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--accent); text-decoration: none; }

.card-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }

.genre-badge {
    display: inline-block; padding: .05rem .4rem; border-radius: 2px;
    font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
    background: var(--bg-3); color: var(--muted); border: 1px solid var(--border);
}
.genre-action    { background: rgba(220,38,38,.10); color: #b91c1c; border-color: rgba(220,38,38,.25); }
.genre-adventure { background: rgba(217,119,6,.10); color: #b45309; border-color: rgba(217,119,6,.25); }
.genre-rpg       { background: rgba(47,111,237,.10); color: #1d4ed8; border-color: rgba(47,111,237,.25); }
.genre-strategy  { background: rgba(109,40,217,.10); color: #6d28d9; border-color: rgba(109,40,217,.25); }
.genre-simulator { background: rgba(13,157,108,.10); color: #047857; border-color: rgba(13,157,108,.25); }
.genre-puzzle    { background: rgba(14,116,144,.10); color: #0e7490; border-color: rgba(14,116,144,.25); }
.genre-horror    { background: rgba(190,18,60,.10); color: #be123c; border-color: rgba(190,18,60,.25); }
.genre-platformer{ background: rgba(47,111,237,.10); color: #1d4ed8; border-color: rgba(47,111,237,.25); }
.genre-indie     { background: rgba(146,64,14,.10); color: #92400e; border-color: rgba(146,64,14,.25); }
.genre-other     { background: var(--bg-3); color: var(--muted); }

.engine-icon { font-size: .7rem; color: var(--muted); }

.card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: .35rem; border-top: 1px solid var(--border); margin-top: auto;
}
.price-tag { font-weight: 700; font-size: .78rem; }
.price-free { color: var(--accent-2); }
.price-paid { color: var(--text); }
.rating-stars { font-size: .72rem; color: var(--warning); letter-spacing: 1px; }

/* ── 7. Catalog: sidebar filters ──────────────────────────────────── */
.catalog-layout {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.filters-side {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .65rem;
    position: sticky;
    top: 4.5rem;
}
.filters-side form { display: flex; flex-direction: column; gap: .55rem; }
.filters-side__group label {
    display: block;
    margin-bottom: .18rem;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}
.filters-side .filter-select,
.filters-side .filter-text {
    width: 100%;
    padding: .22rem .45rem;
    font-size: .78rem;
}
.filters-side__actions { display: flex; gap: .4rem; margin-top: .15rem; }
.filters-side__actions .btn { flex: 1; justify-content: center; padding: .3rem .5rem; font-size: .8rem; }
.catalog-main { min-width: 0; }
.filter-select:focus, .filter-text:focus { border-color: var(--accent); }

.no-results { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.no-results__text { font-size: 1rem; }
.no-results__hint { font-size: .85rem; }

/* ── 8. Pagination ────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: .3rem; padding: 1.25rem 0; }
.pagination a, .pagination__link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 28px; padding: 0 .45rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--muted); font-size: .8rem; font-weight: 500; background: var(--bg-2);
}
.pagination a:hover, .pagination__link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.pagination__link.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── 9. Blog grid — dense ─────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.blog-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.blog-card:hover { border-color: var(--accent); }
.blog-card__link { color: var(--text); }
.blog-card__link:hover { text-decoration: none; }
.blog-card__thumb img { width: 100%; aspect-ratio: 16/7; object-fit: cover; background: var(--bg-3); }
.blog-card__title { font-size: .85rem; font-weight: 600; line-height: 1.3; padding: .5rem .6rem .2rem; }
.blog-card__excerpt { font-size: .78rem; color: var(--muted); padding: 0 .6rem; line-height: 1.4; }
.blog-card__footer { display: flex; align-items: center; justify-content: space-between; padding: .4rem .6rem .55rem; font-size: .72rem; color: var(--muted); }
.blog-card__tags { display: flex; gap: .3rem; flex-wrap: wrap; }
.tag-chip {
    display: inline-block; padding: .05rem .45rem; background: var(--bg-3);
    border: 1px solid var(--border); border-radius: 2px; font-size: .68rem; color: var(--muted);
}
.tag-chip:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.filter-notice { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .75rem; margin-bottom: .9rem; }
.filter-notice strong { color: var(--text); }
.filter-notice__clear { color: var(--accent); font-weight: 600; text-decoration: none; margin-left: auto; }
.filter-notice__clear:hover { text-decoration: underline; }

.blog-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; }
.blog-summary-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.blog-summary-card:hover { border-color: var(--accent); }
.blog-summary-card a { color: var(--text); }
.blog-summary-card a:hover { text-decoration: none; }
.blog-summary-card__thumb img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.blog-summary-card__body { padding: .55rem .6rem .6rem; }
.blog-summary-card__title { font-size: .85rem; font-weight: 600; line-height: 1.3; }
.blog-summary-card__excerpt { font-size: .78rem; color: var(--muted); line-height: 1.4; margin-top: .25rem; }
.blog-summary-card__meta { display: flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--muted); margin-top: .4rem; }

/* How-to (home) */
.how-to-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; }
.feature-box { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem .85rem; }
.feature-box__icon { font-size: 1.2rem; display: block; margin-bottom: .3rem; }
.feature-box h3 { font-size: .88rem; font-weight: 600; margin-bottom: .2rem; }
.feature-box p { font-size: .78rem; color: var(--muted); }

/* ── 10. Game detail page ─────────────────────────────────────────── */
.game-detail { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; position: relative; overflow: hidden; }
.game-detail--has-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, var(--bg-2) 0%, rgba(var(--bg-2-rgb), .6) 45%, rgba(var(--bg-2-rgb), 0) 100%),
        var(--detail-bg);
    background-repeat: no-repeat, no-repeat;
    background-position: left center, right center;
    background-size: 100% 100%, cover;
}
.game-detail--has-bg > .game-detail__inner { position: relative; z-index: 1; }
.game-detail__inner { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; }
.game-detail__cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--bg-3); }
.game-detail__meta-block h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: .4rem; }

.author-pill { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; margin-bottom: .5rem; }
.author-pill:hover { color: var(--accent); text-decoration: none; }
.author-meta { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .5rem; }
.author-meta__line { font-size: .8rem; color: var(--muted); }
.author-meta__line strong { color: var(--text); }
.author-meta__line .author-pill { margin-bottom: 0; }

.genre-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.detail-info { font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.detail-info strong { color: var(--text); }
.detail-rating { font-size: .85rem; margin-bottom: .3rem; }
.detail-price { font-size: 1.1rem; font-weight: 700; margin-bottom: .6rem; }

.action-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }

.game-description { line-height: 1.6; font-size: .9rem; }
.game-description h2 { font-size: 1.1rem; margin: .75rem 0 .4rem; }
.game-description p { margin-bottom: .5rem; }

.screenshots-scroll { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; }
.screenshot-item { flex: 0 0 260px; }
.screenshot-item img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }

.tags-row { display: flex; gap: .4rem; flex-wrap: wrap; }

.accordion { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); margin-bottom: .4rem; }
.accordion summary { cursor: pointer; padding: .5rem .7rem; font-size: .85rem; font-weight: 600; }
.accordion summary:hover { color: var(--accent); }
.accordion[open] summary { border-bottom: 1px solid var(--border); }
.accordion .form-section { padding: .7rem; }
.changelog-list { list-style: disc; padding: .4rem .7rem .6rem 1.6rem; font-size: .82rem; }
.changelog-list li { margin-bottom: .15rem; }
.version-history { margin-top: .4rem; }

/* Reviews */
.review-list { display: flex; flex-direction: column; gap: .5rem; }
.review-item { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .75rem; }
.review-item__header { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }
.review-item__text { font-size: .85rem; line-height: 1.5; }
.review-stars { color: var(--warning); font-size: .8rem; }

/* Comments */
.comment-thread { margin-top: .5rem; }
.comment-item { padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.comment-nested { border-left: 2px solid var(--border); padding-left: .6rem; margin-top: .3rem; }
.comment-header { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .78rem; }
.comment-header strong { color: var(--text); }
.comment-header time { color: var(--muted); }
.comment-text { margin: .2rem 0 .3rem; }
.reply-trigger { background: none; border: none; color: var(--accent); cursor: pointer; font-size: .72rem; padding: 0; }
.reply-form { margin-top: .4rem; padding: .5rem; background: var(--bg-3); border-radius: var(--radius); }
.reply-input { width: 100%; }
.reply-actions { display: flex; gap: .4rem; margin-top: .35rem; }

.comment-write-form, .review-form { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .7rem; margin: .6rem 0; }

/* ── 11. Forms ────────────────────────────────────────────────────── */
.form-group { margin-bottom: .6rem; }
.form-group label { display: block; font-weight: 600; font-size: .78rem; color: var(--muted); margin-bottom: .2rem; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"],
.form-group input[type="number"], .form-group input[type="search"], .form-group input[type="file"],
.form-group select, .form-group textarea,
.form-input, .form-textarea, .form-select, .filter-text, .filter-select {
    display: block; width: 100%;
    padding: .35rem .55rem;
    background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); font-size: .82rem; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--accent); }
.form-group input[type="checkbox"], .form-group input[type="radio"] { accent-color: var(--accent); width: 14px; height: 14px; }
.form-textarea { resize: vertical; min-height: 90px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%235b6b82' d='M5 7L1 3h8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; padding-right: 1.8rem; }
.form-checkbox { display: flex; align-items: center; gap: .4rem; }
.form-checkbox label { margin: 0; font-weight: 400; }
.form-divider { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
.form-row { display: flex; gap: .6rem; }
.hint, .field-hint { font-size: .72rem; color: var(--muted); }
.field-error { color: var(--danger); font-size: .75rem; }
.field-error input, .field-error textarea { border-color: var(--danger); }

/* Auth pages */
.auth-page { display: flex; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 400px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.auth-card h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .9rem; }
.auth-link { display: block; text-align: center; margin-top: .8rem; font-size: .82rem; color: var(--muted); }
.auth-link:hover { color: var(--accent); }
.auth-divider { text-align: center; color: var(--muted); font-size: .72rem; margin: .8rem 0 .5rem; }
.social-login-placeholder { display: flex; gap: .5rem; }
.social-btn { flex: 1; }

/* ── 12. Alerts / flash ───────────────────────────────────────────── */
.alert { padding: .5rem .75rem; border: 1px solid; border-radius: var(--radius); margin-bottom: .75rem; font-size: .82rem; }
.alert-success { background: rgba(13,157,108,.08); border-color: rgba(13,157,108,.35); color: #047857; }
.alert-danger  { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.35); color: #b91c1c; }
.alert-warning { background: rgba(217,119,6,.08); border-color: rgba(217,119,6,.35); color: #b45309; }
.alert-info    { background: rgba(47,111,237,.08); border-color: rgba(47,111,237,.35); color: #1d4ed8; }
.alert-sm, .alert-small { padding: .35rem .6rem; font-size: .78rem; }

/* ── 13. Tables ───────────────────────────────────────────────────── */
.t-simple { width: 100%; border-collapse: collapse; font-size: .82rem; }
.t-simple th { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.t-simple td { padding: .45rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t-simple tr:hover td { background: var(--bg-3); }

/* Badges */
.badge { display: inline-block; padding: .1rem .45rem; border-radius: 2px; font-size: .68rem; font-weight: 600; }
.badge-sm { padding: .05rem .35rem; font-size: .62rem; }
.badge-warning { background: rgba(217,119,6,.15); color: #b45309; border: 1px solid rgba(217,119,6,.35); }

/* ── 14. Checkout ─────────────────────────────────────────────────── */
.checkout-page { max-width: 640px; margin: 0 auto; }
.checkout-page h1 { font-size: 1.25rem; margin-bottom: 1rem; }
.checkout-card { display: flex; gap: .9rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; margin-bottom: 1rem; }
.checkout-card__left { flex-shrink: 0; }
.checkout-card__thumb { width: 120px; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); }
.checkout-card__body h2 { font-size: 1rem; margin-bottom: .25rem; }
.checkout-card__price { font-size: 1.05rem; font-weight: 700; }

.payment-selector-form { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; }
.payment-methods { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .8rem; }
.payment-option {
    display: flex; align-items: center; gap: .55rem;
    padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--bg-2);
}
.payment-option:has(input:checked) { border-color: var(--accent); background: var(--bg-3); }
.payment-method-label { font-size: .85rem; }
.payment-method-desc { color: var(--muted); font-size: .72rem; }
.total-amount { display: flex; justify-content: space-between; padding: .5rem 0; border-top: 1px solid var(--border); font-weight: 700; }
.total-price { color: var(--accent-2); }
.security-note, .refund-policy { font-size: .72rem; color: var(--muted); margin: .4rem 0; }
.disabled-action:disabled { opacity: .45; }

/* ── 15. Download page ────────────────────────────────────────────── */
.download-page { max-width: 760px; margin: 0 auto; }
.download-page h1 { font-size: 1.3rem; margin-bottom: .75rem; }
.download-card { display: flex; gap: 1rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.download-card img { width: 150px; border-radius: var(--radius); }
.license-section { margin: 1rem 0; text-align: center; }
.license-key { display: inline-block; font-size: .9rem; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius); padding: .45rem .75rem; word-break: break-all; }
.release-history, .support-box { margin: 1rem 0; }
.support-box, .notice-block { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem .9rem; font-size: .82rem; }
.notice-warning { border-left: 3px solid var(--warning); }

/* ── 16. Dashboard ────────────────────────────────────────────────── */
.dashboard-content { display: flex; flex-direction: column; gap: 1rem; }
.dashboard-content h1 { font-size: 1.2rem; font-weight: 700; }

.d-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.d-stat { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .8rem; text-align: center; }
.d-stat span:first-child { display: block; font-size: 1.3rem; font-weight: 800; }
.d-stat span:last-child { font-size: .72rem; color: var(--muted); }
.d-stat--games .d-stat-number { color: var(--accent-2); }
.d-stat--purchases .d-stat-number { color: var(--accent); }

.quick-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.recent-activity, .dashboard-blog, .dashboard-my-games, .dashboard-purchases, .dashboard-settings, .dashboard-overview { display: block; }

.game-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.game-tile { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.game-tile:hover { border-color: var(--accent); }
.game-tile img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.game-tile h4 { font-size: .85rem; margin: 0; padding: .45rem .6rem 0; }
.game-tile .game-tile-body { padding: .4rem .6rem .6rem; }
.game-tile .muted { font-size: .72rem; }
.game-tile-actions { display: flex; gap: .4rem; margin-top: .4rem; }

.purchase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.purchase-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.purchase-card:hover { border-color: var(--accent); }
.purchase-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.purchase-card h4 { font-size: .85rem; margin: 0; padding: .45rem .6rem 0; }
.purchase-card .purchase-card-body { padding: .4rem .6rem .6rem; }
.purchase-card .muted { font-size: .72rem; }

.create-form, .dashboard-edit-form, .compose-form { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; }
.drop-zone { border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 1.2rem; text-align: center; cursor: pointer; }
.drop-zone:hover { border-color: var(--accent); }
.drop-zone p { font-size: .85rem; }
.drop-zone small { color: var(--muted); }

.user-posts-list { margin-top: 1rem; }
.compose-form { margin-bottom: 1rem; }

/* ── 17. Footer ───────────────────────────────────────────────────── */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: .9rem 0; margin-top: auto; }
.site-footer p { font-size: .78rem; color: var(--muted); }
.footer-links { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; }
.footer-links a { color: var(--muted); font-size: .78rem; }
.footer-links a:hover { color: var(--accent); }

/* ── 18. Misc ─────────────────────────────────────────────────────── */
.empty-state, .no-results--centered { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: .88rem; }
.avatar { border-radius: 50%; object-fit: cover; }
.strength-meter { margin-top: .3rem; }
.strength-criteria { list-style: none; font-size: .72rem; color: var(--muted); }
.criteria-item { margin-bottom: .1rem; }
.strength-meter .met { color: var(--accent-2); }

.pagination--short { display: inline-flex; }
.blog-related-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .75rem; font-size: .85rem; color: var(--text); display: block; }
.blog-related-card:hover { border-color: var(--accent); text-decoration: none; }
.blog-scroll-row { display: flex; gap: .5rem; overflow-x: auto; }

/* Post (blog detail) */
.blog-detail { max-width: 860px; margin: 0 auto; }
.blog-detail__hero img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.blog-detail__header h1 { font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin: .75rem 0 .5rem; }
.blog-detail__meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; color: var(--muted); font-size: .8rem; margin-bottom: .5rem; }
.blog-detail__author { color: var(--text); font-weight: 600; }
.blog-detail__divider { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }
.content-block { font-size: .92rem; line-height: 1.7; }
.content-block p { margin-bottom: .6rem; }
.content-block h2 { font-size: 1.15rem; margin: 1rem 0 .4rem; }
.content-block h3 { font-size: 1rem; margin: .9rem 0 .3rem; }
.content-block ul, .content-block ol { padding-left: 1.4rem; margin-bottom: .6rem; }
.content-block ul { list-style: disc; }
.content-block ol { list-style: decimal; }
.content-block blockquote { border-left: 3px solid var(--accent); padding: .5rem .8rem; background: var(--bg-3); margin: .6rem 0; color: var(--muted); font-style: italic; }
.content-block code { background: var(--bg-3); padding: .1rem .3rem; border-radius: 2px; font-size: .85em; }
.content-block pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem; overflow-x: auto; margin: .6rem 0; }
.content-block pre code { background: none; padding: 0; }
.content-block img { max-width: 100%; height: auto; display: block; margin: .6rem auto; border-radius: var(--radius); }
.blog-detail__views { color: var(--muted); font-size: .8rem; }
.blog-detail__author-bio { display: flex; gap: .8rem; align-items: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .9rem; margin: 1rem 0; }
.blog-detail__author-bio .bio-text strong { display: block; }
.blog-detail__author-bio .bio-text p { font-size: .8rem; color: var(--muted); }
.blog-detail__tags { display: flex; gap: .4rem; flex-wrap: wrap; margin: .75rem 0; }

/* ── Lightbox (fullscreen image viewer) ───────────────────────────── */
[data-lightbox] img { cursor: zoom-in; }
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
}
#lightbox.is-open { display: flex; }
.lightbox__figure {
    margin: 0;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox__img {
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 95vh;
    border-radius: var(--radius);
    box-shadow: 0 0 40px rgba(0, 0, 0, .6);
    cursor: default;
}
.lightbox__close,
.lightbox__nav {
    position: fixed;
    z-index: 10001;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }
.lightbox__counter {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .85);
    font-size: .85rem;
    background: rgba(0, 0, 0, .5);
    padding: .25rem .75rem;
    border-radius: 999px;
}


/* ── Header extras: notifications bell / language switch ──────────── */
.notif-bell {
    position: relative;
    font-size: 1.05rem;
    text-decoration: none;
    padding: .15rem .3rem;
}
.notif-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    font-size: .62rem;
    line-height: 1;
    padding: .14rem .32rem;
    font-weight: 700;
}
.lang-switch { font-size: .78rem; color: var(--muted); }
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--accent); }
#theme-toggle { font-size: 1rem; padding: .1rem .5rem; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .nav-desktop { display: none; }
    .burger-btn { display: flex; }
    .search-form { flex: 1 1 auto; }
    .game-detail__inner { grid-template-columns: 160px 1fr; }
    .catalog-layout { grid-template-columns: 1fr; }
    .filters-side { position: static; }
}

@media (max-width: 560px) {
    html { font-size: 14px; }
    .header__inner { flex-wrap: wrap; height: auto; padding: .5rem 0; gap: .5rem; }
    .header { position: relative; height: auto; }
    .nav-mobile { top: auto; }
    .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
    .blog-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .game-detail__inner { grid-template-columns: 1fr; }
}

/* Static pages (About / Contacts) */
.static-page { max-width: 760px; margin: 1.5rem auto; padding: 0 1rem; }
.static-page h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: .8rem; }
.static-page p { font-size: .95rem; line-height: 1.7; color: var(--muted); margin-bottom: .9rem; }
.static-page .lead { color: var(--text); }
.static-page .lead strong { color: var(--accent); }
.static-page abbr { text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: help; }
.contact-list { list-style: none; padding: 0; margin: 1rem 0; }
.contact-list li { display: flex; align-items: baseline; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.contact-list__label { min-width: 90px; font-weight: 600; color: var(--text); }
.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
