/* ============================================================
   WAP ŽAIDIMAI — šviesus „old WML" stilius (baltas fonas)
   Mobile-first. Pikseliniai šriftai, švarūs rėmai, klasikinė
   WAP mėlyna, auksinės žvaigždutės. Be neono / CRT efektų.
   ============================================================ */

:root {
    /* fonai */
    --bg:        #e9e4d6;
    --bg-2:      #efeee9;
    --screen:    #ffffff;
    --panel:     #ffffff;
    --panel-2:   #f6f5f1;
    --inset:     #f1f0ea;

    /* linijos */
    --line:      #d2d0c7;
    --line-hi:   #2c2b27;   /* stiprus tamsus rėmas pikselinėms kortelėms */

    /* tekstas */
    --text:      #1c1c1a;
    --muted:     #5a584f;

    /* akcentai */
    --accent:    #1f3fae;   /* klasikinė WAP mėlyna (nuorodos, antraštės, CTA) */
    --accent-dk: #152f86;
    --accent-sh: #0e2168;
    --hot:       #d23b1e;   /* retro raudona/oranžinė (#1, akcentai) */
    --hot-sh:    #8f2510;
    --green:     #1f8a4c;
    --amber:     #cf8c00;   /* auksinės žvaigždutės (tamsesnės baltam fonui) */
    --red:       #cc2b2b;
    --red-sh:    #8c1c1c;

    /* šriftai */
    --font-pixel:  'Press Start 2P', monospace;
    --font-screen: 'VT323', 'Courier New', monospace;

    /* formos */
    --shadow-hard: 4px 4px 0 rgba(0,0,0,.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-screen);
    font-size: 21px;
    line-height: 1.35;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(rgba(31, 63, 174, .06) 1px, transparent 1px),
        radial-gradient(rgba(0, 0, 0, .045) 1px, transparent 1px);
    background-size: 18px 18px, 18px 18px;
    background-position: 0 0, 9px 9px;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    padding-bottom: 78px;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); text-decoration: underline; }

/* Matomas klaviatūros fokusas (a11y) */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

img { max-width: 100%; }

/* CRT/scanline perdangos išjungtos šviesioje temoje */
.scanlines, .crt-vignette { display: none; }

/* ---------- „Ekrano" rėmas ---------- */
.screen {
    width: calc(100% - 16px);
    max-width: 1000px;
    margin: 8px auto;
    background-color: var(--screen);
    background-image: radial-gradient(rgba(0, 0, 0, .022) 1px, transparent 1px);
    background-size: 16px 16px;
    min-height: calc(100vh - 16px);
    border: 2px solid var(--line-hi);
    border-radius: 30px;
    box-shadow: 0 0 0 4px #e6e3d7, 0 10px 28px rgba(0,0,0,.18);
    overflow: clip;
}
@media (min-width: 1040px) {
    .screen {
        margin: 18px auto 26px;
        min-height: 0;
        border-radius: 14px;
        box-shadow: 0 0 0 5px #e7e6df, 0 18px 40px rgba(0,0,0,.18);
    }
}

/* ---------- Telefono būsenos juosta ---------- */
.statusbar {
    display: flex; align-items: center; justify-content: space-between;
    background: #e9e8e1;
    border-bottom: 1px solid var(--line);
    padding: 6px 12px;
    font-family: var(--font-pixel);
    font-size: 8px;
    color: #4a4a44;
    letter-spacing: .5px;
}
.sb-side { display: inline-flex; align-items: center; gap: 6px; }
.sb-clock { color: var(--accent); }
.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.signal i { width: 2px; background: #4a4a44; }
.signal i:nth-child(1){ height: 3px; } .signal i:nth-child(2){ height: 5px; }
.signal i:nth-child(3){ height: 7px; } .signal i:nth-child(4){ height: 9px; }
.signal i:nth-child(5){ height: 10px; opacity: .3; }
.batt { width: 18px; height: 9px; border: 1px solid #4a4a44; position: relative; padding: 1px; }
.batt::after { content:""; position:absolute; right:-3px; top:2px; width:2px; height:3px; background:#4a4a44; }
.batt b { display: block; height: 100%; width: 80%; background: #4a4a44; }

/* ---------- Antraštė ---------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: #fff;
    border-bottom: 2px solid var(--line-hi);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
}
.logo {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--text);
    display: inline-flex; align-items: center; gap: 6px;
    line-height: 1;
}
.logo:hover { text-decoration: none; }
.logo-mark { color: var(--hot); animation: blink 1.1s steps(1) infinite; }
.logo-accent { color: var(--accent); margin-left: 2px; }
.caret { width: 9px; height: 14px; background: var(--accent); animation: blink 1s steps(1) infinite; }

.nav-desktop { display: none; }
@media (min-width: 760px) {
    .nav-desktop { display: flex; align-items: center; gap: 18px; }
    .nav-desktop a:not(.btn) { color: var(--text); font-size: 20px; }
    .nav-desktop a:not(.btn):hover { color: var(--accent); }
    .nav-user {
        display: inline-flex; align-items: center; gap: 7px;
        font-size: 19px; color: var(--text);
        border: 1px solid var(--line); padding: 4px 8px; background: var(--inset);
    }
    .nav-user:hover { color: var(--accent); text-decoration: none; }
}

/* ---------- Navigacijos paieška ---------- */
.nav-search { display: inline-flex; align-items: stretch; }
.nav-search-input {
    font-family: var(--font-screen);
    font-size: 18px;
    width: 150px;
    min-width: 0;
    padding: 6px 9px;
    border: 2px solid var(--line);
    border-right: none;
    background: #fff;
    color: var(--text);
    transition: width .18s ease;
}
.nav-search-input::placeholder { color: var(--muted); }
.nav-search-input:focus { outline: none; border-color: var(--accent); }
.nav-search--expanded .nav-search-input { width: 230px; }
.nav-search-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    font-size: 17px;
    line-height: 1;
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent-sh);
    cursor: pointer;
    transition: background .1s;
}
.nav-search-btn:hover { background: var(--accent-dk); }
.nav-search-btn:active { background: var(--accent-sh); }

/* ---------- Bėganti eilutė (marquee) ---------- */
.ticker { overflow: hidden; background: var(--accent); border-bottom: 2px solid var(--accent-sh); white-space: nowrap; }
.ticker-track {
    display: inline-flex; will-change: transform;
    animation: marquee 22s linear infinite;
    font-family: var(--font-pixel); font-size: 8px; color: #fff;
    padding: 7px 0; letter-spacing: 1px;
}

/* ---------- Konteineris ---------- */
.container { padding: 0 16px; }
.page { padding-top: 22px; padding-bottom: 40px; }

/* ---------- Antraščių blokai ---------- */
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin: 6px 0 16px;
    border-bottom: 2px solid var(--line-hi); padding-bottom: 9px;
}
h1, h2, h3 { font-family: var(--font-pixel); line-height: 1.4; margin: 0; }
h1 { font-size: 16px; color: var(--accent); }
h2 { font-size: 13px; color: var(--text); }
.section-head h1, .section-head h2 { display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); font-size: 18px; }

/* ---------- Mygtukai (pikseliniai) ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: var(--font-pixel); font-size: 10px; line-height: 1;
    padding: 12px 16px; cursor: pointer;
    border: 2px solid var(--line-hi); border-radius: 0; color: var(--text); background: #fff;
    box-shadow: 4px 4px 0 var(--line-hi);
    text-transform: uppercase; letter-spacing: .5px;
    transition: transform .05s, box-shadow .05s, filter .15s;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--line-hi); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent-sh); box-shadow: 4px 4px 0 var(--accent-sh); }
.btn-primary:active { box-shadow: 0 0 0 var(--accent-sh); }
.btn-secondary { background: #fff; color: var(--accent); border-color: var(--line-hi); box-shadow: 4px 4px 0 var(--line-hi); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red-sh); box-shadow: 4px 4px 0 var(--red-sh); }
.btn-danger:active { box-shadow: 0 0 0 var(--red-sh); }
.btn-sm { font-size: 8px; padding: 9px 11px; box-shadow: 3px 3px 0 var(--line-hi); }
.btn-sm.btn-primary { box-shadow: 3px 3px 0 var(--accent-sh); }
.btn-sm.btn-danger { box-shadow: 3px 3px 0 var(--red-sh); }
.btn-block { display: flex; width: 100%; }

/* ---------- Įspėjimai ---------- */
.alert { font-size: 19px; padding: 12px 14px; margin-bottom: 18px; border: 2px solid; border-left-width: 6px; background: #fff; }
.alert-success { border-color: var(--green); color: var(--green); background: #f1faf4; }
.alert-error { border-color: var(--red); color: var(--red); background: #fdf2f2; }

/* ---------- Populiariausi (horizontali nuotraukų juosta) ---------- */
.top-list {
    list-style: none; margin: 0 0 28px; padding: 2px 0 10px;
    display: flex; gap: 12px; overflow-x: auto;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.top-list::-webkit-scrollbar { height: 8px; }
.top-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 0; }
.top-item { flex: 0 0 auto; scroll-snap-align: start; animation: pop .4s backwards; }
.top-item:nth-child(1){animation-delay:.04s}.top-item:nth-child(2){animation-delay:.09s}
.top-item:nth-child(3){animation-delay:.14s}.top-item:nth-child(4){animation-delay:.19s}
.top-item:nth-child(5){animation-delay:.24s}
.top-card { display: flex; flex-direction: column; align-items: center; width: 84px; }
.top-card:hover { text-decoration: none; }
.top-thumb {
    position: relative; width: 84px; height: 84px;
    border: 2px solid var(--line-hi); box-shadow: 3px 3px 0 rgba(0,0,0,.14);
    background: #f1f0ea;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    transition: transform .12s, box-shadow .12s, border-color .12s;
}
.top-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.top-thumb .no-img { font-size: 30px; }
.top-rank {
    position: absolute; top: 0; left: 0; z-index: 2;
    font-family: var(--font-pixel); font-size: 8px; color: #fff;
    background: var(--accent); padding: 3px 5px;
}
.top-item:first-child .top-rank { background: var(--hot); }
.top-name {
    margin-top: 7px; font-size: 15px; line-height: 1.15; text-align: center;
    color: var(--text); max-width: 84px;
}
.top-card:hover .top-thumb { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 rgba(0,0,0,.2); border-color: var(--accent); }
.top-card:hover .top-name { color: var(--accent); }

/* ---------- Žaidimų tinklelis ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card {
    background: var(--panel); border: 2px solid var(--line-hi); box-shadow: var(--shadow-hard);
    display: flex; flex-direction: column;
    transition: transform .12s, box-shadow .12s, border-color .12s;
    animation: pop .45s cubic-bezier(.2,.7,.3,1.25) backwards;
}
.card:nth-child(1){animation-delay:.03s}.card:nth-child(2){animation-delay:.07s}
.card:nth-child(3){animation-delay:.11s}.card:nth-child(4){animation-delay:.15s}
.card:nth-child(5){animation-delay:.19s}.card:nth-child(6){animation-delay:.23s}
.card:nth-child(7){animation-delay:.27s}.card:nth-child(8){animation-delay:.31s}
.card:nth-child(9){animation-delay:.35s}.card:nth-child(10){animation-delay:.39s}
.card:nth-child(11){animation-delay:.43s}.card:nth-child(12){animation-delay:.47s}
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0,0,0,.2); border-color: var(--accent); }
.card-thumb {
    display: block; aspect-ratio: 1 / 1; overflow: hidden; position: relative;
    background: #f1f0ea;
    border-bottom: 2px solid var(--line-hi);
}
.card-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.no-img { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 34px; color: #8d8a7e; }
.card-body { padding: 11px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { font-family: var(--font-pixel); font-size: 10px; line-height: 1.5; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-desc { color: var(--muted); font-size: 17px; line-height: 1.25; margin: 0; flex: 1; }
.card-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 17px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 7px;
}

/* ---------- Žvaigždutės ---------- */
.stars { color: #c9c6bb; font-size: 17px; letter-spacing: 2px; white-space: nowrap; }
.stars .star.on { color: var(--amber); }

/* ---------- Vieno žaidimo puslapis ---------- */
.game-detail { display: flex; flex-direction: column; gap: 16px; }
.game-detail .cover {
    border: 2px solid var(--line-hi); box-shadow: var(--shadow-hard); overflow: hidden;
    background: linear-gradient(135deg, #eceae3, #dcdad1);
}
.game-detail .cover img { width: 100%; display: block; }
.game-detail .cover .no-img { aspect-ratio: 16/10; font-size: 64px; }
.game-info h1 { margin-bottom: 12px; font-size: 18px; }
.game-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 18px; margin: 4px 0 14px; }
.game-desc { white-space: pre-wrap; margin: 14px 0; font-size: 20px; color: #2c2c28; }

.panel { background: var(--panel); border: 2px solid var(--line-hi); padding: 16px; margin-top: 18px; box-shadow: var(--shadow-hard); }
.panel h2 { margin-bottom: 14px; }

/* interaktyvus vertinimas */
.rate-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; font-size: 34px; }
.rate-stars button { background: none; border: 0; cursor: pointer; color: #c9c6bb; padding: 0 2px; line-height: 1; transition: transform .08s, color .1s; }
.rate-stars button:hover, .rate-stars button:hover ~ button,
.rate-stars button.selected, .rate-stars button.selected ~ button { color: var(--amber); }
.rate-stars button:hover { transform: scale(1.2) translateY(-2px); }
.rate-msg { display: block; margin-top: 8px; font-size: 18px; color: var(--muted); }

/* komentarai */
.comment-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.comment { border: 2px solid var(--line); border-left: 4px solid var(--accent); padding: 11px 13px; background: var(--inset); }
.comment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.comment-author { font-family: var(--font-pixel); font-size: 9px; color: var(--accent); }
.comment-date { color: var(--muted); font-size: 16px; }
.comment-body { margin: 0; white-space: pre-wrap; font-size: 19px; }

/* ---------- Formos ---------- */
.form-card { max-width: 460px; margin: 12px auto; background: var(--panel); border: 2px solid var(--line-hi); box-shadow: var(--shadow-hard); padding: 22px; }
.form-card h1 { margin-bottom: 18px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-family: var(--font-pixel); font-size: 9px; color: var(--accent); margin-bottom: 8px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 11px 12px; font-family: var(--font-screen); font-size: 20px;
    color: var(--text); background: #fff; border: 2px solid var(--line);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,63,174,.15); }
.form-group textarea { min-height: 110px; resize: vertical; }
.form-hint { color: var(--muted); font-size: 16px; margin-top: 5px; }
.field-error { color: var(--red); font-size: 16px; margin-top: 5px; }
.form-foot { margin-top: 10px; text-align: center; color: var(--muted); font-size: 18px; }

/* ---------- Puslapiavimas ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
    font-family: var(--font-pixel); font-size: 9px; padding: 10px 12px;
    border: 2px solid var(--line-hi); background: #fff; color: var(--text);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent-sh); }

/* ---------- Tuščia būsena ---------- */
.empty { text-align: center; color: var(--muted); padding: 44px 18px; font-size: 20px; }
.empty .btn { margin-top: 14px; }

/* ---------- Apatinė tab-juosta (mobili) ---------- */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 8px; z-index: 55;
    width: min(calc(100% - 16px), 1000px); margin: 0 auto;
    display: flex; background: #fff;
    border: 2px solid var(--line-hi);
    border-radius: 0 0 28px 28px;
    box-shadow: 0 0 0 4px #e6e3d7, 0 8px 18px rgba(0,0,0,.14);
    overflow: hidden;
}
.tab {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 2px 10px; color: var(--muted); font-size: 13px;
    border-right: 1px solid var(--line);
}
.tab:last-child { border-right: 0; }
.tab .tab-ic { font-size: 18px; line-height: 1; }
.tab .tab-tx {
    font-family: var(--font-pixel); font-size: 7px; letter-spacing: .3px;
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tab:hover, .tab.active { color: var(--accent); text-decoration: none; }
.tab.active { background: #eef1fb; }
.tab--accent { color: var(--accent); }
.tab--accent .tab-ic { color: var(--hot); }
/* Siaurame telefone (po telefono rėmeliu) ilgi žodžiai netelpa 7px dydžiu */
@media (max-width: 389px) {
    .tab .tab-tx { font-size: 6px; letter-spacing: .2px; }
}
@media (min-width: 760px) {
    .tabbar { display: none; }
    body { padding-bottom: 0; }
}

/* ---------- Poraštė ---------- */
.site-footer { border-top: 2px solid var(--line); padding: 22px 0 28px; text-align: center; }
.foot-line { font-family: var(--font-pixel); font-size: 9px; color: var(--accent); margin: 0 0 8px; }
.foot-sub { color: var(--muted); font-size: 16px; margin: 0; letter-spacing: 1px; }
.foot-counter { margin-top: 16px; }
.foot-counter img { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; border: 0; }

/* Honeypot (antispam): paslėptas nuo žmonių, bet lieka DOM'e robotams */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-layout { display: block; }
.admin-side {
    background: #f1f0ea; border-bottom: 2px solid var(--line-hi);
    display: flex; flex-wrap: wrap; gap: 4px; padding: 10px;
}
.admin-side .side-title { display: none; }
.admin-side a {
    color: var(--text); font-family: var(--font-pixel); font-size: 8px;
    padding: 9px 11px; border: 1px solid var(--line); background: #fff;
}
.admin-side a:hover, .admin-side a.active { color: #fff; background: var(--accent); border-color: var(--accent-sh); text-decoration: none; }
.admin-main { padding: 20px 16px 40px; }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--panel); border: 2px solid var(--line-hi); box-shadow: var(--shadow-hard); padding: 16px; }
.stat-card .num { font-family: var(--font-pixel); font-size: 18px; color: var(--accent); }
.stat-card .lbl { color: var(--muted); font-size: 16px; margin-top: 8px; }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 2px solid var(--line-hi); }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 18px; vertical-align: middle; }
.table th { background: var(--inset); font-family: var(--font-pixel); font-size: 8px; color: var(--accent); text-transform: uppercase; }
.table tr:last-child td { border-bottom: 0; }
.table .thumb-xs { width: 56px; height: 40px; object-fit: cover; border: 1px solid var(--line-hi); }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { display: inline; }

.badge { display: inline-block; padding: 3px 8px; font-family: var(--font-pixel); font-size: 7px; border: 1px solid; text-transform: uppercase; background: #fff; }
.badge-pending  { color: var(--amber); border-color: var(--amber); }
.badge-approved { color: var(--green); border-color: var(--green); }
.badge-rejected { color: var(--red);   border-color: var(--red); }
.badge-blocked  { color: var(--red);   border-color: var(--red); }
.badge-active   { color: var(--green); border-color: var(--green); }
.badge-admin    { color: var(--accent); border-color: var(--accent); }

@media (min-width: 920px) {
    .stat-row { grid-template-columns: repeat(4, 1fr); }
    .admin-main { padding: 26px 30px 50px; }
}

/* ---------- Platus ekranas ---------- */
@media (min-width: 760px) {
    .game-detail { display: grid; grid-template-columns: 340px 1fr; align-items: start; gap: 24px; }
    .grid { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

/* ---------- Žaidimų lankomumo statistika ---------- */
code {
    font-family: var(--font-screen); font-size: 18px;
    background: var(--inset); border: 1px solid var(--line); padding: 1px 6px;
}
.badge-ok  { color: var(--green); font-weight: bold; }
.badge-err {
    display: inline-block; padding: 2px 7px; font-family: var(--font-pixel); font-size: 7px;
    color: var(--red); border: 1px solid var(--red); text-transform: uppercase; background: #fff;
}
.stats-state { font-size: 18px; }
.install-steps { margin: 6px 0 14px; padding-left: 22px; font-size: 18px; line-height: 1.7; }
.install-steps li { margin-bottom: 10px; }

.stat-bars { display: flex; flex-direction: column; gap: 5px; }
.sb-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; }
.sb-day { font-family: var(--font-screen); font-size: 17px; color: var(--text); }
.sb-track { background: var(--inset); border: 1px solid var(--line); height: 16px; overflow: hidden; }
.sb-fill { display: block; height: 100%; background: var(--accent); min-width: 1px; }
.sb-val { font-family: var(--font-screen); font-size: 17px; white-space: nowrap; color: var(--muted); }
.sb-val b { color: var(--accent); }

/* ---------- Animacijos ---------- */
@keyframes blink   { 0%,50% { opacity: 1 } 50.01%,100% { opacity: 0 } }
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }
@keyframes pop     { from { opacity: 0; transform: translateY(14px) scale(.96) } to { opacity: 1; transform: none } }
@keyframes slidein { from { opacity: 0; transform: translateX(-14px) } to { opacity: 1; transform: none } }
@keyframes pulse   { 0%,100% { transform: scale(1) } 50% { transform: scale(1.18) } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   PATOBULINIMAI — atmosfera ir senojo interneto charakteris
   ============================================================ */

/* Pasveikinimo „deck" */
.hero { border: 2px solid var(--line-hi); box-shadow: var(--shadow-hard); background: #fff; margin-bottom: 26px; }
.hero-bar {
    background: var(--accent); color: #fff; text-align: center;
    font-family: var(--font-pixel); font-size: 9px; letter-spacing: 1px;
    padding: 8px 12px; border-bottom: 2px solid var(--accent-sh);
}
.hero-body {
    display: flex; align-items: center; gap: 16px; padding: 16px 18px;
    background:
        radial-gradient(rgba(31,63,174,.05) 1px, transparent 1px) 0 0 / 12px 12px,
        linear-gradient(180deg, #fbfbf8, #f2f0e7);
}
.hero-art { width: 74px; height: 48px; flex: 0 0 auto; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.12)); }
.hero-text { flex: 1; min-width: 0; }
.hero-lead { margin: 0 0 4px; font-size: 22px; color: var(--text); line-height: 1.25; }
.hero-lead b { color: var(--accent); }
.hero-era { display: inline-block; font-family: var(--font-pixel); font-size: 8px; color: #fff; background: var(--hot); padding: 3px 6px; vertical-align: middle; margin-left: 4px; }
.hero-sub { margin: 0 0 12px; color: var(--muted); font-size: 18px; }
.stats-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stats-strip li { font-family: var(--font-pixel); font-size: 8px; color: var(--text); background: var(--inset); border: 1px solid var(--line); padding: 7px 9px; }
.stats-strip b { color: var(--accent); font-size: 11px; }
.footer-stats { justify-content: center; margin: 0 auto 12px; }
@media (max-width: 460px) {
    .hero-body { flex-direction: column; text-align: center; }
    .stats-strip { justify-content: center; }
}

/* „NAUJA" ženkliukas ant kortelės */
.badge-new {
    position: absolute; top: 8px; right: -2px; z-index: 3;
    font-family: var(--font-pixel); font-size: 7px; color: #fff;
    background: var(--hot); padding: 4px 7px; box-shadow: 2px 2px 0 var(--hot-sh);
    animation: newpulse 1.6s ease-in-out infinite;
}

/* LCD scanline ant nuotraukų (telefono ekrano pojūtis) */
.game-detail .cover { position: relative; }
.card-thumb::after, .top-thumb::after, .game-detail .cover::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 2px, transparent 2px 4px);
}

/* Apsilankymų skaitiklis (odometras) */
.visit-counter { font-family: var(--font-pixel); font-size: 8px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.odo { display: inline-flex; gap: 2px; }
.odo b { background: #fff; color: var(--accent); font-weight: bold; padding: 4px 5px; min-width: 13px; text-align: center; border: 1px solid var(--line-hi); }
.foot-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 10px; }
.foot-badges span { font-family: var(--font-pixel); font-size: 7px; color: var(--muted); border: 1px solid var(--line); padding: 4px 6px; }

@keyframes newpulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.08) } }

/* ============================================================
   PM / PRIVAČIOS ŽINUTĖS — WhatsApp stiliaus chatas
   ============================================================ */

/* --- Navigacijos žinutės mygtukas --- */
.nav-msgs {
    position: relative;
    font-size: 20px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    color: var(--text);
    border: 1px solid var(--line);
    background: var(--inset);
}
.nav-msgs:hover { color: var(--accent); text-decoration: none; border-color: var(--accent); }
.nav-msgs--new { color: var(--accent); }
.nav-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    background: var(--hot);
    color: #fff;
    font-family: var(--font-pixel);
    font-size: 6px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #fff;
    animation: pulse .9s ease-in-out infinite;
}

/* Tab juostos badge */
.tab-sup {
    font-family: var(--font-pixel);
    font-size: 6px;
    background: var(--hot);
    color: #fff;
    border-radius: 6px;
    padding: 1px 3px;
    vertical-align: super;
    margin-left: 1px;
}
.tab--badge { color: var(--accent); }

/* --- Žinučių inbox sąrašas --- */
.chat-inbox {
    border: 2px solid var(--line-hi);
    background: var(--panel);
    box-shadow: var(--shadow-hard);
    margin-bottom: 24px;
}

.inbox-list { list-style: none; margin: 0; padding: 0; }

.inbox-item {
    border-bottom: 1px solid var(--line);
}
.inbox-item:last-child { border-bottom: 0; }
.inbox-item--unread { background: #eef1fb; }

.inbox-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text);
    transition: background .1s;
}
.inbox-link:hover { background: #f5f7ff; text-decoration: none; color: var(--text); }

.inbox-av { position: relative; flex: 0 0 auto; }
.inbox-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--hot);
    color: #fff;
    font-family: var(--font-pixel);
    font-size: 6px;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #fff;
}

.inbox-body { flex: 1; min-width: 0; }

.inbox-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}
.inbox-name {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.inbox-item--unread .inbox-name { color: var(--accent); }
.inbox-time {
    font-size: 15px;
    color: var(--muted);
    white-space: nowrap;
    flex: 0 0 auto;
}
.inbox-item--unread .inbox-time { color: var(--accent); }

.inbox-preview {
    font-size: 18px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.inbox-item--unread .inbox-preview { color: var(--text); font-weight: 600; }
.preview-you { color: var(--muted); }

/* --- Pokalbio lange (thread) --- */
.chat-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 180px);
    min-height: 360px;
    max-height: 700px;
    border: 2px solid var(--line-hi);
    background: var(--panel);
    box-shadow: var(--shadow-hard);
    overflow: hidden;
}

/* Antraštė */
.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--accent);
    border-bottom: 2px solid var(--accent-sh);
    flex: 0 0 auto;
}
.chat-back {
    color: #fff;
    font-size: 22px;
    line-height: 1;
    padding: 4px 6px;
    flex: 0 0 auto;
}
.chat-back:hover { text-decoration: none; color: rgba(255,255,255,.8); }
.chat-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    flex: 1;
    min-width: 0;
}
.chat-user-info:hover { text-decoration: none; color: #fff; }
.chat-user-meta { display: flex; flex-direction: column; gap: 2px; }
.chat-user-name { font-family: var(--font-pixel); font-size: 9px; color: #fff; }
.chat-user-status { font-size: 15px; color: rgba(255,255,255,.8); }

/* Žinučių sritis */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background:
        radial-gradient(rgba(31,63,174,.04) 1px, transparent 1px) 0 0 / 14px 14px,
        #f5f4ef;
    scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--line); border-radius: 0; }

.chat-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 18px;
    text-align: center;
}

/* Datos atskirtuvai */
.chat-date-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 6px;
}
.chat-date-sep span {
    font-family: var(--font-pixel);
    font-size: 7px;
    color: var(--muted);
    background: rgba(255,255,255,.8);
    border: 1px solid var(--line);
    padding: 3px 10px;
}

/* Žinutės burbulai */
.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    max-width: 78%;
    animation: pop .2s ease backwards;
}
.chat-msg--out {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-msg--in {
    align-self: flex-start;
}

.chat-msg-av { flex: 0 0 auto; }

.chat-bubble {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 12px 6px;
    max-width: 100%;
    word-break: break-word;
}
.chat-msg--out .chat-bubble {
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent-sh);
    border-bottom-right-radius: 0;
    box-shadow: 3px 3px 0 var(--accent-sh);
}
.chat-msg--in .chat-bubble {
    background: #fff;
    color: var(--text);
    border: 2px solid var(--line-hi);
    border-bottom-left-radius: 0;
    box-shadow: 3px 3px 0 rgba(0,0,0,.1);
}

.chat-text {
    font-size: 19px;
    line-height: 1.35;
}
.chat-msg--out .chat-text { color: #fff; }

.chat-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    align-self: flex-end;
    margin-top: 2px;
}
.chat-time {
    font-size: 14px;
    color: rgba(0,0,0,.4);
    white-space: nowrap;
}
.chat-msg--out .chat-time { color: rgba(255,255,255,.7); }

.chat-tick {
    font-size: 13px;
    color: rgba(255,255,255,.7);
}
.chat-tick--read {
    color: #a0e8f0;
}

/* Klaidos juosta virš input */
.chat-alert {
    background: #fdf2f2;
    border-top: 2px solid var(--red);
    color: var(--red);
    font-size: 17px;
    padding: 8px 14px;
    flex: 0 0 auto;
}

/* Formos juosta apačioje */
.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding: 10px 12px;
    background: #fff;
    border-top: 2px solid var(--line-hi);
    flex: 0 0 auto;
}

.chat-input {
    flex: 1;
    font-family: var(--font-screen);
    font-size: 19px;
    color: var(--text);
    background: var(--inset);
    border: 2px solid var(--line);
    border-right: 0;
    padding: 9px 12px;
    resize: none;
    min-height: 42px;
    max-height: 140px;
    overflow-y: auto;
    line-height: 1.3;
}
.chat-input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}

.chat-send {
    flex: 0 0 auto;
    width: 48px;
    min-height: 42px;
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent-sh);
    box-shadow: 3px 3px 0 var(--accent-sh);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .05s, box-shadow .05s;
}
.chat-send:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--accent-sh); }
.chat-send:hover { background: var(--accent-dk); }

/* Profilio „Siųsti žinutę" mygtukas papildomas tarpas */
.profile-id .btn { margin-top: 10px; }

/* Platesniame ekrane chat-wrap gali būti aukštesnis */
@media (min-width: 760px) {
    .chat-wrap { max-height: 600px; height: calc(100vh - 240px); }
    .chat-msg { max-width: 65%; }
}

/* ============================================================
   ADMIN — vartotojų valdymo patobulinimas
   ============================================================ */

.users-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: var(--panel-2);
    border: 1px solid var(--line);
}
.filter-input {
    flex: 1 1 180px;
    font-family: var(--font-screen);
    font-size: 19px;
    padding: 8px 10px;
    border: 2px solid var(--line);
    color: var(--text);
    background: #fff;
    min-width: 0;
}
.filter-input:focus { outline: none; border-color: var(--accent); }
.filter-select {
    font-family: var(--font-screen);
    font-size: 18px;
    padding: 8px 10px;
    border: 2px solid var(--line);
    color: var(--text);
    background: #fff;
    cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

.admin-pm-link {
    color: var(--accent);
    font-size: 14px;
    margin-left: 6px;
    opacity: .7;
}
.admin-pm-link:hover { opacity: 1; }

.td-email { font-size: 16px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-date { font-size: 16px; color: var(--muted); white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* Vartotojų nustatymų puslapio mygtukai profilio puslapyje */
.profile-settings-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* ============================================================
   VARTOTOJŲ PROFILIAI IR AVATARAI
   ============================================================ */

/* Avataras (paveikslėlis arba placeholder su raide) */
.avatar { display: inline-block; vertical-align: middle; object-fit: cover; border: 2px solid var(--line-hi); background: #fff; }
.avatar-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-family: var(--font-pixel); line-height: 1; }

/* nav: vartotojo avataras + pliusų ženkliukas */
.nav-user .avatar { width: 22px; height: 22px; border-width: 1px; }
.nav-pliusai { font-family: var(--font-pixel); font-size: 8px; color: var(--hot); border: 1px solid var(--hot); padding: 3px 5px; }

/* Profilio kortelė */
.profile-card { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 2px solid var(--line-hi); box-shadow: var(--shadow-hard); padding: 16px 18px; margin-bottom: 14px; }
.profile-avatar .avatar { width: 96px; height: 96px; }
.profile-name { font-size: 14px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Statistikos plytelės */
.profile-stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0; margin: 0 0 16px; }
.profile-stats li { background: var(--panel); border: 2px solid var(--line-hi); box-shadow: var(--shadow-hard); padding: 16px 8px; text-align: center; }
.ps-num { display: block; font-family: var(--font-pixel); font-size: 17px; color: var(--accent); }
.ps-lbl { display: block; margin-top: 9px; font-size: 14px; color: var(--muted); }
.ps-coin { background: #fff7ef; }
.ps-coin .ps-num { color: var(--hot); }

/* Avataras komentaruose */
.comment-head { align-items: center; }
.comment-head .avatar { width: 28px; height: 28px; flex: 0 0 auto; }
.comment-author { color: var(--accent); }
.comment-author.is-staff { font-weight: bold; }

/* Moderatoriaus ženkliukas */
.badge-mod { color: #1f8a4c; border-color: #1f8a4c; }

/* ---------- Online sąrašas ---------- */
.online-now { margin: 0 0 10px; }
.online-now a { display: inline-flex; align-items: center; gap: 7px; font-size: 16px; color: var(--muted); }
.online-now a:hover { color: var(--green); text-decoration: none; }
.online-now b { color: var(--green); }
.online-dot { display: inline-block; width: 9px; height: 9px; background: #1f8a4c; border-radius: 50%; box-shadow: 0 0 0 3px rgba(31,138,76,.18); animation: onlinepulse 1.6s ease-in-out infinite; }
.online-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.online-list li { display: flex; align-items: center; gap: 10px; }
.online-list .avatar { width: 32px; height: 32px; }
.online-name { font-size: 19px; }
.online-name.is-staff { font-weight: bold; }
.online-guests { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.online-guests li { font-family: var(--font-pixel); font-size: 8px; border: 1px solid var(--line); padding: 8px 10px; background: var(--inset); }
.g-count { color: var(--muted); }
@keyframes onlinepulse { 0%,100% { box-shadow: 0 0 0 3px rgba(31,138,76,.18) } 50% { box-shadow: 0 0 0 6px rgba(31,138,76,.04) } }

/* online poraštėje — aiškesnis skaičius */
.online-now a { font-size: 17px; }
.online-now b { font-size: 20px; color: #1f8a4c; }
.online-lbl { color: var(--muted); }

/* ============================================================
   NAUJIENOS
   ============================================================ */

/* Banneris pagrindinio puslapio viršuje */
.news-banner {
    display: flex; align-items: center; gap: 12px;
    background: var(--accent); color: #fff;
    border: 2px solid var(--accent-sh); box-shadow: var(--shadow-hard);
    padding: 11px 14px; margin-bottom: 18px;
}
.news-banner:hover { text-decoration: none; filter: brightness(1.06); }
.nb-icon { font-size: 22px; flex: 0 0 auto; }
.nb-text { flex: 1; min-width: 0; overflow: hidden; }
.nb-text b { display: block; font-family: var(--font-pixel); font-size: 9px; letter-spacing: .5px; }
.nb-latest { font-size: 18px; color: #fff; }
.nb-date { font-size: 14px; color: rgba(255,255,255,.72); margin-left: 6px; }
.nb-arrow { font-size: 26px; flex: 0 0 auto; line-height: 1; }

/* Naujienų sąrašas */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-item {
    background: var(--panel); border: 2px solid var(--line-hi); border-left: 5px solid var(--accent);
    box-shadow: var(--shadow-hard); padding: 16px 18px;
}
.news-date { font-family: var(--font-pixel); font-size: 8px; color: var(--hot); }
.news-title { font-size: 13px; margin: 9px 0 10px; color: var(--accent); }
.news-body { font-size: 19px; color: #2c2c28; line-height: 1.45; }
.news-author { margin-top: 10px; font-size: 16px; color: var(--muted); }

/* ---------- Admin nustatymų jungikliai ---------- */
.switch { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 18px; cursor: pointer; }
.switch input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); }

/* ---------- Responsyvios admin lentelės (slinkimas mobiliajame) ---------- */
@media (max-width: 760px) {
    .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

/* Logotipas mažesnis siaurame ekrane (ilgesnis pavadinimas telpa) */
@media (max-width: 460px) {
    .logo { font-size: 11px; }
}
@media (max-width: 360px) {
    .logo { font-size: 9px; }
}

/* ---------- CAPTCHA ---------- */
.captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.captcha-img { border: 2px solid var(--line-hi); background: #fff; image-rendering: pixelated; display: block; flex: 0 0 auto; }
.captcha-reload { background: var(--panel-2); border: 2px solid var(--line-hi); color: var(--accent); cursor: pointer; font-size: 20px; line-height: 1; padding: 6px 11px; }
.captcha-reload:hover { background: #eef1fb; }

/* ============================================================
   ŽAIDIMŲ NUOTRAUKŲ GALERIJA
   ============================================================ */

/* --- Admin: kelių nuotraukų įkėliklis (failas / vilkimas / Ctrl+V) --- */
.img-uploader .img-input { display: none; }
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.img-previews { display: contents; }

.gimg {
    position: relative; width: 132px; margin: 0;
    border: 2px solid var(--line-hi); background: var(--inset);
    box-shadow: var(--shadow-hard);
}
.gimg > img { display: block; width: 100%; height: 88px; object-fit: cover; }

/* pasirinkta pagrindinė — auksinis rėmas (jei naršyklė palaiko :has) */
.gimg:has(.gimg-primary input:checked) { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber), var(--shadow-hard); }

.gimg-primary {
    display: flex; align-items: center; gap: 5px; cursor: pointer;
    padding: 4px 6px; font-size: 14px; background: var(--panel-2);
    border-top: 2px solid var(--line-hi);
}
.gimg-primary input { margin: 0; }
.gimg-primary span { color: var(--muted); }
.gimg:has(.gimg-primary input:checked) .gimg-primary { background: #fff7e0; }
.gimg:has(.gimg-primary input:checked) .gimg-primary span { color: var(--amber); font-weight: bold; }
.gimg-primary input:disabled + span { opacity: .4; text-decoration: line-through; }

.gimg-del {
    position: absolute; top: 0; left: 0; display: flex; align-items: center; gap: 4px;
    padding: 3px 6px; font-size: 12px; cursor: pointer;
    background: rgba(255,255,255,.92); border-right: 2px solid var(--line-hi); border-bottom: 2px solid var(--line-hi);
    color: var(--red);
}
.gimg-del input { margin: 0; }

.gimg-rm {
    position: absolute; top: 0; right: 0; width: 26px; height: 26px; line-height: 1;
    border: 0; border-left: 2px solid var(--line-hi); border-bottom: 2px solid var(--line-hi);
    background: var(--red); color: #fff; font-size: 18px; cursor: pointer;
}
.gimg-rm:hover { background: var(--red-sh); }

.img-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    width: 132px; min-height: 122px; cursor: pointer; text-align: center;
    border: 2px dashed var(--accent); background: var(--panel-2); color: var(--accent);
    padding: 8px; font-size: 13px; line-height: 1.35;
}
.img-drop:hover, .img-drop.drag { background: #eef1fb; border-style: solid; }
.img-drop-ic { font-size: 30px; line-height: 1; }
.img-drop kbd {
    font-family: var(--font-screen); font-size: 14px; background: #fff;
    border: 1px solid var(--line-hi); border-radius: 2px; padding: 0 4px;
}

/* --- Portalas: žaidimo puslapio galerija --- */
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gallery-thumb {
    width: 74px; height: 52px; padding: 0; cursor: pointer; overflow: hidden;
    border: 2px solid var(--line-hi); background: #fff; box-shadow: 2px 2px 0 rgba(0,0,0,.14);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.gallery-thumb:focus-visible { outline: 2px solid var(--hot); outline-offset: 1px; }

/* Pagrindinė nuotrauka — paspaudus atveriama pilnu dydžiu (lightbox) */
.game-detail .cover img { cursor: zoom-in; }
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 1000; padding: 16px;
    background: rgba(10,10,12,.9); cursor: zoom-out;
    align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 96vw; max-height: 92vh; object-fit: contain;
    border: 2px solid var(--line-hi); background: #fff; box-shadow: var(--shadow-hard);
}
.lightbox-close {
    position: absolute; top: 10px; right: 14px; width: 40px; height: 40px;
    font-size: 26px; line-height: 1; color: #fff; cursor: pointer;
    background: rgba(0,0,0,.4); border: 2px solid rgba(255,255,255,.5);
}
.lightbox-close:hover { background: var(--accent); }
body.lightbox-lock { overflow: hidden; }

/* ============================================================
   POKALBIAI — vieša žinučių siena (shoutbox)
   ============================================================ */
/* Bendras „paslėpti" pagalbininkas (naudoja JS perjungiamos formos, emoji skydelis,
   admin komentarų/pokalbių redagavimas). */
.hidden { display: none !important; }

.chat-board { margin-top: 8px; }

/* Rašymo / atsakymo forma */
.chat-compose {
    background: var(--panel);
    border: 2px solid var(--line-hi);
    box-shadow: var(--shadow-hard);
    padding: 10px 12px;
    margin-bottom: 14px;
}
.chat-compose--main { margin-bottom: 18px; }
.chat-reply-form { margin: 8px 0 4px 42px; box-shadow: 3px 3px 0 rgba(0,0,0,.12); }
.chat-edit-form { margin-top: 8px; }
.chat-compose-row { display: flex; align-items: flex-start; gap: 8px; }
.chat-compose-text {
    flex: 1; width: 100%; box-sizing: border-box;
    font-family: var(--font-screen); font-size: 19px; color: var(--text);
    background: var(--inset); border: 2px solid var(--line);
    padding: 8px 10px; resize: none; min-height: 40px; max-height: 200px;
    line-height: 1.3;
}
.chat-compose-text:focus { outline: none; border-color: var(--accent); background: #fff; }
.chat-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.chat-tool {
    width: 36px; height: 34px; font-size: 19px; cursor: pointer;
    background: #fff; border: 2px solid var(--line-hi); box-shadow: 2px 2px 0 var(--line-hi);
    display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.chat-tool:hover { background: var(--inset); }
.chat-tool:active { transform: translate(2px,2px); box-shadow: none; }
.chat-char { font-size: 14px; margin-left: auto; }
.chat-img-name { font-size: 14px; word-break: break-all; }
.chat-hint { font-size: 14px; margin: 8px 0 0; }
.chat-send-btn { white-space: nowrap; }
.chat-login-cta {
    background: var(--inset); border: 2px dashed var(--line-hi);
    padding: 12px 14px; margin-bottom: 16px; font-size: 18px;
}

/* Sąrašas / gija */
.chat-list { display: flex; flex-direction: column; gap: 14px; }
.chat-thread {
    background: var(--panel); border: 2px solid var(--line-hi);
    box-shadow: var(--shadow-hard); padding: 10px 12px;
}
.chat-replies {
    margin: 6px 0 0 42px; padding-top: 6px;
    border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px;
}

/* Viena žinutė (cb- = chat board; atskiras nuo PM .chat-msg) */
.cb-msg { display: flex; align-items: flex-start; gap: 10px; }
.cb-msg--reply { gap: 8px; }
.cb-msg--pinned { background: #fffaf0; box-shadow: inset 3px 0 0 var(--amber); padding-left: 8px; }
.cb-av { flex: 0 0 auto; line-height: 0; }
.cb-main { flex: 1; min-width: 0; }
.cb-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.cb-name { font-weight: bold; color: var(--accent); font-size: 17px; }
.cb-name:hover { color: var(--accent-dk); }
.cb-time { color: var(--muted); font-size: 14px; }
.chat-edited { color: var(--muted); font-size: 13px; font-style: italic; }
.chat-pin { font-size: 14px; }
.cb-body {
    font-size: 19px; line-height: 1.35; margin: 3px 0 0;
    word-break: break-word; overflow-wrap: anywhere; white-space: normal;
}
.chat-mention { font-weight: bold; color: var(--accent); }
.cb-img-wrap { display: inline-block; margin-top: 6px; line-height: 0; }
.cb-img {
    max-width: 240px; max-height: 220px; border: 2px solid var(--line-hi);
    box-shadow: 3px 3px 0 rgba(0,0,0,.12); cursor: zoom-in; background: #fff;
}

/* Veiksmų juosta */
.cb-actions { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.chat-like, .chat-act {
    font-family: var(--font-screen); font-size: 16px; cursor: pointer;
    background: #fff; border: 2px solid var(--line); color: var(--muted);
    padding: 2px 8px; display: inline-flex; align-items: center; gap: 4px;
}
.chat-like:hover, .chat-act:hover { border-color: var(--accent); color: var(--accent); }
.chat-like .chat-like-ic { color: var(--line-hi); transition: color .1s; }
.chat-like.is-liked { color: var(--red); border-color: var(--red); }
.chat-like.is-liked .chat-like-ic { color: var(--red); }
.chat-like[disabled] { opacity: .6; cursor: default; }
.chat-like[disabled]:hover { border-color: var(--line); color: var(--muted); }
.chat-act--danger { color: var(--red); border-color: var(--red-sh); }
.chat-act--danger:hover { background: var(--red); color: #fff; border-color: var(--red-sh); }
.chat-inline-form { display: inline; margin: 0; }
.chat-edit-actions { display: flex; gap: 8px; margin-top: 6px; }
.chat-pagination { margin-top: 18px; }

/* Atsakymo mygtukas — kompaktiškas raidės „A" mygtukas */
.cb-reply-btn {
    font-family: var(--font-pixel); font-size: 11px; line-height: 1;
    width: 26px; height: 26px; padding: 0; cursor: pointer;
    background: var(--accent); color: #fff; border: 2px solid var(--accent-sh);
    box-shadow: 2px 2px 0 var(--accent-sh);
    display: inline-flex; align-items: center; justify-content: center;
}
.cb-reply-btn:hover { background: var(--accent-dk); color: #fff; }
.cb-reply-btn:active { transform: translate(2px,2px); box-shadow: none; }

/* Atsakymo forma „išvažiuoja" (slydimo animacija) tik atidarius */
.chat-reply-form:not(.hidden) { animation: cb-slidedown .25s ease; transform-origin: top center; }
@keyframes cb-slidedown {
    from { opacity: 0; transform: translateY(-10px) scaleY(.95); }
    to   { opacity: 1; transform: none; }
}

/* Užrakto CTA neprisijungusiems (pokalbiai nematomi) */
.chat-login-cta--lock { text-align: center; padding: 28px 18px; }
.chat-login-cta--lock p { margin: 0; font-size: 20px; }
.cta-btns { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Admin: paslėpta žinutė prislopinta */
.comment--hidden { opacity: .6; background: repeating-linear-gradient(45deg,#fafafa,#fafafa 8px,#f0f0f0 8px,#f0f0f0 16px); }

/* Emoji rinkinys */
.emoji-panel {
    background: #fff; border: 2px solid var(--line-hi); box-shadow: var(--shadow-hard);
    padding: 8px 10px; margin: 0 0 10px; max-height: 220px; overflow-y: auto;
}
.emoji-cat { font-size: 13px; color: var(--muted); text-transform: uppercase; margin: 6px 0 3px; letter-spacing: .5px; }
.emoji-grid { display: flex; flex-wrap: wrap; gap: 2px; }
.emoji {
    font-size: 22px; line-height: 1; width: 34px; height: 34px; padding: 0;
    background: none; border: 1px solid transparent; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.emoji:hover { background: var(--inset); border-color: var(--line); }

/* Footer „Pokalbiai" nuoroda virš apsilankymų */
.foot-chat { margin: 0 0 10px; }
.foot-chat a {
    display: inline-flex; align-items: center; gap: 6px; font-size: 18px;
    background: var(--accent); color: #fff; border: 2px solid var(--accent-sh);
    box-shadow: 3px 3px 0 var(--accent-sh); padding: 5px 12px;
}
.foot-chat a:hover { background: var(--accent-dk); text-decoration: none; }
.foot-chat .foot-chat-today { color: var(--hot); font-size: 14px; margin-left: 6px; }
