/* ═══════════════════════════════════════════════════════════
   DRAGON'S CROWN — Hősi fantasy dizájn
   ═══════════════════════════════════════════════════════════ */
:root {
    --gold: #ffcf5e;
    --gold-dark: #b8860b;
    --gold-light: #ffe9a8;
    --gem: #7ec8ff;
    --gem-dark: #2b6fb8;
    --bg: #0d1026;
    --bg2: #171b3a;
    --panel: #191e44;
    --panel2: #12163a;
    --line: #2e3468;
    --txt: #dfe3ff;
    --muted: #8a91c8;
    --green: #7dd87d;
    --red: #ff7d92;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: Georgia, 'Times New Roman', serif;
    background: radial-gradient(ellipse at 50% -20%, #232a5e 0%, var(--bg) 60%);
    color: var(--txt);
    min-height: 100vh;
    overflow-x: hidden;
}
#particles { position: fixed; inset: 0; pointer-events: none; z-index: 1; }

button { font-family: inherit; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--panel2); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ─────────── Gombok ─────────── */
.btn-gold, .btn-gem {
    padding: 12px 22px;
    font-size: 15px; font-weight: bold; letter-spacing: .5px;
    border: none; border-radius: 10px; cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    position: relative; overflow: hidden;
}
.btn-gold {
    color: #241a00;
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--gold-dark));
    box-shadow: 0 4px 16px rgba(255, 207, 94, .35);
}
.btn-gem {
    color: #00172e;
    background: linear-gradient(180deg, #c9e8ff, var(--gem) 45%, var(--gem-dark));
    box-shadow: 0 4px 16px rgba(126, 200, 255, .35);
}
.btn-gold:hover, .btn-gem:hover { transform: translateY(-2px); }
.btn-gold::after, .btn-gem::after {
    content: ''; position: absolute; top: -50%; left: -70%;
    width: 40%; height: 200%;
    background: rgba(255,255,255,.35); transform: rotate(25deg);
    transition: left .5s;
}
.btn-gold:hover::after, .btn-gem:hover::after { left: 130%; }

/* ═══════════════════ LANDING ═══════════════════ */
.landing { display: flex; align-items: flex-start; justify-content: center; }
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.moon {
    position: absolute; top: 8%; right: 12%;
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fffbe8, #e8d9a0 60%, #c9b878);
    box-shadow: 0 0 70px 25px rgba(255, 245, 200, .25);
    animation: moonGlow 6s ease-in-out infinite;
}
@keyframes moonGlow { 50% { box-shadow: 0 0 90px 40px rgba(255,245,200,.35); } }
.mountains {
    position: absolute; bottom: 0; left: 0; right: 0; height: 34vh;
    background:
      linear-gradient(160deg, transparent 40%, #0a0d20 41%) no-repeat 0 0 / 45% 100%,
      linear-gradient(200deg, transparent 40%, #090b1c 41%) no-repeat 100% 0 / 55% 100%,
      linear-gradient(180deg, transparent, #070917 70%);
}
.dragon-fly {
    position: absolute; font-size: 42px; top: 18%; left: -10%;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.6));
    animation: dragonFly 26s linear infinite;
}
@keyframes dragonFly {
    0%   { left: -8%;  top: 20%; transform: scaleX(1) rotate(4deg); }
    45%  { left: 100%; top: 10%; transform: scaleX(1) rotate(-4deg); }
    50%  { left: 104%; top: 12%; transform: scaleX(-1) rotate(4deg); }
    95%  { left: -6%;  top: 22%; transform: scaleX(-1) rotate(-4deg); }
    100% { left: -8%;  top: 20%; transform: scaleX(1) rotate(4deg); }
}
.landing-wrap { position: relative; z-index: 2; width: 100%; max-width: 520px; padding: 40px 16px 70px; text-align: center; }
.lang-bar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 26px; }
.lang-chip {
    padding: 7px 14px; border-radius: 20px; font-size: 13px;
    color: var(--muted); text-decoration: none;
    border: 1px solid var(--line); background: rgba(23,27,58,.7);
    transition: .2s;
}
.lang-chip.on, .lang-chip:hover { color: var(--gold); border-color: var(--gold-dark); }
.game-title {
    font-size: clamp(34px, 7vw, 54px); letter-spacing: 4px; color: var(--gold);
    text-shadow: 0 0 30px rgba(255, 207, 94, .45), 0 3px 0 #6b4d00;
    animation: titlePulse 4s ease-in-out infinite;
}
@keyframes titlePulse { 50% { text-shadow: 0 0 50px rgba(255,207,94,.75), 0 3px 0 #6b4d00; } }
.game-slogan { color: var(--muted); font-style: italic; margin: 8px 0 30px; }

.auth-card {
    background: linear-gradient(180deg, #1b2048, var(--panel2));
    border: 1px solid var(--line); border-radius: 18px;
    padding: 28px 30px 24px; text-align: left;
    box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.auth-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.auth-tab {
    flex: 1; padding: 11px; font-size: 15px; letter-spacing: 1px;
    background: none; border: 1px solid var(--line); border-radius: 10px;
    color: var(--muted); cursor: pointer; transition: .2s;
}
.auth-tab.on { color: var(--gold); border-color: var(--gold-dark); background: rgba(255,207,94,.07); }
.auth-form label { display: block; font-size: 13px; color: var(--muted); margin: 13px 0 5px; }
.auth-form input {
    width: 100%; background: #0c0f28; border: 1px solid var(--line);
    border-radius: 9px; color: var(--txt); padding: 11px 13px; font-size: 15px; font-family: inherit;
    transition: .2s;
}
.auth-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,207,94,.14); }
.auth-form .btn-gold { width: 100%; margin-top: 22px; padding: 14px; font-size: 16px; }
.row2 { display: flex; gap: 12px; } .row2 > div { flex: 1; }
.switch-hint { text-align: center; color: var(--gem); font-size: 13px; margin-top: 14px; cursor: pointer; }
.switch-hint:hover { text-decoration: underline; }
.form-err { background: #3a1220; border: 1px solid #a33; color: #ffb3c0; padding: 12px 15px; border-radius: 10px; margin-bottom: 8px; font-size: 14px; }

/* Nem-választó kártyák */
.gender-pick { display: flex; gap: 12px; margin-top: 4px; }
.g-card { flex: 1; cursor: pointer; }
.g-card input { display: none; }
.g-inner {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    border: 2px solid var(--line); border-radius: 14px; padding: 16px 8px 12px;
    transition: .25s; background: rgba(12,15,40,.6);
}
.g-avatar {
    font-size: 40px; width: 74px; height: 74px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 6px; transition: .25s;
}
.g-m { background: radial-gradient(circle, #29406e, #14203c); }
.g-f { background: radial-gradient(circle, #5e2c58, #2c1230); }
.g-inner b { font-size: 15px; }
.g-inner i { font-size: 11px; color: var(--muted); text-align: center; }
.g-card input:checked + .g-inner {
    border-color: var(--gold); background: rgba(255,207,94,.08);
    box-shadow: 0 0 24px rgba(255,207,94,.25);
    transform: translateY(-3px);
}
.g-card input:checked + .g-inner .g-avatar { animation: bounceAv .5s; }
@keyframes bounceAv { 40% { transform: scale(1.18); } }

/* ═══════════════════ TOPBAR ═══════════════════ */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 18px;
    padding: 10px 18px;
    background: linear-gradient(180deg, rgba(18,22,58,.97), rgba(14,17,44,.94));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(6px);
}
.tb-logo { font-size: 19px; color: var(--gold); font-weight: bold; letter-spacing: 1px; white-space: nowrap; text-shadow: 0 0 14px rgba(255,207,94,.4); }
.tb-stats { display: flex; align-items: center; gap: 16px; flex: 1; flex-wrap: wrap; }
.stat { display: flex; align-items: center; gap: 7px; font-size: 15px; background: rgba(12,15,40,.65); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); }
.stat b { color: var(--gold-light); min-width: 20px; }
.gems-stat b { color: var(--gem); }
.plus-btn {
    width: 21px; height: 21px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(180deg, #c9e8ff, var(--gem)); color: #003; font-weight: bold;
    animation: plusPulse 2.5s infinite;
}
@keyframes plusPulse { 50% { box-shadow: 0 0 12px 3px rgba(126,200,255,.6); } }
.bar { width: 90px; height: 10px; border-radius: 6px; background: #0a0d24; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; border-radius: 6px; transition: width .6s; }
.energy-fill { background: linear-gradient(90deg, #ffd86b, #ff9d3c); box-shadow: 0 0 8px rgba(255,180,80,.7); }
.xp-fill { background: linear-gradient(90deg, #8f7bff, #c07bff); box-shadow: 0 0 8px rgba(160,120,255,.7); }
.lvl-badge {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, var(--gold), var(--gold-dark)); color: #241a00;
    font-weight: bold; border-radius: 50%; font-size: 13px;
    box-shadow: 0 0 12px rgba(255,207,94,.5);
}
.tb-right { display: flex; align-items: center; gap: 10px; }
.tb-right select {
    background: #0c0f28; color: var(--txt); border: 1px solid var(--line);
    border-radius: 8px; padding: 7px 9px; font-family: inherit; cursor: pointer;
}
.tb-btn {
    color: var(--txt); text-decoration: none; padding: 7px 13px;
    border: 1px solid var(--line); border-radius: 8px; font-size: 14px; transition: .2s;
    background: rgba(12,15,40,.6);
}
.tb-btn:hover { border-color: var(--gold); color: var(--gold); }
.admin-btn { border-color: #7a4f9e; color: #d9b3ff; }

/* ═══════════════════ ELRENDEZÉS ═══════════════════ */
.layout {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 270px 1fr;
    gap: 20px; padding: 22px; max-width: 1220px; margin: 0 auto;
}
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.panel {
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0,0,0,.4);
}
.panel-h { padding: 14px 16px 8px; color: var(--gold); font-size: 14px; letter-spacing: 1px; }
.side { display: flex; flex-direction: column; gap: 16px; }
.side-btn { width: 100%; padding: 14px; font-size: 16px; }

/* Karakter kártya */
.char-panel { padding: 24px 16px 18px; text-align: center; }
.char-avatar {
    position: relative; width: 96px; height: 96px; margin: 0 auto 12px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.av-m { background: radial-gradient(circle, #29406e, #14203c); }
.av-f { background: radial-gradient(circle, #5e2c58, #2c1230); }
.av-emoji { font-size: 46px; animation: heroFloat 3.5s ease-in-out infinite; }
@keyframes heroFloat { 50% { transform: translateY(-6px); } }
.av-ring {
    position: absolute; inset: -5px; border-radius: 50%;
    border: 2px solid var(--gold);
    border-top-color: transparent; border-bottom-color: transparent;
    animation: ringSpin 7s linear infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
.char-name { color: var(--gold-light); font-size: 19px; }
.char-title { color: var(--muted); font-style: italic; font-size: 12.5px; margin: 3px 0 14px; }
.char-stats { display: flex; justify-content: space-around; border-top: 1px solid var(--line); padding-top: 12px; }
.char-stats div { display: flex; flex-direction: column; }
.char-stats span { font-size: 11px; color: var(--muted); }
.char-stats b { font-size: 16px; color: var(--gold-light); }

.inv-list { padding: 6px 14px 14px; display: flex; flex-direction: column; gap: 7px; min-height: 40px; }
.inv-item { display: flex; align-items: center; gap: 9px; font-size: 14px; background: rgba(12,15,40,.55); padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); }
.inv-item .pw { margin-left: auto; color: var(--green); font-size: 12px; }
.inv-empty { color: var(--muted); font-size: 13px; font-style: italic; padding: 4px 2px; }

/* ═══════════════════ SZTORI PANEL ═══════════════════ */
.story-panel { overflow: hidden; align-self: start; }
.scene-art {
    height: 210px; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid var(--line);
    transition: background 1s;
}
.scene-art .art-main { font-size: 84px; filter: drop-shadow(0 8px 22px rgba(0,0,0,.7)); animation: artFloat 4s ease-in-out infinite; z-index: 2; }
@keyframes artFloat { 50% { transform: translateY(-9px) rotate(-2deg); } }
.scene-art .art-sub { position: absolute; font-size: 30px; opacity: .8; animation: subDrift 7s ease-in-out infinite; }
.scene-art .art-sub.s1 { left: 14%; top: 30%; animation-delay: -2s; }
.scene-art .art-sub.s2 { right: 15%; top: 55%; animation-delay: -4s; font-size: 24px; }
.scene-art .art-sub.s3 { left: 26%; bottom: 14%; animation-delay: -1s; font-size: 20px; }
@keyframes subDrift { 50% { transform: translateY(-12px) translateX(6px); } }
.scene-art::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 120%, rgba(13,16,38,.85), transparent 60%);
}
/* Jelenet-hátterek */
.art-village  { background: linear-gradient(180deg, #2c3a72, #4b3557 60%, #6e4636); }
.art-market   { background: linear-gradient(180deg, #3d3168, #7d4a3a 70%, #9c6a3c); }
.art-forest   { background: linear-gradient(180deg, #14233c, #16402e 60%, #0d2b1c); }
.art-wolves   { background: linear-gradient(180deg, #0d1026, #251538 65%, #0d0a1a); }
.art-river    { background: linear-gradient(180deg, #1a2c56, #2b5f8a 60%, #17405f); }
.art-ruins    { background: linear-gradient(180deg, #241f4e, #3d3660 60%, #2a2440); }
.art-cave     { background: linear-gradient(180deg, #170f0d, #40241a 65%, #200f0a); }
.art-treasure { background: linear-gradient(180deg, #2a1c08, #6e4a10 65%, #3d2a08); }
.art-dragon   { background: linear-gradient(180deg, #300a0a, #7a1f10 60%, #38100a); }
.art-crown    { background: linear-gradient(180deg, #3a2c72, #8a5a1e 70%, #b8860b); }

.scene-inner { padding: 22px 30px 30px; }
.scene-chapter { color: var(--gem); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 5px; }
.scene-title {
    color: var(--gold); font-size: 27px; letter-spacing: 1px; margin-bottom: 14px;
    text-shadow: 0 0 22px rgba(255,207,94,.35);
    animation: fadeSlide .6s;
}
.scene-body { font-size: 16.5px; line-height: 1.75; color: var(--txt); animation: fadeSlide .8s; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(10px); } }

.choices { display: flex; flex-direction: column; gap: 11px; margin-top: 26px; }
.choice-btn {
    text-align: left; padding: 14px 18px; font-size: 15.5px; font-family: inherit;
    background: linear-gradient(180deg, #232a5e, #1a1f4a);
    color: var(--txt); border: 1px solid var(--line); border-radius: 12px;
    cursor: pointer; transition: .2s; position: relative;
    animation: fadeSlide .5s backwards;
}
.choice-btn:nth-child(2) { animation-delay: .08s; }
.choice-btn:nth-child(3) { animation-delay: .16s; }
.choice-btn:nth-child(4) { animation-delay: .24s; }
.choice-btn:hover:not(.off) { border-color: var(--gold); transform: translateX(6px); box-shadow: -4px 0 0 var(--gold), 0 6px 20px rgba(0,0,0,.4); }
.choice-btn.off { opacity: .48; cursor: not-allowed; }
.choice-meta { display: block; font-size: 12px; margin-top: 5px; color: var(--muted); }
.choice-meta .cost { color: var(--red); margin-right: 10px; }
.choice-meta .rew { color: var(--green); margin-right: 10px; }
.choice-meta .lock { color: var(--gold); }

/* ═══════════════════ MODALOK ═══════════════════ */
.modal-back {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(5,7,20,.75); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 18px;
    animation: fadeIn .25s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
    width: 100%; max-width: 640px; max-height: 84vh; overflow-y: auto;
    background: linear-gradient(180deg, #1b2048, var(--panel2));
    border: 1px solid var(--line); border-radius: 18px; padding: 22px 26px;
    box-shadow: 0 30px 90px rgba(0,0,0,.7);
    animation: popIn .3s;
}
@keyframes popIn { from { transform: scale(.92); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { color: var(--gold); font-size: 21px; letter-spacing: 1px; }
.modal-head .x { background: none; border: 1px solid var(--line); color: var(--muted); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.modal-head .x:hover { color: var(--red); border-color: var(--red); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 13px; align-items: start; }
.shop-item {
    display: flex; gap: 12px; padding: 13px; border: 1px solid var(--line);
    border-radius: 13px; background: rgba(12,15,40,.55); transition: .2s;
}
.shop-item:hover { border-color: var(--gold-dark); }
.shop-icon { font-size: 34px; align-self: center; flex-shrink: 0; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.shop-info { flex: 1; min-width: 0; }
.shop-info b { display: block; color: var(--gold-light); margin-bottom: 2px; overflow-wrap: break-word; word-break: break-word; }
.shop-info small { color: var(--muted); font-size: 12px; line-height: 1.4; display: block; overflow-wrap: break-word; word-break: break-word; }
.shop-info .pw { color: var(--green); font-size: 12px; }
.shop-buy { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; flex-shrink: 0; }
.shop-buy .price { font-size: 14px; font-weight: bold; color: var(--gold-light); white-space: nowrap; }
.shop-buy .price.gemp { color: var(--gem); }
.shop-buy button { padding: 7px 14px; font-size: 13px; }
.shop-buy .own { font-size: 11px; color: var(--green); }

.premium-desc { color: var(--muted); font-style: italic; margin-bottom: 16px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 13px; }
.pkg {
    position: relative; text-align: center; padding: 22px 14px 16px;
    border: 1px solid var(--gem-dark); border-radius: 14px;
    background: radial-gradient(ellipse at 50% 0%, rgba(126,200,255,.12), rgba(12,15,40,.6) 70%);
    transition: .2s;
}
.pkg:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(126,200,255,.2); }
.pkg .best {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(90deg, var(--gold), #ff9d3c); color: #241a00;
    font-size: 10px; font-weight: bold; letter-spacing: 1px;
    padding: 3px 12px; border-radius: 12px;
}
.pkg .pkg-gem { font-size: 40px; animation: gemSpin 5s ease-in-out infinite; display: inline-block; }
@keyframes gemSpin { 50% { transform: rotateY(180deg); } }
.pkg h4 { color: var(--gem); margin: 6px 0 2px; }
.pkg .amount { font-size: 22px; color: #fff; font-weight: bold; }
.pkg .bonus { color: var(--green); font-size: 12px; }
.pkg button { margin-top: 12px; width: 100%; padding: 10px; font-size: 14px; }

/* ═══════════════════ CHAT WIDGET ═══════════════════ */
.chat-widget {
    position: fixed; right: 24px; bottom: 24px; z-index: 80;
    width: 360px;
    background: linear-gradient(180deg, #1b2048, var(--panel2));
    border: 1px solid var(--line); border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,.65);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.chat-widget.min .chat-body { display: none; }
.chat-widget.min { width: 240px; }
.chat-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 13px;
    background: linear-gradient(90deg, rgba(255,207,94,.13), rgba(126,200,255,.10));
    border-bottom: 1px solid var(--line);
    cursor: grab; user-select: none;
}
.chat-head:active { cursor: grabbing; }
.chat-title { color: var(--gold); font-size: 14px; font-weight: bold; display: flex; align-items: center; gap: 7px; }
.chat-unread {
    background: var(--red); color: #fff; font-size: 11px; min-width: 19px; height: 19px;
    border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 5px; animation: unreadPop .3s;
}
@keyframes unreadPop { from { transform: scale(0); } }
.chat-head-btns { display: flex; gap: 5px; }
.chat-head-btns button {
    background: rgba(12,15,40,.6); border: 1px solid var(--line); color: var(--muted);
    width: 27px; height: 27px; border-radius: 7px; cursor: pointer; font-size: 13px; transition: .15s;
}
.chat-head-btns button:hover { color: var(--gold); border-color: var(--gold); }
.chat-body { display: flex; flex-direction: column; height: 380px; position: relative; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.chat-empty { color: var(--muted); font-size: 13px; font-style: italic; text-align: center; margin-top: 20px; }
.msg { max-width: 82%; animation: fadeSlide .25s; }
.msg .m-head { font-size: 11px; color: var(--muted); margin-bottom: 2px; display: flex; gap: 6px; align-items: baseline; }
.msg .m-name { font-weight: bold; cursor: pointer; }
.msg .m-name.nm { color: #8fb4ff; } .msg .m-name.nf { color: #ff9dd2; }
.msg .m-name.adm::after { content: ' 🛠'; font-size: 10px; }
.msg .m-body {
    background: #232a5e; border: 1px solid var(--line);
    padding: 8px 12px; border-radius: 3px 12px 12px 12px; font-size: 14px; line-height: 1.45;
    word-wrap: break-word;
}
.msg.mine { align-self: flex-end; }
.msg.mine .m-head { justify-content: flex-end; }
.msg.mine .m-body {
    background: linear-gradient(180deg, #4a3a10, #3a2d0a);
    border-color: var(--gold-dark); border-radius: 12px 3px 12px 12px;
}
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-input input {
    flex: 1; background: #0c0f28; border: 1px solid var(--line); border-radius: 9px;
    color: var(--txt); padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.chat-input input:focus { outline: none; border-color: var(--gold); }
.chat-input button { padding: 0 16px; font-size: 13px; }
.chat-sidepane {
    position: absolute; top: 0; left: 0; right: 0; bottom: 52px; z-index: 3;
    background: rgba(14,17,44,.97); padding: 12px; overflow-y: auto;
}
.chat-sidepane h5 { color: var(--gold); font-size: 13px; margin-bottom: 10px; letter-spacing: 1px; }
.room-row, .user-row {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
    margin-bottom: 7px; cursor: pointer; font-size: 14px; transition: .15s;
    background: rgba(12,15,40,.5);
}
.room-row:hover, .user-row:hover { border-color: var(--gold); }
.room-row.on { border-color: var(--gold); background: rgba(255,207,94,.09); }
.room-row .ru { margin-left: auto; }
.user-row .u-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.user-row .u-open { margin-left: auto; font-size: 12px; color: var(--gem); }

/* ═══════════════════ TOAST + LEVELUP ═══════════════════ */
#toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.toast {
    background: linear-gradient(180deg, #1b2048, var(--panel2));
    border: 1px solid var(--gold-dark); color: var(--gold-light);
    padding: 12px 22px; border-radius: 12px; font-size: 15px;
    box-shadow: 0 10px 34px rgba(0,0,0,.6);
    animation: toastIn .3s, toastOut .4s 2.8s forwards;
}
.toast.err { border-color: #a33; color: #ffb3c0; }
@keyframes toastIn { from { transform: translateY(-16px); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-12px); opacity: 0; } }

#levelup-fx {
    position: fixed; inset: 0; z-index: 130; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#levelup-fx h2 {
    color: var(--gold); font-size: 34px; letter-spacing: 2px;
    text-shadow: 0 0 40px rgba(255,207,94,.9);
    animation: lvlText 2.6s forwards;
}
.lvl-burst { font-size: 90px; animation: lvlBurst 2.6s forwards; }
@keyframes lvlBurst {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    25% { transform: scale(1.4) rotate(10deg); opacity: 1; }
    60% { transform: scale(1); }
    100% { transform: scale(2.2); opacity: 0; }
}
@keyframes lvlText {
    0% { transform: translateY(24px); opacity: 0; }
    25% { transform: translateY(0); opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* ═══════════════════ ADMIN ═══════════════════ */
.admin-wrap { position: relative; z-index: 2; max-width: 1220px; margin: 0 auto; padding: 22px; display: grid; grid-template-columns: 210px 1fr; gap: 20px; }
@media (max-width: 900px) { .admin-wrap { grid-template-columns: 1fr; } }
.admin-nav { display: flex; flex-direction: column; gap: 6px; align-self: start; }
.admin-nav a {
    color: var(--txt); text-decoration: none; padding: 11px 15px;
    border: 1px solid transparent; border-radius: 10px; font-size: 14.5px; transition: .15s;
}
.admin-nav a:hover { border-color: var(--line); background: rgba(12,15,40,.5); }
.admin-nav a.on { border-color: var(--gold-dark); background: rgba(255,207,94,.08); color: var(--gold); }
.admin-main { min-width: 0; }
.admin-main .panel { padding: 20px 24px; margin-bottom: 18px; }
.admin-main h2 { color: var(--gold); font-size: 21px; margin-bottom: 16px; letter-spacing: 1px; }
.admin-main h3 { color: var(--gem); font-size: 15px; margin: 18px 0 10px; }
.atable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.atable th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; padding: 8px 9px; border-bottom: 1px solid var(--line); }
.atable td { padding: 8px 9px; border-bottom: 1px solid rgba(46,52,104,.5); vertical-align: middle; }
.atable tr:hover td { background: rgba(255,255,255,.025); }
.atable input, .atable select, .admin-main input, .admin-main select, .admin-main textarea {
    background: #0c0f28; border: 1px solid var(--line); border-radius: 8px;
    color: var(--txt); padding: 8px 10px; font-size: 13.5px; font-family: inherit;
}
.admin-main textarea { width: 100%; min-height: 90px; resize: vertical; line-height: 1.5; }
.admin-main input:focus, .admin-main textarea:focus, .admin-main select:focus { outline: none; border-color: var(--gold); }
.abtn {
    display: inline-block; padding: 8px 15px; border-radius: 8px; border: 1px solid var(--line);
    background: #232a5e; color: var(--txt); cursor: pointer; font-size: 13px; text-decoration: none; transition: .15s;
}
.abtn:hover { border-color: var(--gold); color: var(--gold); }
.abtn.danger:hover { border-color: var(--red); color: var(--red); }
.abtn.gold { background: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--gold-dark)); color: #241a00; border: none; font-weight: bold; }
.pill { padding: 3px 10px; border-radius: 12px; font-size: 11.5px; }
.pill.g { background: rgba(125,216,125,.15); color: var(--green); }
.pill.r { background: rgba(255,125,146,.15); color: var(--red); }
.pill.b { background: rgba(126,200,255,.15); color: var(--gem); }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 13px; margin-bottom: 4px; }
.stat-card { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(12,15,40,.55); }
.stat-card .n { font-size: 26px; color: var(--gold); font-weight: bold; }
.stat-card .l { font-size: 12px; color: var(--muted); margin-top: 3px; }
.frow { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.frow > div { display: flex; flex-direction: column; gap: 4px; }
.frow label { font-size: 11.5px; color: var(--muted); }
.msg-ok { background: rgba(125,216,125,.12); border: 1px solid #4a7d4a; color: var(--green); padding: 11px 15px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }

/* ═══════════════════ ÚJ JELENET-HÁTTEREK (északi ág) ═══════════════════ */
.art-snow        { background: linear-gradient(180deg, #1a2c56, #4a6a9a 60%, #dfe9f5); }
.art-bridge      { background: linear-gradient(180deg, #14203c, #2b4a6e 55%, #0a1428); }
.art-lake        { background: linear-gradient(180deg, #16305a, #2b6f8a 60%, #9fd8e8); }
.art-icecave     { background: linear-gradient(180deg, #0d1440, #1e3a7a 60%, #3a6ab8); }
.art-frostdragon { background: linear-gradient(180deg, #0a1030, #1a3a6e 55%, #6ea8d8); }
.art-spring      { background: linear-gradient(180deg, #2b6fb8, #7ec8ff 50%, #8fd88f); }

/* Harc-jelvény a választásokon */
.fight-badge {
    display: inline-block; margin-right: 10px;
    color: #ffb35e; font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 140, 60, .5);
    animation: badgePulse 1.8s infinite;
}
@keyframes badgePulse { 50% { text-shadow: 0 0 18px rgba(255, 140, 60, .9); } }

/* Kockázatos választás jelvénye */
.risk-badge {
    display: inline-block; margin-right: 10px;
    color: #c4b5fd; font-style: italic;
}

/* ═══════════════════ HARC KÉPERNYŐ ═══════════════════ */
.battle-back {
    position: fixed; inset: 0; z-index: 100;
    background: radial-gradient(ellipse at 50% 30%, rgba(60, 20, 20, .55), rgba(5, 7, 20, .92) 70%);
    backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; padding: 16px;
    animation: fadeIn .3s;
}
.battle-arena {
    width: 100%; max-width: 760px; max-height: 94vh; overflow-y: auto;
    background: linear-gradient(180deg, #221a3e, #14102c);
    border: 1px solid #5e3468; border-radius: 20px; padding: 20px 26px 22px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .8), 0 0 60px rgba(255, 100, 60, .12) inset;
    animation: popIn .35s;
}
.battle-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.battle-title { color: #ff9d5e; font-size: 21px; font-weight: bold; letter-spacing: 2px; text-shadow: 0 0 18px rgba(255, 120, 60, .6); }
.battle-round { color: var(--muted); font-size: 14px; }
.battle-round b { color: var(--gold); }

.battle-field { display: flex; align-items: flex-start; gap: 12px; }
.combatant { flex: 1; text-align: center; }
.battle-vs {
    font-size: 30px; align-self: center; padding-top: 60px;
    animation: vsPulse 1.6s infinite;
}
@keyframes vsPulse { 50% { transform: scale(1.3); filter: drop-shadow(0 0 12px #ffcf5e); } }
.c-name { font-size: 16px; color: var(--gold-light); font-weight: bold; margin-bottom: 6px; }
.c-stats { font-size: 13px; color: var(--muted); margin-top: 6px; }

.hpbar {
    position: relative; height: 20px; border-radius: 11px;
    background: #0a0d24; border: 1px solid var(--line);
    overflow: hidden; margin-bottom: 12px;
}
.hpbar-fill {
    height: 100%; width: 100%;
    background: linear-gradient(90deg, #4ade80, #86efac);
    box-shadow: 0 0 12px rgba(80, 220, 130, .6);
    transition: width .7s cubic-bezier(.22, 1, .36, 1);
}
.hpbar-fill.enemy { background: linear-gradient(90deg, #f87171, #fca5a5); box-shadow: 0 0 12px rgba(250, 110, 110, .6); }
.hpbar-fill.low { background: linear-gradient(90deg, #f59e0b, #ef4444) !important; animation: hpBlink 1s infinite; }
@keyframes hpBlink { 50% { opacity: .6; } }
.hp-num {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: bold; color: #fff; text-shadow: 0 1px 3px #000;
}

.fighter-figure { position: relative; }
.zone-fig {
    width: 120px; height: 150px; margin: 0 auto 8px;
    border-radius: 60px 60px 22px 22px;
    display: flex; align-items: center; justify-content: center;
    position: relative; transition: .2s;
}
.fig-m { background: radial-gradient(circle at 50% 30%, #29406e, #14203c 75%); border: 2px solid #3d5a94; }
.fig-f { background: radial-gradient(circle at 50% 30%, #5e2c58, #2c1230 75%); border: 2px solid #94467e; }
.fig-monster { background: radial-gradient(circle at 50% 30%, #6e2c20, #2c0f0a 75%); border: 2px solid #a04a30; }
.fig-emoji { font-size: 54px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.7)); animation: heroFloat 3s ease-in-out infinite; }
.fig-monster .fig-emoji { animation: monsterBreath 2.2s ease-in-out infinite; }
@keyframes monsterBreath { 50% { transform: scale(1.09) translateY(-4px); } }

/* zóna-jelölés a figurán: célkereszt / pajzs sáv */
.zone-fig::after {
    content: ''; position: absolute; left: 6px; right: 6px; height: 30%;
    border: 2px dashed transparent; border-radius: 12px; transition: .25s;
    pointer-events: none;
}
.zone-fig[data-mark="head"]::after  { top: 2%;  border-color: rgba(255, 207, 94, .85); background: rgba(255, 207, 94, .12); }
.zone-fig[data-mark="torso"]::after { top: 34%; border-color: rgba(255, 207, 94, .85); background: rgba(255, 207, 94, .12); }
.zone-fig[data-mark="legs"]::after  { top: 66%; border-color: rgba(255, 207, 94, .85); background: rgba(255, 207, 94, .12); }

.zones { display: flex; flex-direction: column; gap: 6px; }
.zone {
    padding: 8px 10px; font-size: 13px; font-family: inherit;
    background: rgba(12, 15, 40, .7); color: var(--txt);
    border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: .15s;
}
.zone:hover { border-color: var(--gold); }
.atk-zones .zone.sel { border-color: #ff7d5e; background: rgba(255, 110, 70, .18); color: #ffb39d; box-shadow: 0 0 14px rgba(255, 110, 70, .35); }
.def-zones .zone.sel { border-color: #7ec8ff; background: rgba(126, 200, 255, .16); color: #b3ddff; box-shadow: 0 0 14px rgba(126, 200, 255, .35); }

/* Boss-mechanika: gyenge pont jelzése a támadó-zóna gombon */
.atk-zones .zone.weak { border-color: var(--gold); color: var(--gold-light); animation: weakPulse 1.3s infinite; }
.atk-zones .zone.weak::after { content: ' 💢'; }
@keyframes weakPulse { 50% { box-shadow: 0 0 16px rgba(255, 207, 94, .55); } }
.b-weak-hint { font-size: 12px; color: var(--gold-light); text-align: center; margin-bottom: 6px; }

/* találat / hárítás animációk */
.hit-shake { animation: hitShake .5s; }
@keyframes hitShake {
    0%, 100% { transform: translateX(0); filter: none; }
    20% { transform: translateX(-9px) rotate(-3deg); filter: brightness(1.8) saturate(2) hue-rotate(-20deg); }
    45% { transform: translateX(8px) rotate(2deg); }
    70% { transform: translateX(-5px); }
}
.block-flash { animation: blockFlash .5s; }
@keyframes blockFlash {
    30% { box-shadow: 0 0 30px 8px rgba(126, 200, 255, .8); filter: brightness(1.5); }
}
.dmg-float {
    position: absolute; top: 30%; z-index: 5;
    font-size: 24px; font-weight: bold; pointer-events: none;
    animation: dmgUp 1.25s forwards;
}
.dmg-float.hurt { color: #ff6b6b; text-shadow: 0 2px 8px #000; }
.dmg-float.block { color: #7ec8ff; }
@keyframes dmgUp {
    0% { transform: translateY(0) scale(.6); opacity: 0; }
    20% { transform: translateY(-12px) scale(1.25); opacity: 1; }
    100% { transform: translateY(-58px) scale(1); opacity: 0; }
}

.battle-hint { text-align: center; color: var(--muted); font-size: 13px; font-style: italic; margin: 12px 0 8px; }
.battle-log {
    min-height: 44px; max-height: 110px; overflow-y: auto;
    background: rgba(10, 13, 36, .6); border: 1px solid var(--line);
    border-radius: 10px; padding: 8px 12px; margin-bottom: 12px;
    display: flex; flex-direction: column; gap: 3px;
}
.b-line { font-size: 13px; animation: fadeSlide .3s; }
.b-line.good { color: var(--green); }
.b-line.bad { color: var(--red); }
.b-line.neutral { color: var(--muted); }

.battle-actions { display: flex; gap: 12px; justify-content: center; }
.battle-strike { padding: 14px 40px; font-size: 17px; letter-spacing: 1px; }
.battle-strike:disabled { opacity: .5; cursor: wait; transform: none; }
.battle-flee { align-self: center; }

.battle-result { text-align: center; padding: 10px 0 4px; animation: popIn .4s; }
.battle-result h2 { font-size: 30px; letter-spacing: 2px; margin-bottom: 8px; }
.res-win { color: var(--gold); text-shadow: 0 0 30px rgba(255, 207, 94, .8); animation: titlePulse 2s infinite; }
.res-lose { color: #ff7d92; text-shadow: 0 0 24px rgba(255, 100, 120, .6); }
.rew-title { color: var(--muted); font-size: 13px; }
.rew-items { font-size: 20px; color: var(--gold-light); margin: 6px 0 14px; }
.battle-result .btn-gold { padding: 12px 34px; }

@media (max-width: 640px) {
    .battle-field { flex-direction: column; }
    .battle-vs { padding: 4px 0; align-self: center; }
}

/* ═══════════════════ v3: HP, képességek, időzítő, zászlók ═══════════════════ */
.hp-fill { background: linear-gradient(90deg, #4ade80, #86efac); box-shadow: 0 0 8px rgba(80,220,130,.6); }
.hp-fill.low { background: linear-gradient(90deg, #f59e0b, #ef4444); animation: hpBlink 1s infinite; }
.energy-timer { font-size: 11.5px; color: var(--muted); min-width: 52px; font-variant-numeric: tabular-nums; }
.xp-text { font-size: 11px; color: #c9b8ff; font-variant-numeric: tabular-nums; }
.flag-img { border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.5); vertical-align: -2px; }

/* Nyelvválasztó legördülő zászlókkal */
.lang-dd { position: relative; }
.lang-dd-btn { display: flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit; font-size: 14px; }
.lang-dd-list {
    display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 200;
    background: linear-gradient(180deg, #1b2048, var(--panel2));
    border: 1px solid var(--line); border-radius: 12px; padding: 6px;
    min-width: 160px; box-shadow: 0 16px 50px rgba(0,0,0,.6);
}
.lang-dd.open .lang-dd-list { display: block; animation: popIn .2s; }
.lang-dd-list a {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 12px; color: var(--txt); text-decoration: none;
    border-radius: 8px; font-size: 14px;
}
.lang-dd-list a:hover { background: rgba(255,207,94,.09); color: var(--gold); }
.lang-dd-list a.on { color: var(--gold); }

/* Karakter panel: HP + XP sávok */
.char-hp, .char-xp { display: flex; align-items: center; gap: 8px; margin: 7px 12px; }
.hpbar.slim { height: 16px; flex: 1; margin-bottom: 0; }
.hpbar.slim .hp-num { font-size: 10.5px; }
.hpbar-fill.xpbar { background: linear-gradient(90deg, #8f7bff, #c07bff); box-shadow: 0 0 8px rgba(160,120,255,.6); }
.hpbar-fill.low { background: linear-gradient(90deg, #f59e0b, #ef4444) !important; animation: hpBlink 1s infinite; }

/* Képességek */
.sp-badge {
    background: var(--gold); color: #241a00; font-size: 11px; font-weight: bold;
    padding: 2px 9px; border-radius: 11px; margin-left: 7px;
    animation: plusPulse 2s infinite;
}
.skill-list { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.skill-row {
    display: flex; align-items: center; gap: 9px; font-size: 13.5px;
    background: rgba(12,15,40,.55); padding: 7px 11px; border-radius: 9px;
    border: 1px solid var(--line);
}
.skill-row .sk-name { flex: 1; }
.skill-row .sk-val { color: var(--gold-light); min-width: 18px; text-align: right; }
.sk-plus {
    width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); color: #241a00;
    font-weight: bold; font-size: 15px; line-height: 1;
    animation: plusPulse 1.8s infinite;
}
.sk-plus:hover { transform: scale(1.15); }

/* Tarisznya gombok, képek */
.inv-item { position: relative; }
.inv-btns { margin-left: auto; display: flex; gap: 4px; }
.inv-b {
    width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
    background: rgba(12,15,40,.8); border: 1px solid var(--line); font-size: 12px;
    transition: .15s;
}
.inv-b.use:hover { border-color: var(--green); }
.inv-b.sell:hover { border-color: var(--gold); }
.inv-img, .shop-img { width: 34px; height: 34px; object-fit: contain; border-radius: 7px; align-self: center; }
.shop-img { width: 44px; height: 44px; }
.scale-mark { color: var(--gem); font-size: 12px; }
.casino-btn, .quest-btn, .lb-btn { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px !important; padding: 13px !important; }

/* ═══════════════════ FANTASY TOOLTIP ═══════════════════ */
.ftip {
    position: fixed; z-index: 400; pointer-events: none;
    max-width: 260px; padding: 9px 15px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255,207,94,.10), transparent 60%),
        linear-gradient(180deg, #221c46, #14102e);
    border: 1px solid var(--gold-dark);
    border-radius: 10px;
    color: var(--gold-light); font-size: 13px; font-style: italic;
    box-shadow: 0 10px 34px rgba(0,0,0,.7), 0 0 18px rgba(255,207,94,.15);
    text-align: center;
}
.ftip::before, .ftip::after {
    content: ''; position: absolute; left: 8px; right: 8px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}
.ftip::before { top: 3px; } .ftip::after { bottom: 3px; }
.ftip-orn { color: var(--gold); font-style: normal; font-size: 10px; animation: ornPulse 1.6s infinite; display: inline-block; }
@keyframes ornPulse { 50% { transform: scale(1.35) rotate(20deg); text-shadow: 0 0 8px var(--gold); } }
.ftip-in { animation: ftipIn .22s cubic-bezier(.2,1.4,.4,1); }
@keyframes ftipIn { from { opacity: 0; transform: scale(.85) translateY(6px); } }

/* ═══════════════════ KASZINÓ ═══════════════════ */
.casino-modal { max-width: 560px; }
.casino-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.ctab {
    flex: 1; padding: 10px; font-size: 13.5px; font-family: inherit;
    background: none; border: 1px solid var(--line); border-radius: 10px;
    color: var(--muted); cursor: pointer; transition: .2s;
}
.ctab.on { color: var(--gold); border-color: var(--gold-dark); background: rgba(255,207,94,.08); }
.casino-bet { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; justify-content: center; }
.casino-bet label { color: var(--muted); font-size: 14px; }
.casino-bet input {
    width: 110px; background: #0c0f28; border: 1px solid var(--line); border-radius: 9px;
    color: var(--gold-light); padding: 9px 12px; font-size: 16px; font-family: inherit; text-align: center;
}
.bet-range { color: var(--muted); font-size: 12px; }
.cgame { text-align: center; }
.casino-go { padding: 13px 40px; font-size: 16px; margin-top: 16px; }

/* Szerencsekerék */
.wheel-wrap { position: relative; width: 240px; height: 240px; margin: 0 auto; }
.wheel-pointer {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    font-size: 26px; color: var(--gold); z-index: 3;
    text-shadow: 0 0 12px rgba(255,207,94,.8);
}
.wheel {
    width: 240px; height: 240px; border-radius: 50%;
    border: 6px solid var(--gold-dark);
    box-shadow: 0 0 0 3px #14102c, 0 0 40px rgba(255,207,94,.25), inset 0 0 30px rgba(0,0,0,.55);
    position: relative;
}
.wseg {
    position: absolute; left: 50%; top: 50%;
    margin-left: -16px; margin-top: -10px; width: 32px;
    font-size: 13px; font-weight: bold; color: #fff; text-shadow: 0 1px 3px #000;
    text-align: center;
}
.cres { margin-top: 16px; padding: 13px; border-radius: 11px; font-size: 17px; animation: popIn .3s; }
.cres.win { background: rgba(125,216,125,.13); border: 1px solid #4a7d4a; color: var(--green); }
.cres.lose { background: rgba(255,125,146,.11); border: 1px solid #7d3a4a; color: var(--red); }
.cres.push { background: rgba(126,200,255,.10); border: 1px solid #3a5a7d; color: var(--gem); }

/* Kocka */
.dice-table { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 10px 0; }
.dice-label { color: var(--muted); font-size: 13px; display: block; margin-bottom: 8px; }
.dice-row { display: flex; gap: 10px; }
.die {
    width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
    font-size: 46px; color: #fff;
    background: linear-gradient(180deg, #232a5e, #14183c);
    border: 1px solid var(--line); border-radius: 13px;
}
.die.rolling { animation: dieRoll .25s infinite; }
@keyframes dieRoll { 50% { transform: rotate(12deg) scale(1.1); } }
.dice-vs { font-size: 24px; animation: vsPulse 1.6s infinite; }

/* Blackjack */
.bj-table { display: flex; flex-direction: column; gap: 16px; margin: 8px 0; }
.bj-hand b { color: var(--gold); }
.cards { display: flex; gap: 8px; justify-content: center; min-height: 74px; flex-wrap: wrap; }
.card {
    width: 52px; height: 72px; display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: bold; color: #1a1a2e;
    background: linear-gradient(160deg, #f6f1de, #d9d0b0);
    border-radius: 8px; border: 1px solid #a89868;
    box-shadow: 0 4px 10px rgba(0,0,0,.5);
    animation: cardDeal .35s backwards;
}
.card:nth-child(2) { animation-delay: .08s; } .card:nth-child(3) { animation-delay: .16s; }
.card:nth-child(4) { animation-delay: .24s; } .card:nth-child(5) { animation-delay: .32s; }
@keyframes cardDeal { from { transform: translateY(-26px) rotate(-8deg); opacity: 0; } }
.card.red { color: #a4243b; }
.card.back { background: linear-gradient(160deg, #2b3468, #1a1f4a); color: var(--gold); font-size: 30px; }
.bj-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }

/* ═══════════════════ KÜLDETÉSEK ═══════════════════ */
.q-section { color: var(--gem); font-size: 14px; letter-spacing: 1px; margin: 16px 0 9px; }
.q-row {
    display: flex; align-items: center; gap: 13px;
    border: 1px solid var(--line); border-radius: 12px;
    padding: 11px 14px; margin-bottom: 9px;
    background: rgba(12,15,40,.5); transition: .2s;
}
.q-row.ready { border-color: var(--gold-dark); background: rgba(255,207,94,.07); animation: readyGlow 2s infinite; }
@keyframes readyGlow { 50% { box-shadow: 0 0 16px rgba(255,207,94,.25); } }
.q-row.claimed { opacity: .55; }
.q-info { flex: 1; }
.q-info b { font-size: 14.5px; }
.q-bar { height: 8px; background: #0a0d24; border-radius: 5px; margin: 7px 0 5px; overflow: hidden; border: 1px solid var(--line); }
.q-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 5px; transition: width .5s; }
.q-rew { color: var(--green); font-size: 12px; }
.q-prog-num { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.q-claim-btn { padding: 9px 15px !important; font-size: 13px !important; }
.q-claimed { color: var(--green); font-size: 13px; }

/* ═══════════════════ RANGLISTA ═══════════════════ */
.lb-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px;
    margin-bottom: 7px; cursor: pointer; transition: .15s;
    background: rgba(12,15,40,.5);
}
.lb-row:hover { border-color: var(--gold); transform: translateX(4px); }
.lb-row.me { border-color: var(--gem-dark); background: rgba(126,200,255,.07); }
.lb-rank { width: 36px; text-align: center; font-size: 17px; font-weight: bold; color: var(--gold-light); }
.lb-av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.lb-av-e { display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.lb-name { flex: 1; font-weight: bold; font-size: 15px; }
.lb-lvl { color: var(--gold-light); font-size: 13px; }
.lb-xp { color: var(--muted); font-size: 12.5px; min-width: 74px; text-align: right; }
.pv-skills { display: flex; justify-content: center; gap: 14px; font-size: 15px; margin-top: 6px; }
.pv-skills span { background: rgba(12,15,40,.6); border: 1px solid var(--line); padding: 6px 12px; border-radius: 9px; }

/* ═══════════════════ PROFIL ═══════════════════ */
.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.av-opt input { display: none; }
.av-opt span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; font-size: 24px;
    background: rgba(12,15,40,.6); border: 2px solid var(--line); border-radius: 12px;
    cursor: pointer; transition: .15s;
}
.av-opt input:checked + span { border-color: var(--gold); background: rgba(255,207,94,.1); box-shadow: 0 0 14px rgba(255,207,94,.3); transform: scale(1.08); }
.av-opt span:hover { border-color: var(--gold-dark); }

/* ═══════════════════ v4: Aréna, céh, kraft, piac, napi jutalom ═══════════════════ */
.side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sg-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 6px !important; font-size: 13px !important; position: relative;
}
.sg-btn .chat-unread { position: absolute; top: -6px; right: -4px; }

.event-banner {
    position: relative; z-index: 3; text-align: center;
    padding: 9px 14px; font-size: 14px;
    background: linear-gradient(90deg, rgba(255,207,94,.16), rgba(255,110,70,.16), rgba(255,207,94,.16));
    border-bottom: 1px solid var(--gold-dark); color: var(--gold-light);
    animation: eventShine 3s infinite;
}
@keyframes eventShine { 50% { filter: brightness(1.25); } }
.verify-banner {
    position: relative; z-index: 3; text-align: center; padding: 8px 14px;
    background: rgba(126,200,255,.1); border-bottom: 1px solid var(--gem-dark);
    color: var(--gem); font-size: 13px;
}

.guild-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.guild-stats { display: flex; gap: 12px; }
.guild-stats span { background: rgba(12,15,40,.6); border: 1px solid var(--line); padding: 7px 13px; border-radius: 9px; font-size: 14px; }

.mats { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.mat {
    font-size: 12px; padding: 3px 9px; border-radius: 9px;
    background: rgba(12,15,40,.6); border: 1px solid var(--line);
}
.mat.ok { border-color: #4a7d4a; color: var(--green); }
.mat.no { border-color: #7d3a4a; color: var(--red); }

.pet-on { border-color: var(--gold) !important; box-shadow: 0 0 20px rgba(255,207,94,.25); }

.daily-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.daily-cell {
    position: relative; text-align: center; padding: 12px 6px;
    border: 1px solid var(--line); border-radius: 11px;
    background: rgba(12,15,40,.55); font-size: 13px;
}
.daily-cell .d-day { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.daily-cell .d-rew { color: var(--gold-light); line-height: 1.5; }
.daily-cell.past { opacity: .5; }
.daily-cell.today {
    border-color: var(--gold); background: rgba(255,207,94,.1);
    animation: readyGlow 2s infinite; transform: scale(1.05);
}
.daily-cell .d-check { position: absolute; top: 4px; right: 7px; color: var(--green); }

/* Feltöltött jelenetkép */
.scene-art.art-photo { background-size: cover; background-position: center; }
.scene-art.art-photo::after {
    background: linear-gradient(180deg, rgba(13,16,38,.15), rgba(13,16,38,.05) 40%, rgba(13,16,38,.9));
}
.zone-fig.fig-photo { background-size: cover; background-position: center top; }

/* ═══════════════════ v5: ritkaság, torony, értesítések ═══════════════════ */
.rar-common {}
.rar-rare { border-color: #3a7abd !important; }
.rar-rare b, .shop-item.rar-rare .shop-info > b { color: #7ec8ff; }
.rar-epic { border-color: #8a4fbd !important; box-shadow: 0 0 10px rgba(160,90,220,.15); }
.rar-epic b, .shop-item.rar-epic .shop-info > b { color: #c99aff; }
.rar-legendary { border-color: #bd8a2f !important; box-shadow: 0 0 14px rgba(255,190,70,.22); animation: legGlow 2.5s infinite; }
.rar-legendary b, .shop-item.rar-legendary .shop-info > b { color: var(--gold); }
@keyframes legGlow { 50% { box-shadow: 0 0 22px rgba(255,190,70,.4); } }
.plus-mark { color: var(--gold); font-size: 12px; }
.inv-b.up:hover { border-color: #c99aff; }

.msg-report {
    background: none; border: none; cursor: pointer; font-size: 10px;
    opacity: 0; transition: .15s; padding: 0 3px;
}
.msg:hover .msg-report { opacity: .7; }
.msg-report:hover { opacity: 1 !important; transform: scale(1.2); }

.notif-list { min-width: 300px; max-width: 340px; max-height: 380px; overflow-y: auto; }
.notif-row {
    padding: 9px 12px; font-size: 13px; line-height: 1.45;
    border-bottom: 1px solid rgba(46,52,104,.5); color: var(--txt);
}
.notif-row.fresh { background: rgba(255,207,94,.06); }
.notif-row:last-child { border-bottom: none; }
.notif-time { color: var(--muted); font-size: 11px; margin-top: 2px; }

/* Admin grafikonok */
.chart {
    display: flex; align-items: flex-end; gap: 6px;
    height: 120px; padding: 10px 4px 4px;
    border: 1px solid var(--line); border-radius: 10px; background: rgba(10,13,36,.5);
    margin-bottom: 14px;
}
.chart-bar {
    flex: 1; min-width: 14px; border-radius: 4px 4px 0 0; position: relative;
    background: linear-gradient(180deg, #8f7bff, #4a3a8a);
    transition: filter .15s;
}
.chart-bar:hover { filter: brightness(1.3); }
.chart-bar span {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    font-size: 10px; color: var(--muted); white-space: nowrap;
}
.gold-chart .chart-bar { background: linear-gradient(180deg, var(--gold), var(--gold-dark)); }

/* ═══════════════════ v6: déli táj, tutorial, keretek, szezonbérlet ═══════════════════ */
.art-desert   { background: linear-gradient(180deg, #3a6ab8, #d8a04a 60%, #a0641e); }
.art-oasis    { background: linear-gradient(180deg, #3a8ab8, #58b86e 65%, #d8a04a); }
.art-temple   { background: linear-gradient(180deg, #4a3a8a, #b8862f 60%, #d8a04a); }
.art-snake    { background: linear-gradient(180deg, #1a1030, #4a2a08 65%, #806018); }
.art-suncrown { background: linear-gradient(180deg, #ffca6b, #58b86e 65%, #3a8ab8); }

/* Tutorial */
#tut-overlay { position: fixed; inset: 0; z-index: 500; }
.tut-hole {
    position: fixed; display: none; border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(5, 7, 20, .82), 0 0 30px rgba(255, 207, 94, .45);
    border: 2px solid var(--gold);
    transition: all .45s cubic-bezier(.4, 1, .4, 1);
    pointer-events: none;
    animation: tutPulse 2s infinite;
}
@keyframes tutPulse { 50% { border-color: var(--gold-light); box-shadow: 0 0 0 9999px rgba(5,7,20,.82), 0 0 44px rgba(255,207,94,.7); } }
.tut-box {
    position: fixed; width: 360px; z-index: 501;
    background: linear-gradient(180deg, #221c46, #14102e);
    border: 1px solid var(--gold-dark); border-radius: 15px;
    padding: 16px 20px; transition: all .45s cubic-bezier(.4, 1, .4, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,.8);
}
.tut-step { color: var(--gem); font-size: 11px; letter-spacing: 2px; margin-bottom: 6px; }
.tut-box p { font-size: 14.5px; line-height: 1.6; }
.tut-btns { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tut-btns .btn-gold { padding: 9px 20px; font-size: 14px; }

/* Avatár-keretek */
.fr { position: relative; }
.fr::before {
    content: ''; position: absolute; inset: -7px; border-radius: 50%;
    pointer-events: none; z-index: 2;
}
.fr-bronze::before { border: 3px solid #b87848; box-shadow: 0 0 10px rgba(184,120,72,.5); }
.fr-silver::before { border: 3px solid #c8d0e0; box-shadow: 0 0 12px rgba(200,210,225,.55); }
.fr-gold::before   { border: 3px solid var(--gold); box-shadow: 0 0 16px rgba(255,207,94,.65); animation: legGlow 2.5s infinite; }
.fr-dragon::before { border: 3px solid #ff7d5e; box-shadow: 0 0 18px rgba(255,110,70,.75); animation: frFire 1.6s infinite; }
@keyframes frFire { 50% { box-shadow: 0 0 30px rgba(255,110,70,1); border-color: #ffb35e; } }
.fr-frost::before  { border: 3px solid #7ec8ff; box-shadow: 0 0 18px rgba(126,200,255,.75); animation: frIce 2.2s infinite; }
@keyframes frIce { 50% { box-shadow: 0 0 30px rgba(180,230,255,1); border-color: #d0f0ff; } }
.cos-frame-prev {
    width: 64px; height: 64px; margin: 6px auto; border-radius: 50%;
    background: radial-gradient(circle, #29406e, #14203c);
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.cos-color-prev { font-size: 17px; font-weight: bold; margin: 14px 0; }

/* Szezonbérlet sávok — 100 szint, belső görgetéssel, hogy a fejléc/XP-sáv fixen látszódjon */
.bp-row {
    display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px;
    padding: 7px 4px; border-bottom: 1px solid rgba(46,52,104,.4);
    align-items: center; opacity: .55;
}
.bp-row.reached { opacity: 1; }
.bp-head-row { opacity: 1; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.bp-head-sticky {
    position: sticky; top: 0; z-index: 2;
    background: var(--panel2, #12163a);
}
.bp-scroll {
    max-height: 46vh; overflow-y: auto; scroll-behavior: auto;
    border: 1px solid rgba(46,52,104,.35); border-radius: 8px;
}
@media (max-height: 700px) {
    .bp-scroll { max-height: 38vh; }
}
.bp-tier-c {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, #232a5e, #14183c); border: 1px solid var(--line);
    border-radius: 50%; font-weight: bold; font-size: 13px;
}
.bp-row.reached .bp-tier-c { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 10px rgba(255,207,94,.3); }
.bp-cell { font-size: 12.5px; }
.bp-cell.done { color: var(--green); }
.bp-cell.locked { color: var(--muted); }
.bp-cell.ready .q-claim-btn { font-size: 12px !important; padding: 7px 10px !important; }

/* Fejezet-jelző a választásokon */
.ch-badge {
    display: inline-block; margin-right: 10px; font-size: 11.5px;
    padding: 2px 9px; border-radius: 10px; border: 1px solid var(--line);
    background: rgba(12,15,40,.6); color: var(--muted);
}
.ch-badge.ch-fwd { border-color: var(--gold-dark); color: var(--gold-light); }
.ch-badge.ch-back { opacity: .8; }

/* Farm-hurok elleni jelzés: ezt a jutalmat már megszerezted */
.claimed-badge {
    display: inline-block; margin-right: 10px; font-size: 11.5px;
    padding: 2px 9px; border-radius: 10px; border: 1px solid var(--line);
    color: var(--muted); opacity: .8;
}
.claimed-note { color: var(--muted) !important; }

/* Árnyvilág hátterek */
.art-shadowgate  { background: linear-gradient(180deg, #05030f, #2a1a4a 55%, #0d0620); }
.art-darkforest  { background: linear-gradient(180deg, #0a0518, #1a0f30 60%, #05030f); }
.art-moontower   { background: linear-gradient(180deg, #0d1030, #3a3a6e 60%, #1a1a40); }
.art-shadowqueen { background: linear-gradient(180deg, #0a0316, #3a1048 60%, #12051f); }
.art-dawnbreak   { background: linear-gradient(180deg, #4a3a8a, #d87a4a 55%, #ffcf8e); }

/* Hamu-hágó / Zsarátnok-titán ág (10–12. fejezet) */
.art-ashengate   { background: linear-gradient(180deg, #2a1810, #6e3018 55%, #1a0d08); }
.art-forge       { background: linear-gradient(180deg, #3a1408, #b8541e 60%, #ffb35e); }
.art-cinderpass  { background: linear-gradient(180deg, #241614, #5a2e1a 55%, #8a4a1e); }
.art-forgehollow { background: linear-gradient(180deg, #150c0a, #3a1e12 60%, #1a0f0a); }
.art-moltenvault { background: linear-gradient(180deg, #200806, #8a2408 55%, #ff6a1e); }
.art-titanmaw    { background: linear-gradient(180deg, #140506, #4a0e08 55%, #200a05); }
.art-cindertitan { background: linear-gradient(180deg, #1a0402, #7a1206 50%, #ff4a1e); }
.art-fifthdawn   { background: linear-gradient(180deg, #6e2c10, #ffab4a 55%, #ffe1a8); }
