/* =====================================================================
   PLUGG fx — the "game UI" layer (Phase 5). Loaded on every page.
   Everything here is decoration on top of working pages: if this file or
   fx.js fails to load, the site still works and everything stays visible.
   Motion is switched off for people who ask their device to reduce it.
   ===================================================================== */

/* ---------- 1. HUD frames: corner brackets on panels and stat tiles ---------- */
.panel, .stat, .hud-frame {
  --hud-c: color-mix(in srgb, var(--acc, #22d3ee) 55%, transparent);
  --hud-l: 14px;
  background-image:
    linear-gradient(var(--hud-c), var(--hud-c)), linear-gradient(var(--hud-c), var(--hud-c)),
    linear-gradient(var(--hud-c), var(--hud-c)), linear-gradient(var(--hud-c), var(--hud-c));
  background-repeat: no-repeat;
  background-size: var(--hud-l) 2px, 2px var(--hud-l), var(--hud-l) 2px, 2px var(--hud-l);
  background-position: 0 0, 0 0, 100% 100%, 100% 100%;
}
.stat { --hud-l: 10px; }
.btn.primary, .btn.ok, .btn.danger {
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn.primary:focus-visible, .btn.ok:focus-visible, .btn.danger:focus-visible { outline-offset: -4px; outline-color: #fff; }
.kicker { font-family: var(--ffm, monospace); font-size: .7rem; letter-spacing: .16em; color: var(--acc); text-transform: uppercase; }

/* ---------- 2. Scroll reveals ("boot up"), count-ups, glitch ---------- */
html.fx-armed .fx-hide { opacity: 0; transform: translateY(14px); }
html.fx-armed .fx-in { animation: fx-boot .6s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes fx-boot {
  0%   { opacity: 0; transform: translateY(14px); clip-path: inset(0 0 100% 0); filter: brightness(1.8); }
  55%  { opacity: 1; clip-path: inset(0 0 0 0); filter: brightness(1.25); }
  100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0); filter: none; }
}
.fx-glitch { animation: fx-glitch .45s steps(2) 1; }
@keyframes fx-glitch {
  0%   { text-shadow: 2px 0 var(--acc), -2px 0 #ff2d78; transform: translateX(1px); }
  33%  { text-shadow: -2px 0 var(--acc), 2px 0 #ff2d78; transform: translateX(-1px); }
  66%  { text-shadow: 1px 0 var(--acc), -1px 0 #ff2d78; }
  100% { text-shadow: none; transform: none; }
}

/* ---------- 3. Page loader ("matchmaking") ---------- */
.fx-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: linear-gradient(90deg, var(--acc, #22d3ee), #e4c778);
  box-shadow: 0 0 12px var(--acc, #22d3ee); transition: width .35s ease, opacity .3s; pointer-events: none; }
.fx-mm { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2000;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 30px; background: #0f151f; border: 1px solid #2a3547;
  font: 700 .74rem "JetBrains Mono", monospace; letter-spacing: .14em; color: #cfe7ff; box-shadow: 0 18px 40px -18px #000; }
.fx-mm i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--acc, #22d3ee); animation: btn-spin .7s linear infinite; }

/* ---------- 4. Celebration overlay (deal done, escrow locked, badge unlocked) ---------- */
.fx-cele { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 10, .82); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.fx-cele.on { opacity: 1; }
.fx-cele canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-cele-card { --c: #e4c778; position: relative; width: min(440px, 100%); text-align: center; padding: 34px 24px 24px; border-radius: 22px; background: #10141c;
  border: 2px solid var(--c); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 14%, transparent), 0 0 70px color-mix(in srgb, var(--c) 35%, transparent);
  transform: scale(.7) rotateX(40deg); transition: transform .5s cubic-bezier(.2, 1.4, .4, 1); font-family: "Manrope", system-ui, sans-serif; color: #eef1f6; }
.fx-cele.on .fx-cele-card { transform: none; }
.fx-cele-card.k-escrow { --c: #22d3ee; } .fx-cele-card.k-trade { --c: #34d399; } .fx-cele-card.k-badge { --c: #e4c778; } .fx-cele-card.k-achievement { --c: #a78bfa; }
.fx-cele-tag { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); padding: 6px 16px; border-radius: 30px; background: var(--c); color: #111;
  font: 900 .72rem "Orbitron", sans-serif; letter-spacing: .16em; white-space: nowrap; }
.fx-cele-ic { width: 92px; height: 92px; margin: 4px auto 14px; }
.fx-cele-ic svg { width: 100%; height: 100%; overflow: visible; }
.fx-cele-ic .draw { stroke-dasharray: 160; stroke-dashoffset: 160; animation: fx-draw .7s .35s ease forwards; }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
.fx-cele-ic .ring { transform-origin: 50% 50%; animation: fx-pulse 1.6s ease-out infinite; }
@keyframes fx-pulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.fx-cele h2 { font: 900 1.45rem/1.2 "Orbitron", sans-serif; margin: 0 0 6px; letter-spacing: .02em; }
.fx-cele .amt { font: 900 2.4rem "Orbitron", sans-serif; color: var(--c); text-shadow: 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); margin: 6px 0; }
.fx-cele p { color: #b8c2d1; margin: 0 0 18px; line-height: 1.5; }
.fx-cele-btn { min-height: 48px; padding: 0 26px; border: 0; border-radius: 12px; cursor: pointer; background: var(--c); color: #111; font: 900 .85rem "Orbitron", sans-serif; letter-spacing: .08em;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 55%, #000); }
.fx-cele-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 55%, #000); }
.fx-cele-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- 5. Loot cards: rarity by grade, 3D tilt, shine ---------- */
.lcard, .rail .card { position: relative; transform-style: preserve-3d; transition: transform .2s ease, border-color .2s, box-shadow .2s; will-change: transform; }
.lcard::after, .rail .card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .16) 45%, transparent 60%); background-size: 260% 100%; background-position: 130% 0; transition: background-position .7s ease; }
.lcard:hover::after, .rail .card:hover::after, .lcard:focus-visible::after { background-position: -40% 0; }
.lcard.r-legendary, .rail .card.r-legendary { border-color: rgba(228, 199, 120, .7); box-shadow: 0 0 0 1px rgba(228, 199, 120, .25), 0 10px 30px -14px rgba(228, 199, 120, .55); }
.lcard.r-epic, .rail .card.r-epic { border-color: rgba(167, 139, 250, .65); box-shadow: 0 0 0 1px rgba(167, 139, 250, .2), 0 10px 30px -14px rgba(167, 139, 250, .5); }
.lcard.r-rare, .rail .card.r-rare { border-color: rgba(96, 165, 250, .6); box-shadow: 0 10px 30px -16px rgba(96, 165, 250, .45); }
.rarity { position: absolute; left: 10px; bottom: 10px; z-index: 2; padding: 3px 9px; border-radius: 6px; font: 800 .6rem "JetBrains Mono", monospace; letter-spacing: .12em; color: #111; }
.rarity.r-legendary { background: linear-gradient(90deg, #f0da96, #c8a04b); }
.rarity.r-epic { background: linear-gradient(90deg, #c4b5fd, #8b5cf6); color: #fff; }
.rarity.r-rare { background: linear-gradient(90deg, #93c5fd, #3b82f6); color: #fff; }

/* ---------- 6. Rank emblems and the XP bar ---------- */
.rank { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.rank svg { width: 28px; height: 32px; flex: 0 0 auto; filter: drop-shadow(0 0 6px var(--rk, #c8a04b)); }
.rank b { font: 800 .8rem var(--ffd, "Orbitron", sans-serif); letter-spacing: .06em; color: var(--rk, #c8a04b); text-transform: uppercase; }
.rank.lg svg { width: 56px; height: 64px; }
.rank.lg b { font-size: 1.05rem; }
.xp { margin-top: 10px; }
.xp-top { display: flex; justify-content: space-between; font: 700 .74rem "JetBrains Mono", monospace; color: var(--ink2, #a3adbd); margin-bottom: 6px; }
.xp-bar { height: 12px; border-radius: 12px; background: var(--bg, #0b0f15); border: 1px solid var(--line, #263041); overflow: hidden; position: relative; }
.xp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--acc2, #3b82f6), var(--acc, #22d3ee)); border-radius: 12px; position: relative; }
.xp-bar span::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .12) 0 6px, transparent 6px 12px); animation: xp-move 1.2s linear infinite; }
@keyframes xp-move { to { background-position: 17px 0; } }

/* ---------- 7. Achievements ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line, #263041); border-radius: 12px; background: var(--bg, #0b0f15); }
.ach .ic { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; background: var(--acc-soft, rgba(34, 211, 238, .08)); color: var(--acc); border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); }
.ach b { display: block; font-size: .82rem; } .ach small { display: block; font-size: .7rem; color: var(--ink3, #8591a3); line-height: 1.3; }
.ach.locked { opacity: .5; } .ach.locked .ic { filter: grayscale(1); background: transparent; }

/* ---------- 8. Kill feed (recent completed trades) ---------- */
.killfeed { display: grid; gap: 6px; }
.kf-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; background: rgba(8, 12, 18, .78); border-left: 3px solid #e4c778;
  font: 600 .8rem "Manrope", sans-serif; color: #dfe6ef; animation: kf-in .5s cubic-bezier(.2, 1.2, .4, 1) both; overflow: hidden; white-space: nowrap; }
.kf-row b { color: #e4c778; } .kf-row .kf-ic { color: #22d3ee; font-weight: 900; } .kf-row .kf-amt { margin-left: auto; font-family: "JetBrains Mono", monospace; color: #34d399; }
.kf-row .kf-item { overflow: hidden; text-overflow: ellipsis; }
@keyframes kf-in { from { opacity: 0; transform: translateX(24px); } }

/* ---------- 9. Staff and seller consoles: sidebar layout from the prototypes ---------- */
.console { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 0; min-height: calc(100vh - 64px); }
.console-side { border-right: 1px solid var(--line); background: linear-gradient(180deg, var(--bg2), var(--bg)); padding: 18px 12px; position: sticky; top: 0; height: calc(100vh - 64px); overflow-y: auto; }
.console-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); font: 900 .95rem var(--ffd); letter-spacing: .06em; color: var(--acc); }
.console-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: blip 2s infinite; }
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
body.theme-gold .console-brand .dot { border-radius: 3px; transform: rotate(45deg); animation: none; }
body.theme-mod .console-brand span { background: linear-gradient(90deg, var(--acc), var(--acc3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.console-sec { font: 700 .62rem var(--ffm); letter-spacing: .14em; color: var(--ink3); padding: 14px 10px 6px; text-transform: uppercase; }
.console-nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border-radius: 8px; margin-bottom: 2px; color: var(--ink2); font-size: .86rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.console-nav a:hover { background: var(--panel); color: var(--ink); }
.console-nav a[aria-current="page"] { background: color-mix(in srgb, var(--acc) 12%, transparent); color: var(--ink); border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
body.theme-mod .console-nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(255, 45, 120, .16), rgba(34, 211, 238, .08)); }
.console-nav .tab-badge { margin-left: auto; }
.console-main { min-width: 0; }
.console-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--bg2); font-size: .78rem; color: var(--ink2); }
.console-bar .live { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 30px; border: 1px solid var(--line); color: var(--acc3, var(--acc)); font-family: var(--ffm); }
.console-bar .live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.console-main > .app-wrap { max-width: none; }
@media (max-width: 980px) {
  .console { display: block; }
  .console-side { position: static; height: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .console-brand, .console-sec { display: none; }
  .console-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .console-nav a { flex: 0 0 auto; white-space: nowrap; }
}

/* ---------- 10. Phone app feel: bottom navigation ---------- */
.botnav { display: none; }
@media (max-width: 760px) {
  .botnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 700;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(10, 14, 21, .94); backdrop-filter: blur(12px); border-top: 1px solid #1f2837; }
  .botnav a { display: grid; justify-items: center; gap: 3px; min-height: 48px; padding: 6px 2px; border-radius: 10px; color: #8a97aa; text-decoration: none; font: 700 .64rem "Manrope", sans-serif; position: relative; }
  .botnav a svg { width: 22px; height: 22px; }
  .botnav a[aria-current="page"] { color: var(--acc, #22d3ee); background: color-mix(in srgb, var(--acc, #22d3ee) 10%, transparent); }
  .botnav .bn-count { position: absolute; top: 2px; right: 22%; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #f87171; color: #1a0505; font: 800 .6rem/17px "JetBrains Mono", monospace; text-align: center; }
  body.has-botnav { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  body.has-botnav .toast-stack { top: calc(70px + env(safe-area-inset-top, 0px)); }
}

/* ---------- 11. Custom cursor (desktop, can be switched off in Settings) ---------- */
@media (pointer: fine) {
  html.fx-cursor, html.fx-cursor body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='6' fill='none' stroke='%2322d3ee' stroke-width='2'/%3E%3Cpath d='M14 1v7M14 20v7M1 14h7M20 14h7' stroke='%2322d3ee' stroke-width='2'/%3E%3Ccircle cx='14' cy='14' r='1.6' fill='%23e4c778'/%3E%3C/svg%3E") 14 14, crosshair; }
  html.fx-cursor a, html.fx-cursor button, html.fx-cursor label, html.fx-cursor select, html.fx-cursor [role="button"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='8' fill='rgba(228,199,120,.15)' stroke='%23e4c778' stroke-width='2'/%3E%3Cpath d='M14 1v6M14 21v6M1 14h6M21 14h6' stroke='%23e4c778' stroke-width='2'/%3E%3Ccircle cx='14' cy='14' r='2' fill='%23e4c778'/%3E%3C/svg%3E") 14 14, pointer; }
  html.fx-cursor input, html.fx-cursor textarea { cursor: text; }
}

/* ---------- Motion off: people who ask their device to reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html.fx-armed .fx-hide { opacity: 1; transform: none; }
  html.fx-armed .fx-in, .fx-glitch, .kf-row, .xp-bar span::after, .fx-cele-ic .ring, .console-brand .dot { animation: none !important; }
  .fx-cele-card, .lcard, .rail .card { transition: none; transform: none !important; }
  .fx-cele-ic .draw { stroke-dashoffset: 0; animation: none; }
}

/* ---------- 12. Progress panel (rank + XP + achievements) ---------- */
.xp-next { margin-top: 6px; font-size: .74rem; color: var(--ink3, #8591a3); }
.rank.tier svg { width: 22px; height: 26px; }
.rank.tier b { font-size: .7rem; }
.progress-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.progress-card .ladder { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.progress-card .ladder span { font: 700 .62rem "JetBrains Mono", monospace; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line, #263041); color: var(--ink3, #8591a3); }
.progress-card .ladder span.on { color: var(--rk); border-color: var(--rk); }
@media (max-width: 480px) { .progress-card { grid-template-columns: 1fr; justify-items: start; } }
.ach .ic svg { display: block; }
.progress-panel .ach-wrap { margin-top: 16px; border-top: 1px solid var(--line, #263041); padding-top: 12px; }
.progress-panel .ach-wrap summary { cursor: pointer; font-weight: 700; font-size: .86rem; margin-bottom: 10px; min-height: 32px; display: flex; align-items: center; }
.profile-badges { gap: 12px; align-items: center; }
.progress-panel .ach-wrap summary { list-style: none; justify-content: space-between; }
.progress-panel .ach-wrap summary::-webkit-details-marker { display: none; }
.progress-panel .ach-wrap summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.progress-panel .ach-wrap[open] summary::after { transform: rotate(-135deg); }

/* ---------- 13. Homepage: cinematic hero, games carousel, kill feed ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-bolt { position: absolute; z-index: -1; left: 44%; top: 50%; width: clamp(300px, 36vw, 540px); height: auto; transform: translateY(-50%) rotate(8deg);
  fill: rgba(228, 199, 120, .05); stroke: rgba(228, 199, 120, .55); stroke-width: .7; filter: drop-shadow(0 0 18px rgba(228, 199, 120, .45)) drop-shadow(0 0 60px rgba(34, 211, 238, .18)); animation: bolt-pulse 4.5s ease-in-out infinite; }
@keyframes bolt-pulse { 50% { stroke: rgba(228, 199, 120, .85); filter: drop-shadow(0 0 26px rgba(228, 199, 120, .7)) drop-shadow(0 0 80px rgba(34, 211, 238, .3)); } }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 90px; z-index: -1; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero .slab { backdrop-filter: blur(6px); }
@media (max-width: 900px) { .hero-bolt { left: auto; right: -110px; top: 26%; opacity: .5; } }

.games-rail-wrap { position: relative; }
.games-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 23%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 6px 2px 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.games-rail:focus-visible { outline: 2px solid var(--cyan, #22d3ee); outline-offset: 4px; border-radius: 12px; }
.game-tile { scroll-snap-align: start; position: relative; display: flex; flex-direction: column; min-height: 210px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none;
  transition: transform .2s ease, border-color .2s, box-shadow .2s; }
.game-tile:hover, .game-tile:focus-visible { transform: translateY(-4px); border-color: var(--ga); box-shadow: 0 16px 36px -18px var(--ga); }
.gt-art { position: relative; flex: 1; min-height: 130px; background: #0a1220; overflow: hidden; }
.gt-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.game-tile:hover .gt-art img { transform: scale(1.06); }
.gt-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8, 12, 18, .9)), linear-gradient(90deg, color-mix(in srgb, var(--ga) 30%, transparent), transparent 60%); }
.gt-body { position: relative; padding: 12px 14px 14px; display: grid; gap: 4px; border-top: 2px solid var(--ga); }
.gt-body b { font-family: var(--ffd); font-size: .98rem; letter-spacing: .02em; }
.gt-live { display: inline-flex; align-items: center; gap: 7px; font: 700 .72rem var(--ffm); color: var(--ink2); }
.gt-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ga); box-shadow: 0 0 8px var(--ga); }
.game-tile.gt-plain { justify-content: flex-end; background: radial-gradient(120% 90% at 80% 10%, color-mix(in srgb, var(--ga) 22%, transparent), transparent 60%), var(--panel); }
.gr-btn { position: absolute; top: calc(50% - 26px); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(8, 12, 18, .85); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.gr-btn:hover { border-color: var(--cyan, #22d3ee); } .gr-btn.prev { left: -14px; } .gr-btn.next { right: -14px; }
.gr-btn[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .games-rail { grid-auto-columns: 70%; } .gr-btn { display: none; } }

.kf-panel { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, var(--panel), var(--bg2)); padding: 18px; }
.kf-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kf-head h2 { font-size: 1.15rem; margin: 0; } .kf-head .small { color: var(--ink3); font-size: .78rem; }
.kf-live { display: inline-flex; align-items: center; gap: 6px; font: 800 .66rem var(--ffm); letter-spacing: .12em; color: #f87171; border: 1px solid rgba(248, 113, 113, .4); padding: 3px 8px; border-radius: 6px; }
.kf-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blip 1.4s infinite; }
.killfeed { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kf-row { border-left-color: var(--ga, #e4c778); }
.kf-row .kf-ic { color: var(--ga, #22d3ee); flex: 0 0 auto; }
.kf-row .kf-verb { color: #8591a3; }
.kf-row .kf-item { min-width: 0; }
.kf-row .kf-ago { font: 600 .68rem "JetBrains Mono", monospace; color: #8591a3; flex: 0 0 auto; }
@media (max-width: 760px) { .killfeed { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .hero-bolt, .kf-live i { animation: none; } .game-tile, .gt-art img { transition: none; } }

/* ---------- 14. Game pages: each game in its own colour ---------- */
.game-hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.gh-bg { position: absolute; inset: 0; z-index: -1; }
.gh-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(1.3); opacity: .35; transform: scale(1.2); }
.gh-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 120% at 85% 0%, color-mix(in srgb, var(--ga) 30%, transparent), transparent 60%), linear-gradient(180deg, rgba(8, 12, 18, .4), var(--bg)); }
.gh-in { padding-block: 22px 26px; }
.gh-row { display: flex; gap: 24px; align-items: center; margin-top: 12px; }
.gh-icon { width: 112px; height: 112px; border-radius: 26px; object-fit: cover; flex: 0 0 auto; border: 2px solid var(--ga); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ga) 15%, transparent), 0 20px 50px -20px var(--ga); }
.gh-tag { display: inline-flex; align-items: center; gap: 8px; font: 700 .74rem var(--ffm); letter-spacing: .06em; color: var(--ga); }
.gh-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--ga); box-shadow: 0 0 10px var(--ga); animation: blip 2s infinite; }
.game-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; margin: 8px 0; text-wrap: balance; }
.gh-lead { color: var(--ink2); max-width: 56ch; margin: 0 0 16px; }
.gh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.gh-stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8, 12, 18, .6); color: var(--ink); text-decoration: none; }
a.gh-stat:hover { border-color: var(--ga); }
.gh-stat b { font: 800 1.2rem var(--ffd); font-variant-numeric: tabular-nums; } .gh-stat span { font-size: .76rem; color: var(--ink3); }
.game-page .btn.primary { background: var(--ga); border-color: var(--ga); color: #0b0f15; }
.game-sec { margin: 26px 0; }
.game-cols { margin-bottom: 30px; }
.game-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.game-list li { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.game-list li a { flex: 1; min-width: 0; display: grid; gap: 2px; color: var(--ink); text-decoration: none; }
.game-list li a:hover b { color: var(--ga); }
.game-list li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .game-list li span { font-size: .76rem; color: var(--ink3); }
.game-list.ranked { counter-reset: r; } .game-list.ranked li::before { counter-increment: r; content: counter(r); font: 800 .9rem var(--ffd); color: var(--ga); width: 18px; }
.game-empty { text-align: center; }
@media (max-width: 760px) { .gh-row { flex-direction: column; align-items: flex-start; gap: 14px; } .gh-icon { width: 80px; height: 80px; border-radius: 20px; } .gh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 15. 404 "You got sniped" and fun empty states ---------- */
.sniped { padding-block: clamp(30px, 8vw, 80px); }
.sniped-card { text-align: center; padding: clamp(24px, 5vw, 44px); }
.sniped-scope { width: 110px; height: 110px; color: var(--acc); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--acc) 50%, transparent)); animation: scope-sweep 3.2s ease-in-out infinite; }
@keyframes scope-sweep { 0%, 100% { transform: translate(-6px, 2px); } 50% { transform: translate(6px, -3px); } }
.sniped-code { font: 800 .74rem var(--ffm, monospace); letter-spacing: .16em; color: #f87171; margin: 18px 0 8px; }
.sniped h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 10px; }
.sniped p { max-width: 46ch; margin-inline: auto; }
.empty-ic { display: block; width: 52px; height: 52px; margin: 0 auto 12px; color: var(--acc); opacity: .85; }
@media (prefers-reduced-motion: reduce) { .sniped-scope { animation: none; } }
.fun-empty { text-align: center; padding: 26px 16px; }
.fun-empty b { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.fun-empty p { color: var(--ink2); margin: 0 auto 14px; max-width: 44ch; font-size: .9rem; }
.fun-empty .btn-row { justify-content: center; }
.fun-empty .empty-ic svg { width: 52px; height: 52px; stroke-width: 1.4; }
.fx-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line, #263041); cursor: pointer; min-height: 44px; }
.fx-toggle input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--acc); }
.fx-toggle b { display: block; font-size: .9rem; } .fx-toggle small { display: block; color: var(--ink3, #8591a3); font-size: .78rem; }

/* ---------- 16. Report a bug: floating cyber-bug button + dialog ---------- */
.bug-fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 54px; height: 54px; display: grid; place-items: center; cursor: pointer;
  color: #ffb547; background: radial-gradient(circle at 35% 30%, #22150b, #120a06 70%); border: 0; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 90, 95, .65), 0 0 22px rgba(255, 90, 95, .35), 0 10px 24px -10px #000; transition: transform .18s ease, box-shadow .18s; }
.bug-fab svg { width: 32px; height: 32px; }
.bug-fab:hover, .bug-fab:focus-visible { transform: translateY(-2px) scale(1.06); box-shadow: 0 0 0 2px #ff5a5f, 0 0 30px rgba(255, 90, 95, .55), 0 10px 24px -10px #000; }
.bug-fab:focus-visible { outline: 2px solid #ffb547; outline-offset: 4px; }
body.has-botnav .bug-fab { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 761px) { body.has-botnav .bug-fab { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); } }
.bug-dlg { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); border: 1px solid var(--line, #263041); border-radius: 16px; padding: 0; background: var(--panel, #111822); color: var(--ink, #eef1f6); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.bug-dlg::backdrop { background: rgba(4, 7, 12, .72); backdrop-filter: blur(3px); }
.bug-form { padding: 22px; display: grid; gap: 4px; }
.bug-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.bug-head h2 { margin: 0; font-size: 1.15rem; } .bug-head p { margin: 2px 0 0; color: var(--ink2, #a3adbd); font-size: .88rem; }
.bug-ic { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; color: #ffb547; border-radius: 50%; background: #140c08; box-shadow: 0 0 0 2px rgba(255, 90, 95, .6); }
.bug-ic svg { width: 28px; height: 28px; }
.bug-form textarea { min-height: 110px; }
.bug-note { margin: 0 0 6px; }
.bug-status { margin: 0; font-size: .88rem; min-height: 1.2em; } .bug-status.ok { color: var(--ok, #34d399); } .bug-status.err { color: var(--bad, #f87171); }
@media (prefers-reduced-motion: reduce) { .bug-fab { transition: none; } }
@media print { .bug-fab { display: none; } }

/* ---------- 17. View-as banner, payout wait, admin override, limit checkboxes ---------- */
.view-as-bar { position: sticky; top: 0; z-index: 70; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 8px 16px; background: #ff5fa2; color: #1a0612; font-size: .9rem; }
.view-as-bar .btn { background: #1a0612; color: #fff; border-color: #1a0612; }
.payout-wait { border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.admin-override summary { cursor: pointer; }
.check-row { display: flex; gap: 10px; align-items: center; min-height: 36px; font-size: .9rem; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--acc); }
.reply-bubble.from-customer { border-left: 3px solid var(--acc); padding-left: 10px; }
.support-grid .chat-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.support-grid .chat-form textarea { flex: 1; min-height: 64px; }

/* ---------- 18. AI support assistant: labelled bubbles, "who's answering" bar, typing dots ---------- */
.ai-chip { display: inline-grid; place-items: center; min-width: 22px; height: 16px; padding: 0 5px; border-radius: 5px; font-family: var(--ffm); font-size: .6rem; font-weight: 700; letter-spacing: .06em; line-height: 1;
  color: var(--acc-ink); background: linear-gradient(120deg, var(--acc), var(--acc2)); vertical-align: 1px; flex: 0 0 auto; }
.ai-chip.person { color: #1a1204; background: var(--warn, #fbbf24); }
.msg.ai { background: linear-gradient(160deg, color-mix(in srgb, var(--acc2) 12%, var(--panel2)), var(--panel2)); border-color: color-mix(in srgb, var(--acc2) 45%, var(--line)); }
.msg.ai .who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msg.typing { padding-block: 12px; }
.msg.typing .dots { display: inline-flex; gap: 5px; padding: 4px 2px 0; }
.msg.typing .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); opacity: .35; animation: ai-dot 1.2s infinite ease-in-out; }
.msg.typing .dots i:nth-child(2) { animation-delay: .15s; }
.msg.typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .msg.typing .dots i { animation: none; opacity: .7; } }
.ai-bar { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--acc2) 40%, var(--line)); background: color-mix(in srgb, var(--acc2) 7%, transparent); }
.ai-bar p { flex: 1 1 220px; margin: 0; font-size: .84rem; color: var(--ink2); line-height: 1.45; }
.ai-bar p b { color: var(--ink); }
.ai-bar form { margin: 0; }
.ai-bar.person { border-color: color-mix(in srgb, var(--warn, #fbbf24) 45%, var(--line)); background: color-mix(in srgb, var(--warn, #fbbf24) 6%, transparent); }
.ai-bar.intro { margin: 0 0 14px; }
.ai-bar.staff-side .btn { margin-left: auto; }
.reply-bubble.from-ai { border-left-color: var(--acc2); background: color-mix(in srgb, var(--acc2) 6%, var(--bg)); }
.reply-bubble.from-ai .ai-chip { margin-right: 2px; }
.chat-safety { margin: 8px 0 0; }
@media (max-width: 560px) {
  .support-grid .chat-form { flex-direction: column; align-items: stretch; }
  .support-grid .chat-form .btn { width: 100%; }
  .ai-bar form, .ai-bar form .btn { width: 100%; }
  .msg { max-width: 92%; }
}
