/* Elvion 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: hidden;
}
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; }

/* ---------- 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;
    }
}
