/* Brain2 Web Market — continuă limbajul vizual din index.php (înregistrarea).
   Totul e aici: CSP-ul are style-src 'self', deci nici un atribut style= în HTML. */

:root {
    --bg:      #0b0908;
    --panel:   rgba(24, 19, 15, .82);
    --line:    #403426;
    --gold:    #c8a45c;
    --gold-hi: #edd196;
    --text:    #ece4d8;
    --muted:   #9d9184;
    --err:     #d9534f;
    --ok:      #6aa84f;
    --info:    #7f9fcc;
}
* { box-sizing: border-box; }

html, body { min-height: 100%; }
body {
    margin: 0;
    padding: 0 0 30px;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
    overflow-x: clip;	/* NU hidden: pe body ar face din el un container de derulare si bara de sus nu ar mai fi lipita sus */
}
a { color: var(--gold-hi); }

/* ---------- fundal animat (identic cu index.php) ---------- */
.scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% 108%, #43301c 0%, transparent 55%),
        radial-gradient(70% 45% at 78% 12%, #2d3a4a 0%, transparent 60%),
        linear-gradient(#070d16 0%, #10121a 40%, #1b1410 100%);
}
.moon {
    position: absolute;
    top: 8%;
    right: 14%;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 34%, #fff6e0, #e8cf9a 58%, #c8a45c 100%);
    box-shadow: 0 0 70px 26px rgba(232, 207, 154, .16);
    animation: moonrise 3s ease-out both;
}
@keyframes moonrise {
    from { opacity: 0; transform: translateY(26px) scale(.94); }
    to   { opacity: 1; transform: none; }
}
.stars, .stars::after {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent),
        radial-gradient(1.2px 1.2px at 32% 9%,  #fff 50%, transparent),
        radial-gradient(1.6px 1.6px at 58% 22%, #fff 50%, transparent),
        radial-gradient(1.1px 1.1px at 71% 6%,  #fff 50%, transparent),
        radial-gradient(1.3px 1.3px at 86% 26%, #fff 50%, transparent),
        radial-gradient(1.2px 1.2px at 45% 30%, #fff 50%, transparent),
        radial-gradient(1.5px 1.5px at 22% 34%, #fff 50%, transparent);
    opacity: .55;
    animation: twinkle 5.5s ease-in-out infinite alternate;
}
.stars::after {
    content: "";
    transform: translate(9%, 6%) scale(1.15);
    animation-delay: -2.7s;
}
@keyframes twinkle {
    from { opacity: .28; }
    to   { opacity: .7; }
}
.ridge {
    position: absolute;
    left: -8%;
    width: 116%;
    bottom: 0;
    opacity: .95;
}
.ridge svg { display: block; width: 100%; height: auto; }
.ridge.far  { bottom: 24%; animation: drift 92s ease-in-out infinite alternate; }
.ridge.mid  { bottom: 13%; animation: drift 64s ease-in-out infinite alternate-reverse; }
.ridge.near { bottom: 0;   animation: drift 46s ease-in-out infinite alternate; }
@keyframes drift {
    from { transform: translateX(-1.6%); }
    to   { transform: translateX(1.6%); }
}
.mist {
    position: absolute;
    left: -50%;
    width: 200%;
    height: 220px;
    background: linear-gradient(90deg,
        transparent, rgba(200,164,92,.05) 20%, rgba(220,200,170,.10) 50%,
        rgba(200,164,92,.05) 80%, transparent);
    filter: blur(22px);
}
.mist.a { bottom: 16%; animation: sweep 34s linear infinite; }
.mist.b { bottom:  4%; animation: sweep 52s linear infinite reverse; opacity: .7; }
@keyframes sweep {
    from { transform: translateX(-24%); }
    to   { transform: translateX(24%); }
}
.ember {
    position: absolute;
    bottom: -14px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #e8b45c;
    box-shadow: 0 0 8px 2px rgba(232, 180, 92, .55);
    animation: rise linear infinite;
}
/* pozițiile fixe din index.php, mutate din atributele style= aici */
.ember:nth-of-type(1)  { left: 6%;  animation-duration: 11.5s; animation-delay: 0s;   --dx: 34px; }
.ember:nth-of-type(2)  { left: 14%; animation-duration: 9.2s;  animation-delay: 2.4s; --dx: -22px; }
.ember:nth-of-type(3)  { left: 23%; animation-duration: 13s;   animation-delay: 5.1s; --dx: 18px; }
.ember:nth-of-type(4)  { left: 31%; animation-duration: 10.4s; animation-delay: 1.2s; --dx: -30px; }
.ember:nth-of-type(5)  { left: 39%; animation-duration: 12.2s; animation-delay: 6.8s; --dx: 26px; }
.ember:nth-of-type(6)  { left: 47%; animation-duration: 8.8s;  animation-delay: 3.6s; --dx: -16px; }
.ember:nth-of-type(7)  { left: 55%; animation-duration: 14s;   animation-delay: .9s;  --dx: 30px; }
.ember:nth-of-type(8)  { left: 63%; animation-duration: 10s;   animation-delay: 7.4s; --dx: -24px; }
.ember:nth-of-type(9)  { left: 71%; animation-duration: 12.8s; animation-delay: 4.2s; --dx: 20px; }
.ember:nth-of-type(10) { left: 79%; animation-duration: 9.6s;  animation-delay: 2s;   --dx: -28px; }
.ember:nth-of-type(11) { left: 87%; animation-duration: 13.6s; animation-delay: 6s;   --dx: 16px; }
.ember:nth-of-type(12) { left: 94%; animation-duration: 11s;   animation-delay: 8.6s; --dx: -20px; }
@keyframes rise {
    0%   { opacity: 0; transform: translate(0, 0) scale(.7); }
    12%  { opacity: .9; }
    75%  { opacity: .65; }
    100% { opacity: 0; transform: translate(var(--dx), -102vh) scale(1.15); }
}

/* ---------- bara de sus ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 24px;
    background: rgba(11, 9, 8, .86);
    backdrop-filter: blur(9px);
    border-bottom: 1px solid var(--line);
}
.brand {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 3px;
    text-decoration: none;
    background: linear-gradient(100deg, var(--gold) 20%, #fff3d4 46%, var(--gold) 72%);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 7s linear infinite;
}
.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    transition: color .18s, background .18s;
}
.nav a:hover, .nav a.active { color: var(--gold-hi); background: rgba(200,164,92,.08); }
.topbar .spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }
.who b { color: var(--gold-hi); font-weight: 600; }
form.inline { display: inline; margin: 0; }

/* ---------- așezarea în pagină ---------- */
.wrap {
    max-width: 1180px;
    margin: 26px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.single {
    display: flex;
    justify-content: center;
    padding: 32px 20px;
}
@media (max-width: 900px) {
    .wrap { grid-template-columns: 1fr; }
    .topbar { flex-wrap: wrap; }
}

/* ---------- cardul ---------- */
.card {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: var(--panel);
    backdrop-filter: blur(9px);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 30px 28px 26px;
    box-shadow: 0 24px 70px rgba(0,0,0,.66), inset 0 1px 0 rgba(255,225,180,.07);
    animation: cardin .85s cubic-bezier(.2,.7,.3,1) both;
}
.card.side { max-width: none; }
.card.wide { max-width: none; padding: 24px 24px 22px; }
@keyframes cardin {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}
.card::before, .card::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--gold);
    opacity: .55;
}
.card::before { top: -1px; left: -1px;  border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.card::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0;  border-radius: 0 0 12px 0; }

h1 {
    margin: 0 0 2px;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    background: linear-gradient(100deg, var(--gold) 20%, #fff3d4 46%, var(--gold) 72%);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 7s linear infinite;
}
@keyframes shimmer {
    from { background-position: 160% 0; }
    to   { background-position: -60% 0; }
}
.rule {
    width: 132px;
    height: 1px;
    margin: 10px auto 8px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.sub {
    margin: 0 0 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.sub b { color: var(--gold-hi); font-weight: 600; }
h2 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--gold-hi);
}

/* ---------- formulare ---------- */
label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--muted);
}
label b { color: var(--gold-hi); font-weight: 600; }
input[type=text], input[type=password], input[type=search] {
    width: 100%;
    padding: 11px 12px;
    margin-bottom: 15px;
    background: rgba(12,10,8,.72);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font-size: 15px;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(20,16,12,.85);
    box-shadow: 0 0 0 3px rgba(200,164,92,.14);
}
.btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold));
    border: none;
    border-radius: 6px;
    color: #241c10;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .4px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: filter .18s, transform .12s, background .18s, box-shadow .18s;
}
.btn:hover  { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn::after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
    animation: sweepbtn 4.5s ease-in-out infinite;
}
@keyframes sweepbtn {
    0%, 62% { left: -60%; }
    100%    { left: 130%; }
}
.btn.ghost {
    background: rgba(20,16,12,.7);
    border: 1px solid var(--gold);
    color: var(--gold-hi);
    margin-top: 10px;
}
.btn.ghost::after { display: none; }
.btn.ghost:hover {
    background: rgba(46,36,26,.9);
    box-shadow: 0 0 18px rgba(200,164,92,.2);
}
.btn.sm {
    display: inline-block;
    width: auto;
    padding: 8px 14px;
    margin: 0;
    font-size: 13px;
    white-space: nowrap;
}

.msg {
    padding: 11px 13px;
    margin-bottom: 18px;
    border-radius: 6px;
    font-size: 14px;
    animation: cardin .4s ease both;
}
.msg.err {
    background: rgba(217,83,79,.13);
    border: 1px solid rgba(217,83,79,.45);
    color: #f0b3b1;
}
.msg.ok {
    background: rgba(106,168,79,.13);
    border: 1px solid rgba(106,168,79,.45);
    color: #bfe0ad;
}
.msg.info {
    background: rgba(127,159,204,.12);
    border: 1px solid rgba(127,159,204,.45);
    color: #c5d6ee;
}
.msg ul { margin: 0; padding-left: 18px; }
.hint { margin: -9px 0 15px; font-size: 12px; color: var(--muted); }
.hint a { color: var(--gold); }
/* marginea negativă e pentru hint-urile de sub un input; după un formular sau un buton stă normal */
form + .hint, .btn + .hint, .kv + .hint { margin-top: 14px; }

.kv {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}
.kv b { color: var(--gold-hi); font-weight: 600; }
.big {
    margin: 4px 0 16px;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-hi);
}

/* ---------- personaje ---------- */
.chars { list-style: none; margin: 0 0 6px; padding: 0; }
.chars li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
}
.chars li small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.chars li.sel b { color: var(--gold-hi); }
.own { font-size: 12.5px; color: var(--muted); font-style: italic; white-space: nowrap; }
form.pay-src { margin: 6px 0 4px; }

/* ---------- vitrina ---------- */
.vitrina-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.vitrina-head h2 { margin: 0; }
.vitrina-head input[type=search] { width: 260px; max-width: 100%; margin: 0; padding: 9px 12px; font-size: 14px; }
.vitrina-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 16px;
    padding: 8px 12px;
    background: rgba(14,11,9,.6);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--muted);
}
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.on  { background: var(--ok); animation: pulse 2.2s ease-in-out infinite; }
.dot.off { background: var(--err); }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(106,168,79,.55); }
    70%      { box-shadow: 0 0 0 9px rgba(106,168,79,0); }
}

.shop {
    margin-bottom: 16px;
    background: rgba(14,11,9,.6);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.shop-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 16px;
    background: rgba(200,164,92,.05);
    border-bottom: 1px solid var(--line);
}
.shop-name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gold-hi);
    overflow-wrap: anywhere;
}
.shop-meta { font-size: 12.5px; color: var(--muted); }
.shop-meta b { color: var(--text); font-weight: 600; }
.items { list-style: none; margin: 0; padding: 0; }
.item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-top: 1px solid rgba(64,52,38,.5);
}
.item:first-child { border-top: 0; }
.item-name { font-weight: 600; overflow-wrap: anywhere; }
.item-count { margin-left: 6px; font-size: 13px; color: var(--muted); }
.item-bonus { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.item-bonus span { display: inline-block; margin-right: 10px; }
.item-price { color: var(--gold-hi); font-weight: 700; white-space: nowrap; }
.item-price small { color: var(--muted); font-weight: 400; font-size: 12px; }
form.buy { margin: 0; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
@media (max-width: 600px) {
    .item { grid-template-columns: 1fr; gap: 6px; }
}

.foot {
    max-width: 1180px;
    margin: 10px auto 0;
    padding: 15px 20px 0;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}
.foot b { color: var(--gold); font-weight: 600; }

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

/* ==================== piata v4: doua panouri, iconite, yang-ul personajului ====================
   ATENTIE: containerul paginii e .piata, NU .market — <body class="market"> foloseste deja numele
   acela, iar o regula .market{display:grid} ar transforma corpul paginii intr-o grila si ar rupe
   asezarea (bara de sus si continutul ar ajunge in coloane diferite). */

/* Sub tabloul pietei fundalul se domoleste: contrastul trebuie sa cada pe carduri, nu pe cer. */
body.market .scene { opacity: .5; }
body.market .ember { display: none; }
body.market .moon  { opacity: .55; }

.wrap.wide { max-width: 1340px; display: block; }

.piata {
    display: grid;
    grid-template-columns: 370px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.piata .pane.left { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
.piata .card { padding: 18px 20px 16px; }
/* colturile aurii sunt pentru cartea de login; pe trei carduri alaturate devin zgomot */
.piata .card::before, .piata .card::after { display: none; }
.piata .card.wide { padding: 0; overflow: hidden; }
.piata .msg { margin-bottom: 14px; }
@media (max-width: 1000px) {
    .piata { grid-template-columns: 1fr; }
    .piata .pane.left { position: static; }
}

/* ---------- cardul contului: personajul + yang-ul ---------- */
.who-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.who-acc { font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.who-acc b { color: var(--text); font-weight: 600; }
.who-char { margin-top: 2px; font-size: 21px; font-weight: 600; color: var(--gold-hi); letter-spacing: .3px; line-height: 1.2; }
.who-char.none { color: var(--muted); font-size: 15px; font-weight: 400; }
.who-sub { margin-top: 1px; font-size: 12px; color: var(--muted); }

.gold-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 13px 8px 10px;
    background: linear-gradient(180deg, rgba(200,164,92,.14), rgba(200,164,92,.06));
    border: 1px solid rgba(200,164,92,.4);
    border-radius: 10px;
    white-space: nowrap;
    line-height: 1.15;
}
.gold-chip b { display: block; font-size: 17px; font-weight: 700; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.gold-chip small { display: block; margin-top: 1px; font-size: 10.5px; color: var(--muted); }
.coin {
    width: 17px; height: 17px; flex: none; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff1c9, #e0bb6a 46%, #9a7431 100%);
    box-shadow: 0 0 9px rgba(232,180,92,.4), inset 0 0 0 2px rgba(120,86,30,.3);
}

/* alegerea personajului: cand niciunul nu e ales, e treaba principala a cardului */
.chars-pick { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.chars-pick > p { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.piata .chars { margin: 0; }
.piata .chars li { padding: 7px 0; }
.piata .chars li:first-child { border-top: 0; }
details.chars-box { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
details.chars-box summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; }
details.chars-box summary::-webkit-details-marker { display: none; }
details.chars-box summary::before { content: "▾ "; color: var(--gold); }
details.chars-box summary:hover { color: var(--gold-hi); }

/* ---------- lista magazinelor ---------- */
.list-card { display: flex; flex-direction: column; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.list-head .count {
    font-size: 11.5px; font-weight: 600; color: var(--gold);
    padding: 1px 8px; border: 1px solid rgba(200,164,92,.4); border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
.list-card input[type=search] { margin: 12px 0 0; padding: 9px 12px; font-size: 13.5px; }
.list-card .vitrina-status { margin: 10px 0 12px; padding: 7px 11px; font-size: 11.5px; }
.shop-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
    max-height: calc(100vh - 400px); min-height: 140px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.shop-list .empty { padding: 22px 10px; }
.shop-btn {
    display: block; width: 100%; text-align: left;
    padding: 9px 12px 9px 13px;
    background: rgba(14,11,9,.5);
    border: 1px solid var(--line);
    border-left: 3px solid transparent;
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.shop-btn:hover { background: rgba(46,36,26,.65); border-color: rgba(200,164,92,.4); }
.shop-btn.sel { background: rgba(200,164,92,.11); border-color: rgba(200,164,92,.55); border-left-color: var(--gold-hi); }
.shop-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.shop-btn-name {
    display: block; font-weight: 600; font-size: 14px; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shop-btn.sel .shop-btn-name { color: var(--gold-hi); }
.shop-btn-meta { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.tag {
    display: inline-block; margin-left: 7px; padding: 0 6px;
    font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
    color: #241c10; background: var(--gold); border-radius: 999px; vertical-align: 1px;
}

/* ---------- magazinul ales ---------- */
.shop-view { min-height: 320px; }
.shop-view .shop-head {
    display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 16px 22px;
    background: rgba(200,164,92,.055);
    border-bottom: 1px solid var(--line);
}
.shop-view .shop-name { margin: 0 0 3px; font-size: 19px; line-height: 1.25; }
.shop-items-n { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.shop-view .items { padding: 4px 0 6px; }
.shop-view .item {
    grid-template-columns: 50px minmax(0, 1fr) auto auto;
    gap: 14px;
    padding: 9px 22px;
    border-top-color: rgba(64,52,38,.42);
}
.shop-view .item:hover { background: rgba(200,164,92,.035); }
.shop-view .item-price { font-variant-numeric: tabular-nums; }
.shop-view .empty { padding: 90px 26px; }
.item-icon {
    width: 50px; height: 50px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: rgba(8,6,5,.7);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0,0,0,.55);
}
.item-icon img { max-width: 42px; max-height: 42px; width: auto; height: auto; }
@media (max-width: 620px) {
    .shop-view .item { grid-template-columns: 50px minmax(0, 1fr); }
    .shop-view .item .item-price, .shop-view .item form.buy, .shop-view .item .own { grid-column: 2; }
}

/* ---------- dialogul de confirmare ---------- */
dialog.confirm {
    width: min(430px, calc(100vw - 32px));
    padding: 24px 26px 20px;
    background: #17120e;
    color: var(--text);
    border: 1px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,.75);
}
dialog.confirm::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(3px); }
dialog.confirm h2 { margin-top: 0; }
.confirm-text { margin: 0 0 12px; font-size: 15px; }
.confirm-text b { color: var(--gold-hi); }
dialog.confirm .hint { margin: 0 0 18px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- portofelul: yang-ul din joc pe primul loc ---------- */
.gold-hero { text-align: center; padding: 6px 0 12px; }
.gold-hero .coin { display: inline-block; width: 28px; height: 28px; margin-bottom: 8px; }
.gold-hero .big { margin: 0; font-size: 32px; font-variant-numeric: tabular-nums; }
.gold-hero .state { font-size: 12.5px; color: var(--muted); }
.hint.lead { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; }
details.wallet-web { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
details.wallet-web summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
details.wallet-web summary b { color: var(--gold-hi); }
details.wallet-web summary:hover { color: var(--gold-hi); }
details.wallet-web h2 { margin-top: 14px; }

/* ==================== pagina de start (index.php) ====================
   Ilustratiile, sigla si clipul sunt din clientul Brain2; fontul Cinzel e gazduit local (fara cereri catre terti). */

@font-face {
    font-family: 'Cinzel';
    src: url(/fonts/cinzel-latin-ext.woff2) format('woff2');
    font-weight: 400 900; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cinzel';
    src: url(/fonts/cinzel-latin.woff2) format('woff2');
    font-weight: 400 900; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.home { padding-bottom: 0; }
main.home { display: block; }
.home .in { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.home .brand, .home h1, .home h2, .home h3, .home .stat-n, .home .btn { font-family: 'Cinzel', 'Segoe UI', system-ui, serif; }
body.home .scene { opacity: .35; }
body.home .ember { display: none; }

/* ---------------- eroul: clipul de login al jocului ---------------- */
.hero {
    position: relative;
    min-height: min(88vh, 760px);
    display: flex; align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(200,164,92,.28);
}
.hero-media { position: absolute; inset: 0; }
.hero-media video, .hero-media img {
    width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%;
    animation: heroin 1.8s ease-out both;
}
@keyframes heroin { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }
.hero-vignette {
    position: absolute; inset: 0;
    /* valul e cat sa se citeasca textul, nu cat sa ascunda ilustratia */
    background:
        radial-gradient(135% 105% at 50% 42%, transparent 32%, rgba(6,5,4,.55) 84%),
        linear-gradient(0deg, var(--bg) 1%, rgba(6,5,4,.34) 26%, transparent 58%);
}
.hero-in { position: relative; width: 100%; padding: 70px 22px; max-width: 1200px; margin: 0 auto; text-align: center; }
.hero-logo {
    width: min(420px, 74vw); height: auto; margin: 0 auto 6px; display: block;
    filter: drop-shadow(0 10px 34px rgba(0,0,0,.75)) drop-shadow(0 0 26px rgba(200,164,92,.22));
    animation: rise-in .9s .1s ease-out both, float 7s 1s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-eyebrow {
    margin: 2px 0 14px;
    text-shadow: 0 2px 10px rgba(0,0,0,.9); font-size: 11.5px; letter-spacing: 4px; text-transform: uppercase; color: var(--gold);
    animation: rise-in .8s .2s ease-out both;
}
.hero-tag {
    max-width: 640px;
    text-shadow: 0 2px 12px rgba(0,0,0,.85); margin: 0 auto; font-size: 16.5px; line-height: 1.65; color: #ded4c5;
    animation: rise-in .8s .3s ease-out both;
}
.hero-status {
    display: inline-flex; align-items: center; gap: 9px; margin-top: 20px; padding: 8px 16px;
    background: rgba(8,6,5,.62); border: 1px solid rgba(200,164,92,.35); border-radius: 999px;
    backdrop-filter: blur(6px); font-size: 13px; color: var(--muted);
    animation: rise-in .8s .4s ease-out both;
}
.hero-status b { color: var(--gold-hi); font-weight: 700; }
.dot.unknown { background: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; margin-top: 26px; animation: rise-in .8s .5s ease-out both; }
.hero-cta .btn { width: auto; margin: 0; padding: 14px 30px; font-size: 14.5px; letter-spacing: 1px; }
.hero-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); animation: rise-in .8s .55s ease-out both; }
.scroll-hint {
    position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
    font-size: 22px; color: var(--gold); opacity: .75; animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------------- bara de cifre vii ---------------- */
.stats {
    position: relative; z-index: 2; margin-top: -34px;
}
.stats-in {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 900px; margin: 0 auto; padding: 18px 10px;
    background: rgba(16,12,10,.86); backdrop-filter: blur(10px);
    border: 1px solid rgba(200,164,92,.3); border-radius: 14px;
    box-shadow: 0 22px 60px rgba(0,0,0,.6);
}
.stat { text-align: center; padding: 4px 10px; }
.stat + .stat { border-left: 1px solid rgba(200,164,92,.16); }
.stat-n { display: block; font-size: 30px; font-weight: 700; color: var(--gold-hi); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-l { display: block; margin-top: 3px; font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }

/* ---------------- sectiuni ---------------- */
.sec { padding: 66px 0; position: relative; }
.sec + .sec { border-top: 1px solid rgba(64,52,38,.45); }
.sec-head { text-align: center; margin-bottom: 34px; }
.sec-head h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: 2px; color: var(--gold-hi); }
.sec-head .line {
    display: block; width: 120px; height: 1px; margin: 12px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    position: relative;
}
.sec-head .line::after {
    content: "◆"; position: absolute; left: 50%; top: -9px; transform: translateX(-50%);
    font-size: 10px; color: var(--gold);
}
.sec-head p { margin: 12px auto 0; max-width: 620px; color: var(--muted); font-size: 14.5px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .75s cubic-bezier(.2,.7,.3,1); }
.reveal.seen { opacity: 1; transform: none; }
.reveal[style*="--d"] { transition-delay: var(--d); }

/* imperiile: doua stindarde */
.sec-empires { background: linear-gradient(rgba(8,6,5,1) 0%, rgba(8,6,5,.84) 14%, rgba(8,6,5,.94) 100%), url(/img/empire-bg.jpg) center/cover; }
.empires2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 0 auto; }
.emp {
    position: relative; text-align: center; padding: 26px 20px 24px;
    background: rgba(14,11,9,.72); border: 1px solid var(--line); border-radius: 14px;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.emp:hover { transform: translateY(-6px); }
.emp img { width: 168px; height: auto; display: block; margin: 0 auto 14px; filter: drop-shadow(0 12px 26px rgba(0,0,0,.6)); transition: transform .35s ease; }
.emp:hover img { transform: scale(1.05); }
.emp h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: 1.5px; }
.emp p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.emp.jinno:hover   { border-color: rgba(84,132,224,.65); box-shadow: 0 18px 44px rgba(30,60,140,.28); }
.emp.jinno h3      { color: #8fb2f5; }
.emp.shinsoo:hover { border-color: rgba(200,70,60,.65); box-shadow: 0 18px 44px rgba(140,30,25,.28); }
.emp.shinsoo h3    { color: #f09a90; }

/* clasele */
.classes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cls {
    text-align: center; padding: 20px 14px 18px;
    background: rgba(16,12,10,.6); border: 1px solid var(--line); border-radius: 14px;
    transition: transform .28s ease, border-color .28s ease, background .28s ease;
}
.cls:hover { transform: translateY(-6px); border-color: rgba(200,164,92,.5); background: rgba(30,23,17,.7); }
.cls img { width: 96px; height: 96px; display: block; margin: 0 auto 12px; transition: filter .3s ease, transform .3s ease; }
.cls:hover img { filter: drop-shadow(0 0 16px rgba(200,164,92,.45)); transform: scale(1.06); }
.cls h3 { margin: 0 0 5px; font-size: 17px; letter-spacing: 1px; color: var(--gold-hi); }
.cls p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* sistemele */
.systems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sys {
    position: relative; overflow: hidden;
    padding: 20px 20px 18px;
    background: rgba(16,12,10,.62); border: 1px solid var(--line); border-radius: 14px;
    transition: transform .28s ease, border-color .28s ease;
}
.sys:hover { transform: translateY(-5px); border-color: rgba(200,164,92,.45); }
.sys h3 { margin: 0 0 7px; font-size: 16.5px; color: var(--text); letter-spacing: .6px; }
.sys p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.sys .mark { display: block; margin-bottom: 12px; color: var(--gold); }
.sys .mark svg { width: 30px; height: 30px; display: block; }
.sys:hover .mark svg { filter: drop-shadow(0 0 8px rgba(200,164,92,.5)); }
.sys.star {
    grid-column: span 2;
    display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 20px; align-items: center;
    border-color: rgba(200,164,92,.55);
    background: linear-gradient(120deg, rgba(48,36,22,.85), rgba(16,12,10,.7));
}
.sys.star h3 { color: var(--gold-hi); font-size: 19px; }
.sys.star .btn { width: auto; margin-top: 14px; }
/* mini-previzualizarea pietei din cardul "Piata web": construita din piese, nu o poza — ramane clara la orice marime */
.mm {
    background: rgba(10,8,7,.72); border: 1px solid var(--line); border-radius: 12px;
    overflow: hidden; box-shadow: 0 14px 34px rgba(0,0,0,.45);
}
.mm-head {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 13px; background: rgba(200,164,92,.08); border-bottom: 1px solid var(--line);
}
.mm-head b { font-size: 13.5px; color: var(--gold-hi); }
.mm-head span { font-size: 11px; color: var(--muted); }
.mm ul { list-style: none; margin: 0; padding: 4px 0; }
.mm li {
    display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px;
    padding: 7px 13px; font-size: 12px; color: var(--text);
}
.mm li + li { border-top: 1px solid rgba(64,52,38,.45); }
.mm li img { width: 28px; height: 28px; display: block; }
.mm li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* preturile stau toate pe aceeasi margine din dreapta */
.mm li b { justify-self: end; color: var(--gold-hi); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.mm-foot { display: flex; justify-content: flex-end; padding: 4px 13px 11px; }
.mm-foot em {
    padding: 4px 12px;
    font-style: normal; font-size: 11px; font-weight: 700; color: #241c10;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-radius: 5px;
}
.sys-tag {
    display: inline-block; margin-bottom: 8px; padding: 2px 9px;
    font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: #241c10; background: var(--gold); border-radius: 999px;
}

/* pasii */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; }
.steps li { position: relative; padding: 24px 22px 22px; background: rgba(16,12,10,.6); border: 1px solid var(--line); border-radius: 14px; }
.step-n {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin-bottom: 13px;
    border: 1px solid var(--gold); border-radius: 50%;
    color: var(--gold-hi); font-weight: 700; font-size: 15px;
    font-family: 'Cinzel', serif;
}
.steps h3 { margin: 0 0 8px; font-size: 16.5px; color: var(--text); }
.steps p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.steps p b { color: var(--gold-hi); }
.steps .btn { width: auto; }

/* finalul */
.sec-final {
    text-align: center;
    background: linear-gradient(rgba(8,6,5,.72), rgba(8,6,5,.93)), url(/img/hero.jpg) center 35%/cover;
    border-top: 1px solid rgba(200,164,92,.28);
}
.sec-final .hero-cta { animation: none; }

.foot .credit { display: block; margin-top: 6px; font-size: 11.5px; color: #6f6659; }

@media (max-width: 940px) {
    .classes { grid-template-columns: 1fr 1fr; }
    .systems { grid-template-columns: 1fr 1fr; }
    .sys.star { grid-column: span 2; grid-template-columns: 1fr; }
    .sys.star img { max-width: 340px; }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .empires2, .classes, .systems { grid-template-columns: 1fr; }
    .sys.star { grid-column: span 1; }
    .stats-in { grid-template-columns: 1fr; gap: 12px; }
    .stat + .stat { border-left: 0; border-top: 1px solid rgba(200,164,92,.16); padding-top: 12px; }
    .hero { min-height: 76vh; }
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .hero-logo, .hero-media video, .hero-media img, .scroll-hint { animation: none; }
}
