/* Plejarena — izgled prema dizajnu "Tvoja sljedeća avantura." (gejmerska neon tema: magenta, ljubičasta, cijan) */

:root {
  --bg: #05060e;
  --bg-2: #080a16;
  --panel: #0d1022;
  --panel-2: #131731;
  --panel-3: #1a1f40;
  --line: #1c2246;
  --line-2: #2a3166;
  --text: #f3f5ff;
  --muted: #929bc8;
  --dim: #5f6792;
  --purple: #8f3cff;
  --purple-2: #a855ff;
  --purple-3: #c58bff;
  --purple-dark: #2a1460;
  --pink: #ff3ad1;
  --cyan: #22e1ff;
  --gold: #ffcc33;
  --gold-2: #ff9f1a;
  --green: #2bff88;
  --blue: #22e1ff;
  --red: #ff3d6e;
  --grad: linear-gradient(100deg, #ff3ad1 0%, #a43bff 55%, #7b2fff 100%);
  --grad-c: linear-gradient(90deg, #a43bff, #22e1ff);
  --glow-p: 0 0 18px rgba(196, 59, 255, .45);
  --glow-c: 0 0 16px rgba(34, 225, 255, .35);
  --r: 14px;
  --r-sm: 10px;
  --head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --topbar: 70px;
  --sidebar: 220px;
  --rail: 340px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(164, 59, 255, .16), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(34, 225, 255, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; font-weight: 600; letter-spacing: .1px; }
.ic { flex: none; display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link { color: var(--cyan); font-weight: 700; }
.link:hover { color: #8ff0ff; text-shadow: var(--glow-c); }
.c-purple { color: var(--purple-2); }
.c-gold { color: var(--gold); }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: 1px; }

/* ── Gumbi ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 42px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn.busy { opacity: .6; pointer-events: none; }
.btn.block { display: flex; width: 100%; }
.btn.lg { height: 50px; font-size: 17px; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(196, 59, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .25); text-shadow: 0 1px 2px rgba(60, 0, 80, .4); }
.btn.primary:hover { filter: brightness(1.12); box-shadow: 0 6px 26px rgba(255, 58, 209, .5), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.dark { background: var(--panel-3); border-color: var(--line-2); }
.btn.dark:hover { background: #222851; border-color: var(--cyan); box-shadow: var(--glow-c); }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.outline { background: rgba(10, 10, 30, .55); border-color: rgba(255, 255, 255, .35); }
.btn.outline:hover { border-color: #fff; }
.btn.sq { width: 50px; height: 50px; padding: 0; }
.btn.disabled { opacity: .55; cursor: default; pointer-events: none; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn.accent { background: var(--purple-dark); border-color: #7b3dff; color: #fff; }
.btn.accent:hover { background: #3a1a85; box-shadow: var(--glow-p); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm);
  background: transparent; border: 0; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--panel-2); }
.icon-btn.sq { border: 1px solid var(--line-2); background: var(--panel-2); width: 42px; height: 42px; }
.fav-btn.on { color: var(--red); }
.fav-btn.on .ic { fill: currentColor; }
.btn.fav-btn.on { border-color: var(--purple-3); color: var(--purple-3); }
.btn.fav-btn.on .ic { fill: currentColor; }

/* ── Avatar (glava Piko skina u krugu) ───────────────────────────────────── */
.av {
  --s: 44px;
  position: relative; display: inline-block; flex: none;
  width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--img) 48% 27% / 220% no-repeat, radial-gradient(circle at 50% 35%, #5a3aa8, #1f1650 70%);
  box-shadow: 0 0 0 2px rgba(197, 139, 255, .22);
}
.av .dot { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; max-width: 14px; max-height: 14px; border: 2.5px solid var(--panel); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.dot.online { background: var(--green); }
.dot.ingame { background: var(--green); }
.dot.online, .dot.ingame { box-shadow: 0 0 8px rgba(43, 255, 136, .7); }
.dot.offline { background: #4d5478; }

/* ── Gornja traka ───────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar); display: flex; align-items: center; gap: 24px;
  padding: 0 24px 0 32px; background: rgba(5, 6, 14, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; width: calc(var(--sidebar) + 100px); }
.brand span {
  font-family: var(--head); font-weight: 700; font-size: 23px; letter-spacing: 1.4px;
  background: linear-gradient(90deg, #fff 30%, #ff9cf0 70%, #c58bff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand.big { width: auto; justify-content: center; }
.brand.big span { font-size: 28px; }
.search {
  position: relative; flex: 1; max-width: 840px; display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2);
  color: var(--muted);
}
.search:focus-within { border-color: var(--cyan); box-shadow: var(--glow-c); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search-drop {
  position: absolute; left: 0; right: 0; top: 48px; z-index: 40; padding: 6px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.search-drop a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; color: var(--text); }
.search-drop a:hover, .search-drop a.sel { background: var(--panel-3); }
.search-drop img { width: 56px; height: 36px; object-fit: cover; border-radius: 6px; }
.search-drop p { margin: 6px 8px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.bell { position: relative; }
.badge-dot { position: absolute; top: 6px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--bg), 0 0 10px var(--pink); }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 12px; font-weight: 700; font-size: 16px; }
.user-btn:hover { background: var(--panel); }
.dd { position: relative; }
.dd-panel {
  position: absolute; right: 0; top: 52px; z-index: 50; min-width: 220px; padding: 6px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.user-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.user-panel a:hover { background: var(--panel-3); }
.notif-panel { width: 340px; }
/* jezik (i18n.py): globus + kod u gornjoj traci, popis jezika u padajucem izborniku */
.lang-btn { width: auto; gap: 6px; padding: 0 10px; grid-auto-flow: column; font-weight: 800; font-size: 14px; letter-spacing: .5px; color: var(--muted); }
.lang-btn:hover { color: var(--text); }
.lang-panel { min-width: 190px; }
.lang-panel a b { width: 26px; color: var(--muted); font-size: 13px; }
.lang-panel a .ic { margin-left: auto; color: var(--cyan); }
.lang-panel a.on { color: var(--cyan); }
.dd-head { padding: 8px 10px 6px; font-family: var(--head); font-weight: 600; font-size: 16px; }
.notif { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.notif + .notif { border-top: 1px solid var(--line); }
.notif p { flex: 1; margin: 0; font-size: 14px; }
.notif .acts { display: flex; gap: 6px; }
.pad { padding: 8px 10px; margin: 0; }

/* ── Raspored ───────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--rail); min-height: calc(100vh - var(--topbar)); }
.sidebar {
  position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar));
  display: flex; flex-direction: column; padding: 16px 16px 20px; background: rgba(8, 10, 22, .7); border-right: 1px solid var(--line);
}
.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 18px; height: 58px; padding: 0 18px; border-radius: 12px;
  color: #c9cdf0; font-size: 17px; font-weight: 600; border: 1px solid transparent;
}
.nav-link .ic { color: #b9bde6; }
.nav-link:hover { background: var(--panel); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(255, 58, 209, .2), rgba(143, 60, 255, .14) 60%, rgba(143, 60, 255, .04));
  border-color: rgba(197, 139, 255, .45); color: #fff; font-weight: 700;
  box-shadow: inset 3px 0 0 var(--pink), 0 0 20px rgba(164, 59, 255, .18);
}
.nav-link.active .ic { color: var(--cyan); filter: drop-shadow(0 0 6px rgba(34, 225, 255, .6)); }
.side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.lvl-box { display: flex; align-items: center; gap: 14px; padding: 6px 4px; }
.lvl-info { flex: 1; min-width: 0; }
.lvl-info b { display: block; font-size: 15px; margin-bottom: 6px; }
.lvl-info span { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.guest-box { display: flex; flex-direction: column; gap: 8px; }
.guest-box span { color: var(--muted); font-size: 13px; }

.bar { height: 7px; border-radius: 99px; background: #1e2349; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff3ad1, #a43bff); box-shadow: 0 0 10px rgba(255, 58, 209, .6); }
.bar.blue i { background: var(--grad-c); box-shadow: 0 0 10px rgba(34, 225, 255, .55); }

.main { min-width: 0; padding: 20px 24px 40px; }
.rail { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 12px 16px 16px 12px; display: flex; flex-direction: column; gap: 16px; }
.rail::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; background: var(--panel-2); border: 1px solid var(--line-2); }
.flash.success { border-color: #1c9a5a; background: #06231a; }
.flash.error { border-color: #a3264c; background: #2a0816; }
.flash.info { border-color: #6b3bd0; background: #1a0f45; }

/* ── Početna ────────────────────────────────────────────────────────────── */
.page-title { font-size: 44px; font-weight: 600; line-height: 1.1; }
.page-title.sm { font-size: 32px; }
.page-sub { margin: 4px 0 14px; font-size: 20px; color: #aab2de; }

.hero {
  position: relative; height: 272px; border-radius: 16px; overflow: hidden;
  background: var(--hero) center / cover no-repeat, #133;
  border: 1px solid rgba(197, 139, 255, .45);
  box-shadow: 0 0 0 1px rgba(255, 58, 209, .15), 0 0 34px rgba(164, 59, 255, .28), 0 10px 40px rgba(0, 0, 0, .5);
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(6, 4, 20, .94) 0%, rgba(14, 6, 38, .78) 28%, rgba(14, 6, 38, .22) 55%, rgba(14, 6, 38, 0) 75%);
}
.hero-text { position: relative; z-index: 2; padding: 46px 0 0 28px; max-width: 560px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 9px;
  background: rgba(30, 20, 6, .72); border: 1px solid rgba(255, 204, 51, .5); box-shadow: 0 0 12px rgba(255, 204, 51, .2);
  font-weight: 800; font-size: 13px; letter-spacing: .8px;
}
.game-logo {
  margin: 8px 0 2px; font-family: var(--head); font-weight: 700; font-size: 58px; line-height: 1;
  transform: skewX(-9deg); transform-origin: left; letter-spacing: 1px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .5);
}
.game-logo .gold {
  background: linear-gradient(180deg, #ffe169 10%, #f8b318 60%, #e8870b); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(90, 40, 0, .55));
  text-shadow: none;
}
.hero-tag { margin: 4px 0 18px; font-size: 22px; font-weight: 600; color: #e6e7f7; }
.hero-actions { display: flex; gap: 14px; }
.hero-actions .btn.primary { min-width: 224px; }
.hero-mascot {
  position: absolute; right: 3%; bottom: -26px; height: 330px; z-index: 1;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55));
  pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 18px; border-radius: 10px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line-2); font-weight: 600; font-size: 15px; color: #d4d9f7;
  flex: none; transition: border-color .15s, box-shadow .15s;
}
.chip:hover { border-color: var(--cyan); color: #fff; }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow-p); }

.sec-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 600; margin: 18px 0 12px; }
.sec-title::before { content: ''; width: 4px; height: 20px; border-radius: 4px; background: linear-gradient(180deg, var(--pink), var(--cyan)); box-shadow: 0 0 10px rgba(255, 58, 209, .55); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.sec-head .link { font-size: 16px; }

.continue { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cont-card {
  display: flex; align-items: center; gap: 16px; height: 84px; padding: 0 14px 0 8px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
}
.cont-card:hover { border-color: rgba(34, 225, 255, .5); background: #11152e; box-shadow: var(--glow-c); }
.cont-card img { width: 100px; height: 68px; object-fit: cover; border-radius: 8px; flex: none; }
.cont-info { flex: 1; min-width: 0; }
.cont-info b { display: block; font-size: 16px; }
.cont-info > span { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.cont-bar { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.cont-bar .bar { flex: 1; }
.cont-bar em { font-style: normal; font-size: 13px; color: #c9d0f5; min-width: 34px; text-align: right; }
.round-play {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--panel-3); border: 1px solid var(--line-2); color: #fff;
}
.cont-card:hover .round-play { background: var(--grad); border-color: transparent; box-shadow: var(--glow-p); }
.cont-card.empty img { opacity: .7; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gcard {
  position: relative; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-2);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.gcard:not(.soon):hover { border-color: rgba(34, 225, 255, .6); box-shadow: 0 0 22px rgba(34, 225, 255, .22); transform: translateY(-2px); }
.gcard.hot { border: 2px solid #c35bff; box-shadow: 0 0 0 3px rgba(255, 58, 209, .18), 0 0 28px rgba(196, 59, 255, .5); }
.gcard.hot:hover { border-color: #ff6be0; box-shadow: 0 0 0 3px rgba(255, 58, 209, .25), 0 0 34px rgba(255, 58, 209, .5); }
.gcard-img { position: relative; display: block; height: 196px; overflow: hidden; background: var(--panel-2); }
.gcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gcard:hover .gcard-img img { transform: scale(1.04); }
.gcard-img::after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(180deg, transparent, rgba(13, 16, 34, .96)); }
.tag {
  position: absolute; left: 14px; bottom: 12px; z-index: 1; padding: 3px 12px; border-radius: 99px;
  background: rgba(8, 8, 24, .8); border: 1px solid rgba(34, 225, 255, .45); color: #bff6ff; font-size: 13px; font-weight: 700;
}
.heart {
  position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(8, 8, 24, .55); backdrop-filter: blur(4px);
}
.heart:hover { background: rgba(8, 8, 24, .85); }
.gcard-body { padding: 4px 14px 14px; }
.gcard-body h4 { font-size: 22px; font-weight: 600; }
.meta { display: flex; align-items: center; gap: 6px; margin: 4px 0 12px; color: #b9c0e8; font-size: 14px; }
.meta .sep { width: 1px; height: 14px; background: var(--line-2); margin: 0 6px; }
.gcard.soon { border-style: dashed; background: rgba(13, 16, 34, .55); }
.soon-img { display: grid; place-items: center; color: #3a4183; background: repeating-linear-gradient(135deg, #0d1024 0 14px, #11152d 14px 28px); }
.soon-img::after { display: none; }
.gcard.soon h4 { color: #a8b0dc; }
.cards-empty { grid-column: 1 / -1; color: var(--muted); }

/* ── Desni stupac ───────────────────────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card h3 { font-size: 21px; font-weight: 600; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.online-count { display: flex; align-items: center; gap: 7px; margin: 3px 0 0; font-size: 14px; color: var(--green); font-weight: 600; }
.friend-list { display: flex; flex-direction: column; }
.friend {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
}
.friend + .friend { border-top: 1px solid var(--line); }
.friend .who { flex: 1; min-width: 0; cursor: pointer; }
.friend .who b { display: block; font-size: 17px; font-weight: 700; }
.friend .who span { display: block; font-size: 14px; line-height: 1.25; color: var(--muted); }
.friend .who span.on { color: var(--green); }
.friend .who span em { font-style: normal; color: var(--gold); }
.friend.off { opacity: .55; }
.friend .acts { display: flex; gap: 6px; }
.friend .btn.sm { min-width: 88px; }
.chat-btn { width: 38px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; display: grid; place-items: center; position: relative; }
.chat-btn:hover { border-color: var(--cyan); box-shadow: var(--glow-c); }
.chat-btn .badge { position: absolute; top: -6px; right: -6px; }
.empty-friends { padding: 6px 0 2px; font-size: 14px; color: var(--muted); }
.empty-friends .btn { margin-top: 10px; }
.more-link { display: block; text-align: center; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }

.together { background: linear-gradient(140deg, rgba(255, 58, 209, .14), rgba(143, 60, 255, .12) 45%, var(--panel) 85%); border-color: rgba(197, 139, 255, .3); }
.together-top { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.together-top p { margin: 6px 0 0; font-size: 14px; color: #c0c7ec; }
.duo { position: relative; display: flex; flex: none; }
.duo .a2 { margin-left: -18px; }
.duo .av { box-shadow: 0 0 0 3px var(--panel); }
.duo.center { justify-content: center; margin: 14px 0; }
.duo-plus {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--pink); border: 3px solid var(--panel); color: #fff; box-shadow: 0 0 10px rgba(255, 58, 209, .6);
}

.stats h3 { margin-bottom: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat-row > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat-row > div + div { border-left: 1px solid var(--line); }
.stat-row b { font-family: var(--head); font-size: 26px; font-weight: 600; line-height: 1; text-shadow: 0 0 14px rgba(34, 225, 255, .35); }
.stat-row span { font-size: 14px; color: #c0c7ec; }

.messages { padding: 0; }
.msg-head { display: flex; align-items: center; gap: 14px; width: 100%; height: 62px; padding: 0 20px; background: none; border: 0; cursor: pointer; font-size: 18px; font-weight: 600; }
.msg-head .chev { margin-left: auto; transition: transform .2s; }
.msg-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-style: normal; font-weight: 800; }
.msg-body { border-top: 1px solid var(--line); padding: 8px 12px 12px; }
.conv { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 10px; border: 0; background: none; cursor: pointer; text-align: left; }
.conv:hover { background: var(--panel-2); }
.conv b { flex: 1; font-size: 15px; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 4px 0 8px; }
.thread-head b { flex: 1; }
.thread { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; padding: 4px 2px 8px; }
.bubble { max-width: 82%; padding: 7px 11px; border-radius: 14px; background: var(--panel-3); font-size: 14px; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: linear-gradient(135deg, #b42fd8, #6a2bea); }
.bubble time { display: block; font-size: 11px; color: rgba(255, 255, 255, .55); margin-top: 2px; }
.chat-form { display: flex; gap: 8px; }
.chat-form .input { height: 40px; }
.chat-form .btn { width: 44px; padding: 0; height: 40px; }

.guest-rail p { margin: 8px 0 0; }
.guest-rail .btn + .btn { margin-top: 8px; }

/* ── Modal i obavijesti ─────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(3, 3, 12, .75); backdrop-filter: blur(3px); }
.modal-box { width: min(440px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.invite-list { display: flex; flex-direction: column; margin: 10px 0 14px; max-height: 360px; overflow-y: auto; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 520px; padding: 12px 16px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  animation: toast-in .2s ease-out;
}
.toast p { flex: 1; margin: 0; }
.toast.xp { border-color: var(--pink); box-shadow: 0 14px 40px rgba(0, 0, 0, .55), var(--glow-p); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ── Ostale stranice ────────────────────────────────────────────────────── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 18px 18px; margin-bottom: 16px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2);
  color: var(--text); font: inherit; font-size: 16px; outline: 0;
}
.input:focus { border-color: var(--cyan); box-shadow: var(--glow-c); }
.people { display: flex; flex-direction: column; }
.empty-note { color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; margin-top: 14px; background: var(--panel); border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 700; font-size: 13px; }
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.boards .panel { margin: 0; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; }
.rank li + li { border-top: 1px solid var(--line); }
.rank li.me { background: linear-gradient(90deg, rgba(255, 58, 209, .16), rgba(143, 60, 255, .08)); }
.rank .pos { width: 26px; text-align: center; font-family: var(--head); font-weight: 600; color: var(--muted); }
.rank li:nth-child(1) .pos { color: var(--gold); text-shadow: 0 0 10px rgba(255, 204, 51, .6); }
.rank li:nth-child(2) .pos { color: #d6e2f0; }
.rank li:nth-child(3) .pos { color: #ff9f5a; }
.rank b { flex: 1; }
.rank .xp { font-weight: 800; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.avatar-pick input { display: none; }
.avatar-pick:has(input:checked) { border-color: var(--pink); background: rgba(255, 58, 209, .1); box-shadow: var(--glow-p); }
.center-note { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 0; }

.game-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.game-head .spacer { flex: 1; }
.game-head .muted { margin: 2px 0 0; }
.game-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #0b1f18;
  border: 1px solid rgba(197, 139, 255, .4); box-shadow: 0 0 30px rgba(164, 59, 255, .22), 0 10px 40px rgba(0, 0, 0, .5);
}
.game-frame:fullscreen { border-radius: 0; border: 0; }
body.game-page { touch-action: manipulation; }
/* ponuda za vodoravne igre na mobitelu u uspravnom položaju (kao u staroj Plejareni) */
.ls-hint { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 150; display: flex; align-items: center; gap: 6px;
  max-width: 92vw; padding: 7px 7px 7px 10px; border-radius: 100px; border: 1.5px solid rgba(167,139,250,.65);
  background: linear-gradient(135deg, #2d1050, #171028); box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 18px rgba(124,58,237,.35); }
.ls-go { border: 0; border-radius: 100px; padding: 9px 14px; background: linear-gradient(180deg, #a855f7, #7c3aed); color: #fff; font: 800 14px var(--body); cursor: pointer; }
.ls-x { border: 0; background: transparent; color: #a5b4fc; font-size: 16px; padding: 4px 8px; cursor: pointer; }
/* "cijeli zaslon" bez Fullscreen API-ja (iPhone): igra preko cijele stranice */
.fs-exit { display: none; }
body.pseudo-fs { overflow: hidden; overscroll-behavior: none; }
/* igra na cijelom zaslonu: prst u igri ne smije skrolati stranicu ispod (iPhone) */
body.pseudo-fs .game-frame { touch-action: none; overscroll-behavior: none; }
body.pseudo-fs .topbar, body.pseudo-fs .sidebar, body.pseudo-fs .rail { display: none !important; }
body.pseudo-fs .game-frame {
  position: fixed; inset: 0; z-index: 200; width: 100vw; height: 100vh; height: 100dvh;
  aspect-ratio: auto; border-radius: 0; border: 0; background: #000;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body.pseudo-fs .fs-exit {
  display: grid; place-items: center; position: fixed; z-index: 201;
  top: calc(env(safe-area-inset-top) + 8px); right: calc(env(safe-area-inset-right) + 8px);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(10,10,30,.6); color: #fff; font-size: 18px; cursor: pointer;
}
.game-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
/* raspored kontrola na dodir (game.js ctlStart): gumb u zaglavlju, ✥ ispod ✕ na cijelom zaslonu, traka dok se uređuje */
.ctl-head, .ctl-open, .ctl-bar { display: none; }
body.ctl-able .ctl-head { display: inline-flex; }
body.ctl-able.pseudo-fs .ctl-open {
  display: grid; place-items: center; position: fixed; z-index: 201;
  top: calc(env(safe-area-inset-top) + 56px); right: calc(env(safe-area-inset-right) + 8px);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(10,10,30,.6); color: #fff; font-size: 20px; cursor: pointer;
}
body.ctl-editing .ctl-open { background: #ffd21f; color: #222; }
/* dok se uređuje, ✕ ne smije prekrivati gumb igre ispod sebe (često pauza); ✥ tada služi i za kraj */
body.ctl-editing .fs-exit { display: none !important; }
body.ctl-editing .ctl-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; justify-content: center;
  position: absolute; z-index: 203; left: 50%; top: calc(env(safe-area-inset-top) + 8px); transform: translateX(-50%);
  width: max-content; max-width: min(520px, 56%); padding: 6px 8px 6px 14px; border-radius: 14px;
  background: rgba(20, 10, 40, .92); border: 1.5px solid #ffd21f; color: #fff; font-size: 14px; font-weight: 700;
}
.ctl-bar span { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.25; }
.ctl-bar button { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 7px 12px; font: 800 13px var(--body); cursor: pointer; }
.ctl-bar .ctl-reset { background: rgba(255,255,255,.14); color: #fff; }
.ctl-bar .ctl-done { background: #ffd21f; color: #222; }
/* igra je ostala bez WebGL-a (Safari na mobitelu bez grafičke memorije) */
.gl-lost { position: absolute; inset: 0; z-index: 202; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 16px; text-align: center; background: rgba(8, 6, 20, .88); color: #fff; font-size: 15px; line-height: 1.4; }
.gl-lost p { margin: 0; max-width: 420px; }
.game-keys { text-align: center; color: var(--muted); font-size: 14px; margin: 10px 0 4px; }

/* ── Prijava / registracija ─────────────────────────────────────────────── */
.auth-page { min-height: 100vh; background: radial-gradient(1000px 560px at 50% -10%, #3a1170 0%, transparent 60%), radial-gradient(700px 400px at 100% 100%, rgba(34, 225, 255, .1), transparent 60%), var(--bg); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 30px 16px; }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid rgba(197, 139, 255, .3); border-radius: 18px; padding: 28px; box-shadow: 0 0 40px rgba(164, 59, 255, .18), 0 24px 60px rgba(0, 0, 0, .5); }
.auth-card h1 { font-size: 30px; }
.auth-card > .muted { margin: 4px 0 18px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.form small { font-weight: 400; }
.pw { position: relative; display: block; }
.pw .input { padding-right: 48px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; }
.eye.on { color: var(--cyan); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-alt { text-align: center; margin: 14px 0 0; color: var(--muted); }
.lang-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.lang-row a { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid transparent; }
.lang-row a:hover { color: var(--text); }
.lang-row a.on { color: var(--cyan); border-color: var(--line-2); }
.recovery { margin: 16px 0; padding: 18px; text-align: center; border-radius: 12px; background: var(--bg-2); border: 2px dashed var(--pink); font: 700 26px/1 ui-monospace, Consolas, monospace; letter-spacing: 2px; }

/* ── Manji ekrani ───────────────────────────────────────────────────────── */
@media (max-width: 1440px) {
  :root { --rail: 310px; --sidebar: 200px; }
  .brand { width: auto; }
  .game-logo { font-size: 50px; }
  .hero-mascot { height: 300px; }
}
@media (max-width: 1200px) {
  .shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .rail { grid-column: 2; position: static; height: auto; display: grid; grid-template-columns: 1fr 1fr; padding: 0 24px 30px; }
}
@media (max-width: 900px) {
  :root { --topbar: 60px; }
  .topbar { padding: 0 14px; gap: 12px; }
  .brand span { display: none; }
  .user-btn > span:not(.av), .user-btn > .ic { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 70px; }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 30; height: 64px; padding: 4px 6px;
    flex-direction: row; border-right: 0; border-top: 1px solid var(--line);
  }
  .nav-links { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav-link { flex-direction: column; gap: 2px; height: 56px; padding: 0 6px; font-size: 11px; }
  .side-foot { display: none; }
  .main { padding: 14px; }
  .rail { grid-column: 1; grid-template-columns: 1fr; padding: 0 14px 20px; }
  .page-title { font-size: 32px; }
  .page-sub { font-size: 17px; }
  .hero { height: 240px; }
  .hero-text { padding: 26px 0 0 18px; }
  .game-logo { font-size: 38px; }
  .hero-tag { font-size: 17px; }
  .hero-mascot { height: 230px; right: -20px; opacity: .9; }
  .hero-actions .btn.primary { min-width: 0; }
  .continue, .boards { grid-template-columns: 1fr; }
  /* donja traka: staklo + neon crta ispod aktivne stavke */
  .sidebar { background: rgba(6, 7, 16, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-bottom: calc(4px + env(safe-area-inset-bottom)); height: calc(64px + env(safe-area-inset-bottom)); }
  .nav-link { position: relative; }
  .nav-link.active { background: radial-gradient(60% 70% at 50% 50%, rgba(255, 58, 209, .2), transparent 75%); border-color: transparent; box-shadow: none; }
  .nav-link.active::before { content: ''; position: absolute; top: -4px; left: 22%; right: 22%; height: 3px; border-radius: 0 0 4px 4px; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
  /* više igara u redu: slika ide omjerom, ne fiksnom visinom */
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .gcard-img { height: auto; aspect-ratio: 4 / 3; }
  .gcard-body h4 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .meta { font-size: 13px; white-space: nowrap; }
  .meta .m-pl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 560px) {
  /* mobitel: dvije igre u redu, zbijene kartice */
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gcard { border-radius: 12px; }
  .gcard.hot { border-width: 1.5px; }
  .tag { left: 8px; bottom: 6px; padding: 1px 8px; font-size: 11px; }
  .heart { top: 6px; right: 6px; width: 30px; height: 30px; }
  .heart .ic { width: 17px; height: 17px; }
  .gcard-body { padding: 2px 10px 10px; }
  .gcard-body h4 { font-size: 15.5px; }
  .meta { gap: 4px; margin: 2px 0 8px; font-size: 11.5px; }
  .meta .ic { width: 13px; height: 13px; }
  .meta .sep { margin: 0 3px; height: 11px; }
  .gcard-body .btn { height: 34px; gap: 6px; font-size: 14px; border-radius: 9px; }
  .soon-img .ic { width: 32px; height: 32px; }
  .gcard.soon ~ .gcard.soon { display: none; }   /* na mobitelu je dosta jedno prazno mjesto */
  /* kategorije u jednom redu koji se vuče prstom, umjesto tri reda */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 16px -14px 4px; padding: 2px 14px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { height: 36px; padding: 0 14px; font-size: 14px; }
  .sec-title { font-size: 20px; margin: 16px 0 10px; }
  .cont-card { height: 72px; gap: 12px; }
  .cont-card img { width: 84px; height: 56px; }
  .round-play { width: 40px; height: 40px; }
  .hero-mascot { height: 190px; right: -36px; }
  .nav-link span { display: none; }
  .notif-panel { width: calc(100vw - 28px); right: -60px; }
}

/* uski mobiteli: zaglavlje igre i gornja traka se lome, ništa ne smije biti šire od ekrana */
@media (max-width: 560px) {
  .game-head { flex-wrap: wrap; gap: 10px; }
  .game-head > div:nth-child(2) { flex: 1 1 calc(100% - 60px); min-width: 0; }
  .game-head .spacer { display: none; }
  .game-head .page-title.sm { font-size: 26px; }
  .top-actions .btn.primary { display: none; }
  .top-actions .btn { height: 38px; padding: 0 12px; }
  .top-actions { gap: 8px; }
  .lang-btn { padding: 0 6px; }
  .lang-btn span { display: none; }
  .search { min-width: 0; }
  .main { overflow-x: hidden; }
}
