@import url('https://fonts.googleapis.com/css2?family=Builder+Sans:wght@400;600;700;800&family=Nunito+Sans:wght@400;600;700;800;900&display=swap');
:root { --bg: #0a0e17; --bg2: #101725; --card: #16202f; --card2: #1e2a3d; --line: #28344a; --text: #f0f6ff; --muted: #8b98ad; --blue: #22d3ee; --blue2: #0ea5e9; --pink: #fb923c; --green: #2ed573; --red: #ff4757; --gold: #ffd400; --grad: linear-gradient(135deg, #22d3ee, #0ea5e9); --shadow: 0 4px 24px rgba(0,0,0,.5); --glow: 0 0 18px rgba(34,211,238,.35); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: radial-gradient(1200px 600px at 80% -10%, #0e3a4a 0%, transparent 60%), radial-gradient(900px 500px at 10% 110%, #4a2c0e 0%, transparent 55%), var(--bg); color: var(--text); font-family: 'Builder Sans', 'Nunito Sans', 'Segoe UI', Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1 { font-size: 32px; font-weight: 900; margin: 8px 0 20px; letter-spacing: -.5px; } h1:first-child { background: linear-gradient(90deg, #fff, #a5f3fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: 20px; font-weight: 700; margin: 0; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.hidden { display: none !important; }
.btn-primary, .btn-secondary, .btn-danger, .btn-buy, .btn-owned, .btn-join { border: 0; border-radius: 12px; padding: 10px 20px; font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; justify-content: center; transition: transform .12s; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); transition: transform .12s, box-shadow .12s; } .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(34,211,238,.5); }
.btn-primary.big { width: 100%; padding: 13px; font-size: 18px; }
.btn-secondary { background: var(--card2); color: #fff; border: 1px solid var(--line); } .btn-secondary:hover { background: #2a3a52; transform: translateY(-1px); }
.btn-danger { background: transparent; color: #ff6b63; border: 1px solid #5a2a28; }
.btn-buy, .btn-join { background: var(--green); color: #fff; } .btn-owned { background: #3d3f42; color: var(--muted); }
.link { background: none; border: 0; color: #6ea8ff; font-weight: 700; }
.tag { background: #444; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.4); vertical-align: middle; margin-right: 6px; }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; letter-spacing: -0.5px; }
.logo-icon { width: 34px; height: 28px; display: inline-flex; flex: none; } .logo-icon svg, .ff-mini svg { width: 100%; height: 100%; }
.logo.big { font-size: 54px; } .logo.big .logo-icon { width: 72px; height: 58px; }
.ff-mini { display: inline-flex; width: 30px; height: 24px; }

/* ---------- topbar & sidebar ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: rgba(16,23,37,.92); backdrop-filter: blur(12px); display: flex; align-items: center; gap: 22px; padding: 0 18px; z-index: 50; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.tb-burger { display: none; background: none; border: 0; color: #fff; font-size: 22px; }
.tb-nav { display: flex; gap: 22px; font-weight: 700; font-size: 16px; } .tb-nav a:hover { color: #fff; opacity: .8; }
.tb-search { flex: 1; max-width: 520px; } .tb-search input { width: 100%; background: var(--card); border: 1px solid var(--line); color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 15px; transition: border .12s, box-shadow .12s; } .tb-search input:focus { outline: none; border-color: var(--blue); box-shadow: var(--glow); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 16px; font-weight: 700; }
.tb-user { display: flex; align-items: center; gap: 8px; } .tb-user img { width: 32px; height: 32px; border-radius: 50%; background: #3d3f42; }
.tb-bux { display: flex; align-items: center; gap: 6px; color: var(--text); } .bux { color: var(--gold); }
.tb-logout { background: none; border: 1px solid #45474a; color: var(--muted); border-radius: 6px; padding: 5px 10px; font-weight: 700; }
.sidebar { position: fixed; top: 60px; left: 0; bottom: 0; width: 208px; background: var(--bg2); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; z-index: 40; border-right: 1px solid var(--line); }
.sidebar a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--muted); transition: all .12s; }
.sidebar a:hover { background: var(--card); color: #fff; transform: translateX(2px); } .sidebar a.active { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.sb-ico svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 7px; }
.content { margin: 56px 0 0 200px; padding: 24px 36px 60px; max-width: 1500px; }
section { margin-bottom: 34px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 14px; } .sec-h h2 { font-size: 22px; font-weight: 900; letter-spacing: -.3px; } .sec-h a { color: var(--muted); font-weight: 700; }

/* ---------- cards ---------- */
.game-row { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.game-card { display: block; background: var(--card); border-radius: 16px; padding: 10px; border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; } .game-card:hover { transform: translateY(-4px); box-shadow: var(--glow); } .game-card:hover .gc-thumb img { transform: scale(1.06); }
.gc-thumb { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--card2); }
.gc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; display: block; }
.gc-name { font-weight: 700; margin-top: 8px; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-stats { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-top: 3px; font-weight: 600; } .gc-stats span { display: flex; align-items: center; gap: 4px; }
.friends-row { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 6px; } .friends-row.wrap { flex-wrap: wrap; }
.user-tile { width: 100px; text-align: center; flex-shrink: 0; }
.ut-img { width: 92px; height: 92px; border-radius: 50%; background: var(--grad); padding: 3px; margin: 0 auto; position: relative; overflow: visible; }
.ut-img img { width: 100%; height: 100%; border-radius: 50%; }
.ut-img.online::after, .ut-img.ingame::after, .ph-img.online::after, .ph-img.ingame::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--bg); background: #00b2ff; }
.ut-img.ingame::after, .ph-img.ingame::after { background: var(--green); }
.ut-name { margin-top: 6px; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ut-game { font-size: 11px; color: var(--green); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-friends { width: 92px; text-align: center; font-weight: 700; font-size: 13px; } .add-friends span { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: #393b3d; font-size: 40px; margin-bottom: 6px; }
.home-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; } .home-head h1 { margin: 0; }
.home-avatar { width: 110px; height: 110px; border-radius: 50%; background: var(--grad); padding: 4px; box-shadow: var(--glow); }

/* ---------- landing ---------- */
.landing { min-height: 100vh; position: relative; overflow: hidden; }
.landing-bg { position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, #3b5bff55, transparent 50%), radial-gradient(circle at 80% 70%, #00b06f44, transparent 50%), linear-gradient(135deg, #12141a, #232527);
  background-size: cover; }
.landing-bg::before { content: ''; position: absolute; inset: -50%; background-image: linear-gradient(rgba(255,255,255,.04) 2px, transparent 2px), linear-gradient(90deg, rgba(255,255,255,.04) 2px, transparent 2px); background-size: 60px 60px; transform: perspective(600px) rotateX(55deg); animation: grid 8s linear infinite; }
@keyframes grid { to { background-position: 0 60px; } }
.landing-inner { position: relative; max-width: 1100px; margin: 0 auto; padding: 12vh 24px; display: flex; gap: 60px; align-items: center; flex-wrap: wrap; }
.landing-hero { flex: 1; min-width: 300px; } .landing-hero h1 { font-size: 44px; line-height: 1.1; margin-top: 30px; } .landing-hero p { font-size: 18px; color: var(--muted); line-height: 1.5; }
.auth-card { width: 380px; background: #1b1d1fdd; border: 1px solid var(--line); border-radius: 14px; padding: 24px; backdrop-filter: blur(6px); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; } .auth-tabs button { flex: 1; background: transparent; border: 0; color: var(--muted); font-weight: 800; font-size: 18px; padding: 8px; border-bottom: 3px solid transparent; }
.auth-tabs button.active { color: #fff; border-color: #fff; }
.auth-form label, .modal label { display: block; font-weight: 700; margin-bottom: 14px; font-size: 14px; }
.auth-form input, .modal input, .modal textarea, .bio-edit textarea, .user-search input { display: block; width: 100%; margin-top: 6px; background: #2a2c2f; border: 1px solid #45474a; color: #fff; padding: 11px 12px; border-radius: 8px; font-size: 15px; font-family: inherit; }
.auth-err { color: #ff6b63; min-height: 20px; font-size: 14px; margin-bottom: 8px; } .auth-fine { text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- game page ---------- */
.gp-top { display: flex; gap: 28px; flex-wrap: wrap; }
.gp-thumb { flex: 1 1 560px; max-width: 760px; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #393b3d; } .gp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gp-info { flex: 1 1 320px; display: flex; flex-direction: column; } .gp-info h1 { margin: 0 0 6px; font-size: 34px; }
.gp-by a { color: #6ea8ff; font-weight: 700; }
.play-btn { margin-top: auto; background: var(--green); border: 0; border-radius: 10px; height: 64px; display: grid; place-items: center; transition: filter .15s; margin-top: 30px; } .play-btn:hover { filter: brightness(1.12); }
.gp-actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.gp-actions button { background: none; border: 0; color: var(--muted); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.gp-fav.on, .vote-up.on, .vote-down.on { color: #fff; } .gp-fav.on { color: var(--gold); }
.gp-vote { display: flex; align-items: center; gap: 8px; } .vote-bar { width: 110px; height: 4px; background: #555; border-radius: 2px; overflow: hidden; } .vote-bar i { display: block; height: 100%; background: #fff; }
.gp-tabs { border-bottom: 2px solid var(--line); margin: 30px 0 16px; padding-bottom: 10px; font-size: 18px; }
.gp-desc { color: #ddd; line-height: 1.5; max-width: 900px; }
.gp-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.gp-stats div { display: flex; flex-direction: column; gap: 4px; } .gp-stats span { color: var(--muted); font-size: 13px; } .gp-stats b { font-size: 17px; }

/* ---------- avatar ---------- */
.av-wrap { display: flex; gap: 30px; flex-wrap: wrap; }
.av-preview { width: 380px; background: radial-gradient(circle at 50% 40%, #44474c, #2a2c2f); border-radius: 14px; padding: 10px; text-align: center; } .av-canvas { width: 100%; cursor: grab; display: block; }
.av-panel { flex: 1; min-width: 320px; }
.av-tabs, .cat-filters { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.av-tabs button, .cat-filters a { background: none; border: 0; color: var(--muted); font-weight: 700; font-size: 16px; padding: 10px 14px; border-bottom: 3px solid transparent; }
.av-tabs button.active, .cat-filters a.active { color: #fff; border-color: #fff; }
.part-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.part-pick button { background: #33363a; border: 2px solid transparent; color: #fff; border-radius: 8px; padding: 7px 12px; font-weight: 600; } .part-pick button.active { border-color: #fff; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: 10px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); position: relative; } .swatch:hover { transform: scale(1.1); }
.swatch.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; cursor: pointer; } .swatch.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.item-grid, .cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.item { background: #2c2e31; border: 2px solid transparent; border-radius: 10px; padding: 8px; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.item img { width: 100%; aspect-ratio: 1; background: #393b3d; border-radius: 8px; } .item.worn { border-color: var(--green); } .item.more .plus { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 48px; background: #393b3d; border-radius: 8px; }
.cat-item { background: #2c2e31; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.cat-img { aspect-ratio: 1; background: radial-gradient(circle, #4a4d52, #33363a); border-radius: 8px; overflow: hidden; } .cat-img img { width: 100%; height: 100%; }
.cat-name { font-weight: 700; } .cat-price { display: flex; align-items: center; gap: 4px; font-weight: 700; } .free { color: var(--green); }

/* ---------- friends / profile ---------- */
.user-search { display: flex; gap: 10px; max-width: 600px; margin-bottom: 16px; } .user-search input { margin: 0; }
.search-results { margin-bottom: 26px; }
.req-list { display: flex; flex-direction: column; gap: 10px; max-width: 600px; }
.req { display: flex; align-items: center; gap: 12px; background: #2c2e31; padding: 10px; border-radius: 10px; } .req img { width: 48px; height: 48px; border-radius: 50%; background: #393b3d; } .req a { flex: 1; font-weight: 700; }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, 140px); gap: 18px; }
.friend-card { background: #2c2e31; border-radius: 12px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; } .friend-card .user-tile { width: 120px; }
.profile-head { display: flex; align-items: center; gap: 26px; background: #2c2e31; border-radius: 14px; padding: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.ph-img { width: 150px; height: 150px; border-radius: 50%; background: #393b3d; position: relative; } .ph-img img { width: 100%; height: 100%; border-radius: 50%; }
.ph-info h1 { margin: 0; } .ph-stats { display: flex; gap: 22px; margin-top: 12px; color: var(--muted); } .ph-stats b { color: #fff; } .ph-stats a { color: #6ea8ff; }
.ph-actions { margin-left: auto; display: flex; gap: 10px; }
.bio { color: #ddd; white-space: pre-wrap; } .bio-edit { display: flex; flex-direction: column; gap: 8px; max-width: 600px; align-items: flex-start; }
.profile-grid { display: grid; grid-template-columns: 340px 1fr; gap: 30px; } .profile-avatar img { width: 100%; background: radial-gradient(circle at 50% 40%, #44474c, #2a2c2f); border-radius: 14px; margin-top: 12px; }
.profile-grid h2 { margin-bottom: 12px; }

/* ---------- create ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.tpl { display: flex; flex-direction: column; gap: 6px; } .tpl .gc-thumb { aspect-ratio: 16/10; } .tpl:hover b { text-decoration: underline; }
.my-games { display: flex; flex-direction: column; gap: 10px; }
.my-game { display: flex; align-items: center; gap: 14px; background: #2c2e31; border-radius: 10px; padding: 10px; } .my-game img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: #393b3d; }
.mg-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bux-hero { display: flex; align-items: center; gap: 18px; background: #2c2e31; border-radius: 14px; padding: 24px; margin-bottom: 20px; } .bux-hero .bux { width: 70px; height: 70px; } .bux-big { font-size: 42px; font-weight: 900; }
.bux-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; } .bux-way { background: #2c2e31; border-radius: 12px; padding: 18px; } .bux-way a { color: #6ea8ff; }
.error-page { text-align: center; padding: 80px 0; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 1000; }
.modal { background: rgba(34,34,66,.97); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 20px; padding: 28px; width: min(460px, 92vw); color: var(--text); box-shadow: var(--shadow), var(--glow); animation: modal-in .18s ease; } .modal h2 { margin-bottom: 14px; } @keyframes modal-in { from { transform: scale(.94) translateY(8px); opacity: 0; } }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--card2); color: #fff; border: 1px solid var(--line); padding: 12px 22px; border-radius: 24px; font-weight: 700; box-shadow: var(--shadow), var(--glow); transition: opacity .4s; } .toast.err { background: #4a1520; border-color: var(--red); } .toast.out { opacity: 0; }

/* ---------- game runtime ---------- */
.fullscreen { position: fixed; inset: 0; }
.play-container, .studio-container, .st-play { position: absolute; inset: 0; }
.game-root { position: absolute; inset: 0; overflow: hidden; user-select: none; font-family: 'Builder Sans', 'Nunito Sans', Arial, sans-serif; }
.game-canvas { width: 100%; height: 100%; display: block; outline: none; }
.hud-topleft { position: absolute; top: 10px; left: 10px; display: flex; gap: 8px; z-index: 5; }
.hud-btn { width: 44px; height: 44px; border-radius: 10px; border: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; } .hud-btn:hover { background: rgba(0,0,0,.65); }
.chat-box { position: absolute; top: 62px; left: 10px; width: 380px; z-index: 5; }
.chat-log { max-height: 220px; overflow-y: auto; background: rgba(0,0,0,.3); border-radius: 8px 8px 0 0; padding: 6px 10px; font-size: 15px; font-weight: 600; text-shadow: 0 1px 2px #000; scrollbar-width: thin; }
.chat-line { padding: 2px 0; word-wrap: break-word; } .chat-sys { color: #ddd; font-style: italic; }
.chat-input { width: 100%; background: rgba(0,0,0,.5); border: 0; border-radius: 0 0 8px 8px; color: #fff; padding: 9px 10px; font-size: 14px; font-family: inherit; outline: none; } .chat-input:focus { background: rgba(0,0,0,.75); }
.hud-topright { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lb { background: rgba(0,0,0,.45); border-radius: 8px; min-width: 180px; overflow: hidden; } .lb-head { padding: 6px 12px; font-weight: 800; font-size: 14px; background: rgba(0,0,0,.3); }
.lb-row { padding: 4px 12px; font-weight: 600; font-size: 14px; } .lb-row.me { color: #fff; background: rgba(255,255,255,.1); }
.health { width: 180px; height: 8px; background: rgba(0,0,0,.5); border-radius: 4px; overflow: hidden; } .health-fill { height: 100%; background: #2ecc71; width: 100%; transition: width .2s; }
.hud-bottom { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; z-index: 5; }
.funbux-hud { background: rgba(0,0,0,.5); padding: 7px 14px; border-radius: 20px; display: flex; align-items: center; gap: 6px; font-weight: 800; }
.stop-btn { background: #e2231a; color: #fff; border: 0; border-radius: 8px; padding: 9px 22px; font-weight: 800; font-size: 15px; }
.veh-btn { background: #335fff; color: #fff; border: 0; border-radius: 8px; padding: 7px 14px; font-size: 18px; margin-left: 8px; cursor: pointer; }
.npc-bubble { position: absolute; transform: translate(-50%, -100%); background: #fff; color: #222; border-radius: 12px; padding: 6px 12px; font-size: 14px; font-weight: 700; max-width: 220px; text-align: center; pointer-events: none; z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.npc-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.big-msg { position: absolute; top: 28%; left: 50%; transform: translate(-50%, -50%) scale(.8); font-size: 46px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 #000, 0 0 20px rgba(0,0,0,.5); opacity: 0; transition: all .25s; pointer-events: none; z-index: 6; white-space: nowrap; }
.big-msg.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.esc-menu { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 20; }
.esc-panel { background: rgba(25,27,29,.96); border-radius: 14px; padding: 22px; width: min(640px, 94vw); }
.esc-tabs { font-size: 20px; margin-bottom: 14px; } .esc-players { display: flex; flex-wrap: wrap; gap: 10px; max-height: 200px; overflow-y: auto; margin-bottom: 18px; }
.esc-player { display: flex; align-items: center; gap: 8px; background: #2c2e31; border-radius: 8px; padding: 6px 12px 6px 6px; font-weight: 700; } .esc-player img { width: 36px; height: 36px; border-radius: 50%; background: #393b3d; }
.esc-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; } .esc-actions button { padding: 14px; flex-direction: column; } kbd { font-size: 11px; opacity: .7; font-family: inherit; }
.esc-opt { margin-right: 18px; font-weight: 600; } .esc-help { margin-top: 12px; color: var(--muted); font-size: 13px; }
.loading { position: absolute; inset: 0; background: #1b1d1f; display: grid; place-items: center; z-index: 30; transition: opacity .5s; } .loading.fade { opacity: 0; }
.loading-card { text-align: center; } .ff-logo-big { font-size: 46px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 12px; } .ff-logo-big svg { width: 62px; height: 50px; } .loading-name { font-size: 22px; margin-top: 8px; font-weight: 700; } .loading-sub { color: var(--muted); margin-top: 6px; } .loading-tip { color: var(--muted); font-size: 14px; margin-top: 16px; max-width: 320px; line-height: 1.4; }
.spinner { width: 40px; height: 40px; margin: 22px auto; border: 4px solid #444; border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 7; overflow: hidden; } .confetti i { position: absolute; top: -20px; width: 10px; height: 16px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- studio ---------- */
.studio { position: absolute; inset: 0; display: flex; flex-direction: column; background: #2e2e2e; color: #ddd; font-size: 13px; font-family: 'Segoe UI', Arial, sans-serif; }
.st-top { height: 34px; background: #1e1e1e; display: flex; align-items: center; padding: 0 10px; border-bottom: 1px solid #111; }
.st-title { display: flex; align-items: center; gap: 8px; font-weight: 700; } .st-gname { color: #9a9a9a; font-weight: 400; margin-left: 10px; }
.st-top-actions { margin-left: auto; display: flex; gap: 6px; }
.st-act { background: #3a3a3a; border: 1px solid #4a4a4a; color: #eee; border-radius: 4px; padding: 4px 14px; font-weight: 600; } .st-act:hover { background: #474747; } .st-act.pub { background: #0b72e7; border-color: #0b72e7; }
.st-ribbon { display: flex; background: #353535; border-bottom: 1px solid #1a1a1a; padding: 4px 4px 0; overflow-x: auto; }
.rb-group { display: flex; flex-direction: column; border-right: 1px solid #262626; padding: 0 6px; } .rb-row { display: flex; gap: 2px; } .rb-label { text-align: center; color: #888; font-size: 11px; padding: 2px 0 3px; }
.rb-btn { background: none; border: 1px solid transparent; color: #ddd; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 7px; border-radius: 3px; font-size: 12px; min-width: 50px; cursor: pointer; }
.rb-btn:hover { background: #444; } .rb-btn.active { background: #1f4d80; border-color: #2f7bd0; }
.rb-btn.play .rb-ico { color: #4caf50; } .rb-ico { font-size: 18px; height: 22px; display: grid; place-items: center; } .rb-ico .sw { width: 18px; height: 18px; margin: 0; }
.rb-btn input[type=color] { width: 30px; height: 22px; border: 0; padding: 0; background: none; cursor: pointer; } .rb-btn select { background: #2a2a2a; color: #ddd; border: 1px solid #555; height: 22px; font-size: 12px; } .rb-btn input[type=checkbox] { height: 20px; }
.st-main { flex: 1; display: flex; min-height: 0; }
.st-view { flex: 1; position: relative; min-width: 0; } .st-canvas { width: 100%; height: 100%; display: block; outline: none; }
.st-hint { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.5); padding: 4px 10px; border-radius: 4px; color: #ccc; font-size: 12px; pointer-events: none; }
.st-side { width: 290px; display: flex; flex-direction: column; background: #2e2e2e; border-left: 1px solid #1a1a1a; }
.st-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; border-bottom: 1px solid #1a1a1a; }
.st-panel-h { background: #3a3a3a; padding: 5px 8px; font-weight: 700; border-bottom: 1px solid #1a1a1a; }
.st-ex-h { display: flex; align-items: center; gap: 8px; }
.ex-search { flex: 1; min-width: 0; background: #262626; border: 1px solid #1a1a1a; color: #eee; border-radius: 4px; padding: 3px 7px; font-size: 12px; font-weight: 400; }
.st-explorer, .st-props { flex: 1; overflow-y: auto; }
.ex-root { padding: 4px 8px; font-weight: 600; } .ex-item { padding: 3px 8px 3px 26px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ex-item:hover { background: #3a3a3a; } .ex-item.sel { background: #1f4d80; }
.st-empty { padding: 14px; color: #888; }
.pr-sec { background: #353535; padding: 3px 8px; font-weight: 700; color: #aaa; font-size: 12px; }
.pr-row { display: grid; grid-template-columns: 95px 1fr; align-items: center; padding: 3px 8px; gap: 6px; border-bottom: 1px solid #333; }
.pr-row input, .pr-row select { background: #262626; color: #eee; border: 1px solid #444; padding: 3px 5px; font-size: 12px; width: 100%; min-width: 0; } .pr-row input[type=checkbox] { width: auto; justify-self: start; } .pr-row input[type=color] { height: 22px; padding: 0 2px; }
.pr-v3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; }
.st-play { z-index: 50; background: #000; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; } .nav-open .sidebar { transform: none; }
  .content { margin-left: 0; padding: 18px; } .tb-burger { display: block; } .tb-nav, .tb-search, .tb-user span, .tb-logout { display: none; }
  .gp-stats { grid-template-columns: repeat(3, 1fr); } .profile-grid { grid-template-columns: 1fr; } .chat-box { width: 70vw; }
}

/* ---------- FunTix ---------- */
.tix { color: var(--gold); }
.cat-price { flex-wrap: wrap; gap: 10px; } .pc { display: inline-flex; align-items: center; gap: 3px; }
.buy-row { display: flex; gap: 14px; align-items: center; } .buy-row img { width: 84px; height: 84px; background: #393b3d; border-radius: 10px; flex: none; } .buy-row p { margin: 4px 0; }
.buy-row .muted { display: flex; align-items: center; gap: 4px; }
.buy-with { display: inline-flex; align-items: center; gap: 6px; } .modal-actions button:disabled { opacity: .45; cursor: not-allowed; }
.money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; } .money-grid .bux-hero { margin-bottom: 0; } .bux-hero .tix { width: 70px; height: 70px; }
.bux-way h3 { display: flex; align-items: center; gap: 6px; }

/* ---------- touch controls ---------- */
.funbux-hud { pointer-events: none; }
.touch-ui { display: none; } .game-root.touch .touch-ui { display: block; }
.game-root.touch, .game-canvas { touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; }
.joy-zone { position: absolute; left: 0; bottom: 0; width: 45%; height: 55%; z-index: 4; touch-action: none; }
.joy { position: absolute; left: 100px; top: calc(100% - 100px); width: 124px; height: 124px; border-radius: 50%; background: rgba(0,0,0,.22); border: 3px solid rgba(255,255,255,.45); transform: translate(-50%, -50%); pointer-events: none; transition: background .15s; }
.joy.active { background: rgba(0,0,0,.35); }
.joy-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255,255,255,.8); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.jump-btn { position: absolute; right: 40px; bottom: 44px; width: 92px; height: 92px; border-radius: 50%; background: rgba(0,0,0,.28); border: 3px solid rgba(255,255,255,.6); color: #fff; z-index: 4; display: grid; place-items: center; touch-action: none; transition: transform .08s; }
.jump-btn.down { background: rgba(255,255,255,.35); transform: scale(.93); }
.game-root.touch .hud-bottom { bottom: auto; top: 12px; }
.game-root.touch .chat-box { width: min(320px, 50vw); } .game-root.touch .chat-log { max-height: 110px; font-size: 13px; }
@media (max-width: 700px) {
  .lb { min-width: 120px; } .lb-head, .lb-row { font-size: 12px; } .health { width: 120px; } .big-msg { font-size: 28px; }
  .game-root.touch .hud-bottom { flex-direction: column; gap: 4px; } .game-root.touch .funbux-hud { padding: 4px 10px; font-size: 13px; }
  .jump-btn { right: 24px; bottom: 30px; width: 80px; height: 80px; }
  .esc-actions { grid-template-columns: 1fr; }
}

/* ---------- leaderboard ---------- */
.lb-me { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 16px 20px; margin-bottom: 18px; font-size: 17px; } .lb-me .tix { width: 28px; height: 28px; }
.lb-rank { margin-left: auto; color: var(--muted); } .lb-rank b { color: var(--text); font-size: 20px; }
.lbp { display: flex; flex-direction: column; gap: 6px; }
.lbp-row { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 10px; padding: 8px 18px 8px 10px; font-weight: 700; border: 2px solid transparent; } .lbp-row:hover { background: #33363a; }
.lbp-row.me { border-color: #335fff; }
.lbp-rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #393b3d; font-weight: 900; flex: none; }
.lbp-row.top1 .lbp-rank { background: #ffd400; color: #1b1d1f; } .lbp-row.top2 .lbp-rank { background: #c0c4cc; color: #1b1d1f; } .lbp-row.top3 .lbp-rank { background: #cd7f32; color: #1b1d1f; }
.lbp-row img { width: 44px; height: 44px; border-radius: 50%; background: #393b3d; }
.lbp-name { display: flex; align-items: center; gap: 6px; } .lbp-name .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.lbp-tix { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 17px; }

/* ---------- FriendClub ---------- */
.club-badge { vertical-align: -3px; margin-right: 4px; flex: none; } h1 .club-badge { width: 30px; height: 30px; margin: 0 0 0 10px; vertical-align: -2px; }
.club-hero { display: flex; align-items: center; gap: 32px; background: linear-gradient(120deg, #3a2f00, #2c2e31 55%); border: 2px solid #ffd40055; border-radius: 16px; padding: 28px 32px; margin-bottom: 24px; }
.club-logo { position: relative; width: 150px; height: 120px; flex: none; } .club-logo .ff-logo { width: 100%; height: 100%; }
.club-logo .club-badge { position: absolute; top: -26px; left: 38px; width: 74px; height: 74px; transform: rotate(-8deg); filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
.club-info h1 { margin: 0; font-size: 40px; color: var(--gold); } .club-info p { margin: 4px 0 14px; }
.club-status { font-weight: 700; margin-bottom: 14px; } .club-status.on { color: var(--gold); }
.club-join { background: var(--gold); color: #1b1d1f; font-size: 17px; padding: 12px 22px; display: inline-flex; align-items: center; gap: 6px; } .club-join .tix { color: #fff; } .club-join:disabled { opacity: .5; }
.club-info a { color: #6ea8ff; }
.club-price { color: var(--gold); display: flex; align-items: center; }
.btn-club { display: block; text-align: center; background: #3a2f00; color: var(--gold); border: 1px solid #ffd40077; border-radius: 8px; padding: 9px; font-weight: 700; }
@media (max-width: 700px) { .club-hero { flex-direction: column; text-align: center; } }

/* ---------- admin ---------- */
.admin-badge { display: inline-block; background: var(--red); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .5px; padding: 2px 7px; border-radius: 5px; margin-left: 8px; vertical-align: middle; } h1 .admin-badge { font-size: 14px; padding: 3px 9px; }
.admin-search { display: flex; gap: 8px; margin: 14px 0 18px; max-width: 480px; } .admin-search input { flex: 1; background: #393b3d; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.admin-status { margin-left: auto; color: var(--muted); font-weight: 600; } .lbp-row .club-toggle { padding: 8px 14px; min-width: 170px; }

/* ---------- badges ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.badge-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; background: #2c2e31; border: 2px solid transparent; border-radius: 12px; padding: 16px 12px; color: var(--text); font: inherit; }
button.badge-card { cursor: pointer; } button.badge-card:hover { border-color: #ffffff33; }
.badge-card.on { border-color: #335fff; } .badge-card .club-badge { margin: 0; }
.badge-feat { font-size: 11px; font-weight: 800; color: #fff; background: #335fff; border-radius: 5px; padding: 2px 8px; }

/* ---------- groups ---------- */
.groups-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.groups-head h1 { margin-bottom:4px; }
.groups-search-row { display:flex; gap:10px; max-width:720px; margin-bottom:22px; }
.groups-search-row input { flex:1; margin:0; }
.group-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; }
.group-card { display:flex; gap:14px; background:#2c2e31; border:1px solid var(--line); border-radius:14px; padding:16px; min-height:170px; }
.group-icon { width:58px; height:58px; flex:none; display:grid; place-items:center; border-radius:14px; background:linear-gradient(135deg,#335fff,#6ea8ff); color:#fff; font-size:25px; font-weight:900; }
.group-card-body { min-width:0; flex:1; }
.group-card h3 { margin:0 0 5px; font-size:19px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.group-card p { margin:0 0 12px; color:var(--muted); min-height:38px; line-height:1.35; }
.group-meta { display:flex; flex-wrap:wrap; gap:10px; color:var(--muted); font-size:12px; margin-bottom:12px; }
.group-action { width:100%; }
.group-create-form { display:flex; flex-direction:column; gap:12px; }
.group-create-form textarea { resize:vertical; min-height:90px; }
@media (max-width:700px) {
  .groups-head { flex-direction:column; }
  .groups-head .btn-primary { width:100%; }
  .group-grid { grid-template-columns:1fr; }
}

/* ---------- account menu ---------- */
.tb-user-wrap { position: relative; }
.tb-user { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.tb-user:hover { background: #2a2c2f; }
.tb-user img { width: 32px; height: 32px; border-radius: 50%; background: #3d3f42; }
.tb-caret { font-size: 10px; color: #aaa; }
.tb-menu { position: absolute; top: 100%; right: 0; margin-top: 8px; min-width: 240px; background: #2c2e31; border: 1px solid #45474a; border-radius: 12px; padding: 8px; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.tb-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: #fff; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; text-decoration: none; }
.tb-menu-item:hover { background: #3d3f42; }
.tb-menu-sep { height: 1px; background: #45474a; margin: 8px 4px; }
.tb-menu-head { font-size: 12px; color: #aaa; font-weight: 700; text-transform: uppercase; padding: 4px 12px; }
.tb-menu-empty { padding: 8px 12px; color: #888; font-size: 13px; }
.tb-accounts { max-height: 200px; overflow-y: auto; }
.sidebar-logout { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 16px; color: #ff6b63; background: none; border: 0; cursor: pointer; margin-top: auto; width: 100%; text-align: left; }
.sidebar-logout:hover { background: #2a2c2f; }
.sidebar-footer { margin-top: 12px; padding: 8px 12px; font-size: 12px; color: var(--muted); text-align: center; }
.sidebar-footer a { color: var(--blue); font-weight: 700; }
.sidebar-footer a:hover { text-decoration: underline; }

/* ---------- studio explorer folders & scripts ---------- */
.ex-toolbar { display: flex; gap: 6px; padding: 6px 8px; border-bottom: 1px solid #45474a; }
.ex-tbtn { background: #3d3f42; border: 0; color: #fff; border-radius: 6px; padding: 5px 10px; font-size: 14px; cursor: pointer; }
.ex-tbtn:hover { background: #4d4f52; }
.ex-folder { display: flex; align-items: center; gap: 6px; padding: 6px 8px; cursor: pointer; border-radius: 6px; font-weight: 600; font-size: 14px; color: #ffd400; }
.ex-folder:hover { background: #2a2c2f; }
.ex-toggle { font-size: 10px; color: #aaa; width: 12px; }
.ex-fico { font-size: 14px; }
.ex-fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-actions { display: none; gap: 2px; }
.ex-folder:hover .ex-actions, .ex-script:hover .ex-actions { display: flex; }
.ex-act { background: none; border: 0; color: #aaa; cursor: pointer; font-size: 12px; padding: 2px 5px; border-radius: 4px; }
.ex-act:hover { background: #4d4f52; color: #fff; }
.ex-script { display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; border-radius: 6px; font-size: 14px; color: #8ecae6; font-family: monospace; }
.ex-script:hover { background: #2a2c2f; }
.ex-sico { font-size: 13px; }
.script-code { width: 100%; min-height: 320px; background: #1b1d1f; color: #e8e8e8; border: 1px solid #45474a; border-radius: 8px; padding: 12px; font-family: 'Consolas', 'Monaco', monospace; font-size: 13px; line-height: 1.5; resize: vertical; tab-size: 2; }
.script-code:focus { outline: none; border-color: #ffd400; }
.modal-wide { max-width: 700px; width: 90vw; }
.modal code { background: #3d3f42; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* ---------- AI coder scripts ---------- */
.ai-script-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: #1b1d1f; border-radius: 6px; margin: 4px 0; font-family: monospace; font-size: 13px; color: #8ecae6; }
.ai-script-item .rb-btn { padding: 3px 10px; font-size: 12px; }

/* ---------- groups enhancements ---------- */
.group-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.group-btns .btn-primary, .group-btns .btn-secondary, .group-btns .btn-danger { padding: 8px 16px; font-size: 14px; }
.btn-danger { background: #e74c3c; color: #fff; border: 0; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 4px 10px !important; font-size: 12px !important; }
.group-members { max-height: 250px; overflow-y: auto; margin: 12px 0; border: 1px solid #45474a; border-radius: 8px; }
.group-member { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid #3d3f42; }
.group-member:last-child { border-bottom: 0; }
.owner-badge { background: #ffd400; color: #1b1d1f; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.group-icon-input { width: 80px; font-size: 20px; text-align: center; }

/* ---------- group tabs, games, announcements ---------- */
.group-tabs { display: flex; gap: 8px; margin: 16px 0 12px; border-bottom: 2px solid #3d3f42; }
.group-tab { background: none; border: 0; color: #aaa; font-weight: 600; font-size: 14px; padding: 10px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.group-tab.active { color: #fff; border-bottom-color: #ffd400; }
.group-tab:hover { color: #fff; }
.group-edit { background: #2a2c2f; border-radius: 8px; padding: 12px; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.group-anns { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.group-ann { background: #2a2c2f; border-radius: 8px; padding: 12px; }
.group-ann-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.group-ann p { margin: 6px 0; line-height: 1.5; }
.group-games { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.group-game { display: flex; align-items: center; gap: 12px; background: #2a2c2f; border-radius: 8px; padding: 10px 12px; text-decoration: none; color: #fff; }
.group-game:hover { background: #3d3f42; }
.group-game b { flex: 1; }

/* ---------- ban ---------- */
.banned-tag { background: #7a0000; color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; margin-left: 6px; }

/* ---------- notifications bell ---------- */
.tb-bell-wrap { position: relative; }
.tb-bell { background: none; border: 0; color: var(--text); cursor: pointer; position: relative; padding: 8px; display: flex; }
.tb-bell .sb-ico svg { width: 22px; height: 22px; fill: currentColor; }
.tb-bell-n { position: absolute; top: 2px; right: 0; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 6px; }
.tb-notif { position: absolute; right: 0; top: 44px; width: 320px; max-height: 380px; overflow-y: auto; background: #232527; border: 1px solid #3a3d40; border-radius: 12px; box-shadow: 0 8px 30px #000a; z-index: 1000; }
.tb-notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #3a3d40; }
.tb-notif-item { display: block; padding: 10px 14px; border-bottom: 1px solid #2c2e31; color: var(--text); text-decoration: none; }
.tb-notif-item:hover { background: #2c2e31; }
.tb-notif-item.unread { background: #335fff22; }
.tb-notif-item span { display: block; font-size: 14px; }
.tb-notif-item i { font-size: 12px; color: var(--muted); font-style: normal; }

/* ---------- direct messages ---------- */
.dm-list { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.dm-convo { display: flex; align-items: center; gap: 12px; background: #232527; border-radius: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.dm-convo:hover { background: #2c2e31; }
.dm-convo b { min-width: 110px; }
.dm-snip { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-head a { color: var(--muted); text-decoration: none; }
.dm-thread { display: flex; flex-direction: column; gap: 8px; max-width: 640px; height: 50vh; overflow-y: auto; background: #1b1d1f; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.dm-msg { max-width: 75%; align-self: flex-start; }
.dm-msg.me { align-self: flex-end; }
.dm-msg span { display: inline-block; background: #2c2e31; border-radius: 14px; padding: 8px 14px; font-size: 15px; word-break: break-word; }
.dm-msg.me span { background: #335fff; color: #fff; }
.dm-msg i { display: block; font-size: 11px; color: var(--muted); font-style: normal; margin-top: 3px; }
.dm-form { display: flex; gap: 8px; max-width: 640px; }
.dm-form input { flex: 1; background: #232527; border: 1px solid #3a3d40; border-radius: 10px; padding: 10px 14px; color: var(--text); font-size: 15px; }
.friend-card-actions { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.friend-card-actions .btn-secondary { padding: 6px 12px; font-size: 13px; }

/* Pets */
.pet-emoji { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 52px; background: #393b3d; border-radius: 8px; }
.item canvas.pet-voxel { width: 100%; aspect-ratio: 1; background: #393b3d; border-radius: 8px; }
.item canvas.gear-voxel { width: 100%; aspect-ratio: 1; background: #393b3d; border-radius: 8px; }
.cat-img.pet-img { display: grid; place-items: center; font-size: 64px; }
.cat-img canvas.pet-voxel { width: 100%; height: auto; display: block; }
.cat-img canvas.gear-voxel { width: 100%; height: auto; display: block; }
.pet-img-lg { width: 84px; height: 84px; display: grid; place-items: center; font-size: 56px; background: #393b3d; border-radius: 10px; flex: none; }
.pet-img-lg canvas.pet-voxel { width: 84px; height: 84px; }
.pet-img-lg canvas.gear-voxel { width: 84px; height: 84px; }

/* ---------- Halloween theme (Oct 6 - Nov 2) ---------- */
.halloween-banner { display: block; background: linear-gradient(135deg, #6a1b9a, #ff6d00); color: #fff; border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; text-decoration: none; font-size: 16px; box-shadow: 0 4px 18px #6a1b9a88; }
.halloween-banner:hover { filter: brightness(1.1); }
body.halloween { --blue: #ff6d00; }
body.halloween .topbar { background: linear-gradient(180deg, #2a1445, #170b28); border-bottom: 3px solid #ff6d00; }
body.halloween .sidebar { background: #170b28; }
body.halloween .sidebar a { color: #d7bde2; }
body.halloween .sidebar a:hover { background: #2e1a4d; }
body.halloween .sidebar a.active { background: #ff6d00; color: #1a1a1a; }
/* ---------- spooky halloween logo ---------- */
body.halloween .logo-text { position: relative; color: #ff6d00 !important; font-weight: 900;
  text-shadow: 0 0 18px #ff6d00aa, 0 0 46px #ff6d0055, 3px 3px 0 #2a0a4a;
  animation: spooky-flicker 6s infinite; }
body.halloween .logo-text::after { content: ' 🎃'; }
body.halloween .logo-text::before { content: ''; position: absolute; left: 2%; right: 2%; top: 96%; height: 16px;
  background: linear-gradient(#d32f2f, #7f0000); opacity: .92; pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% 25%, 96% 25%, 94% 80%, 92% 25%, 80% 25%, 78% 55%, 76% 25%, 63% 25%, 61% 95%, 59% 25%, 45% 25%, 43% 65%, 41% 25%, 28% 25%, 26% 45%, 24% 25%, 12% 25%, 10% 75%, 8% 25%, 0 25%); }
@keyframes spooky-flicker {
  0%, 100% { opacity: 1; } 3% { opacity: .35; } 5% { opacity: 1; } 6% { opacity: .6; } 7% { opacity: 1; }
  41% { opacity: 1; } 43% { opacity: .25; } 45% { opacity: 1; }
  69% { opacity: 1; } 70% { opacity: .55; } 71% { opacity: 1; } }
body.halloween .logo-icon .ff-logo { filter: drop-shadow(0 0 10px #ff6d00) saturate(1.5);
  animation: spooky-wobble 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes spooky-wobble { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
body.halloween .btn-primary { background: #ff6d00; }
body.halloween .btn-primary:hover { background: #ff8f00; }
body.halloween::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .06;
  background: repeating-radial-gradient(circle at 50% 130%, #ff6d00 0 70px, transparent 70px 140px); }
body.halloween h1, body.halloween h2 { color: #ffb74d; text-shadow: 0 2px 12px #ff6d0044; }
body.halloween .sec-h h2 { color: #ff9800; }
body.halloween .game-card { background: #221532; border: 1px solid #4a2c6a; }
body.halloween .game-card:hover { border-color: #ff6d00; box-shadow: 0 4px 20px #ff6d0033; }
body.halloween .sidebar .logo { filter: drop-shadow(0 0 8px #ff6d0066); }
.hw-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: linear-gradient(135deg, #2a1445, #4a1e00); border-radius: 16px; padding: 22px; margin-bottom: 18px; }
.hw-hero-emoji { font-size: 72px; filter: drop-shadow(0 4px 12px #ff6d0088); }
.hw-hero-text h1 { margin: 0 0 6px; color: #ffb74d; }
.hw-thumb { aspect-ratio: 1; display: grid; place-items: center; font-size: 64px; background: radial-gradient(circle at 50% 35%, #3a2456, #170b28); border-radius: 8px; }

/* ---------- in-game gear toolbar (Roblox backpack style) + kill feed ---------- */
.inv-bar { position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 6; align-items: stretch; }
.inv-item { position: relative; width: 72px; min-height: 72px; border-radius: 6px; border: 2px solid rgba(255,255,255,.14); background: rgba(30,30,34,.72); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 4px 6px; transition: transform .08s, border-color .08s, background .08s; font-family: inherit; }
.inv-item:hover { border-color: rgba(255,255,255,.55); background: rgba(50,50,56,.8); }
.inv-item:active { transform: scale(.94); }
.inv-item.active { border-color: #fff; box-shadow: 0 0 0 1px #fff, 0 0 14px rgba(255,255,255,.35); background: rgba(60,60,68,.85); }
.inv-key { position: absolute; top: 3px; left: 7px; font-size: 11px; font-weight: 700; color: rgba(255,255,255,.6); }
.inv-item.active .inv-key { color: #fff; }
.inv-emoji { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.inv-name { font-size: 11px; font-weight: 600; color: #fff; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.inv-empty { color: rgba(255,255,255,.65); font-size: 12px; padding: 10px 14px; background: rgba(30,30,34,.72); border-radius: 6px; }
.inv-empty a { color: #ffd400; }
.kill-feed { position: absolute; left: 12px; top: 76px; display: flex; flex-direction: column; gap: 4px; z-index: 6; pointer-events: none; }
.kill-item { background: rgba(0,0,0,.6); border-left: 3px solid #e53935; color: #fff; font-size: 13px; padding: 5px 10px; border-radius: 6px; animation: kfin .25s ease-out; }
@keyframes kfin { from { transform: translateX(-12px); opacity: 0; } }
.lb-kills { color: #ffd400; font-weight: 700; }

/* ---------- studio game-tools picker ---------- */
.pd-tools { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.pd-gears { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; max-height: 180px; overflow: auto; }
.pd-gear { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 13px; }
.pd-gear input { accent-color: #ffd400; width: 16px; height: 16px; }

/* ---------- update log ---------- */
.update-log { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.update { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.update-date { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.update h2 { margin: 0 0 8px; font-size: 19px; }
.update ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.update:first-child { border-color: #ffd40066; }

/* ---------- dm delete ---------- */
.dm-msg { position: relative; }
.dm-del { display: none; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: none; background: #e53935; color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.dm-msg.me:hover .dm-del { display: block; }

/* ---------- studio lighting ---------- */
.rb-light { flex-wrap: wrap; }
.rb-slider { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; }
.rb-slider input[type=range] { width: 90px; accent-color: #ffd400; }
.rb-tod-v { min-width: 34px; font-size: 12px; }

/* ---------- private servers ---------- */
.gp-private { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 18px 0; }
.gp-private h3 { margin: 0 0 4px; }
.ps-result { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ps-code { font-size: 18px; }
.ps-link { display: flex; gap: 8px; }
.ps-link input { flex: 1; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 8px 10px; font-size: 13px; }

/* ---------- party ---------- */
.party-bar { display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg, #6a1b9a, #4a148c); color: #fff; padding: 8px 16px; font-size: 14px; }
.party-members { opacity: .9; }
.party-bar .link { color: #ffd400; margin-left: auto; background: none; border: none; cursor: pointer; font-size: 13px; }

/* ---------- moderation ---------- */
.mod-policy h3 { margin: 14px 0 4px; font-size: 15px; }
.mod-policy p { margin: 4px 0 10px; color: #cfd2d6; font-size: 14px; }
.mod-report { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.04); border: 1px solid #3a3a3a; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.mod-report-body { flex: 1; min-width: 0; }
.mod-report-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mod-urgent, .mod-review, .mod-clear { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.mod-urgent { background: #ff2020; color: #fff; }
.mod-review { background: #ff9800; color: #000; }
.mod-clear { background: #2ec4ff; color: #000; }
.mod-log-row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid #2c2c2c; font-size: 13px; flex-wrap: wrap; align-items: center; }
.mod-act { background: #444; border-radius: 6px; padding: 1px 8px; font-size: 12px; }
.modal label { display: block; margin: 10px 0; font-size: 14px; }
.modal select, .modal textarea { width: 100%; margin-top: 4px; box-sizing: border-box; }
.role-tag { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px; background: #555; color: #ccc; margin-left: 6px; vertical-align: middle; }
.role-owner { background: #ffd400; color: #000; }
.role-admin { background: #7c4dff; color: #fff; }
.role-moderator { background: #2ec4ff; color: #000; }

/* ---------- owner tools + site banner ---------- */
.site-banner { background: linear-gradient(90deg, #7c4dff, #2ec4ff); color: #fff; font-weight: 700; padding: 10px 18px; font-size: 15px; }
.owner-tools { border: 2px solid #ffd400; border-radius: 12px; padding: 14px 16px; margin: 18px 0; background: #2c2a1a; }
.owner-tools h3 { margin: 0 0 10px; }
.owner-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.owner-controls { border-top: 1px dashed #ffd400; margin-top: 8px; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.owner-label { font-weight: 900; color: #ffd400; font-size: 12px; letter-spacing: .5px; }
.admin-inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-inline input[type=number] { width: 70px; }
.admin-inline input.item-id { width: 110px; }
/* ---------- FunPanel (in-game staff panel) ---------- */
.funpanel-btn { font-size: 18px; }
.funpanel { position: absolute; top: 60px; left: 12px; width: 300px; max-height: 70vh; overflow-y: auto; background: #1e2023; border: 2px solid #ffd400; border-radius: 12px; padding: 12px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.funpanel h3 { margin: 0 0 8px; color: #ffd400; display: flex; justify-content: space-between; align-items: center; }
.funpanel h4 { margin: 10px 0 6px; color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.funpanel-close { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.fp-player { display: flex; align-items: center; gap: 6px; padding: 6px; background: #2a2d31; border-radius: 8px; margin-bottom: 6px; }
.fp-player img { width: 28px; height: 28px; border-radius: 6px; }
.fp-player .fp-name { flex: 1; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-player button { font-size: 11px; padding: 4px 8px; }
.fp-row { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.fp-row input { flex: 1; min-width: 0; }
.feat-tag { background: #ffd400; color: #000; font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 5px; margin-left: 8px; }
.unpub-tag { background: #555; color: #fff; font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 5px; margin-left: 8px; }

/* Muse AI chat (owner-only) */
.ai-chat { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; padding: 12px; background: rgba(0,0,0,.25); border-radius: 12px; margin-bottom: 12px; }
.ai-msg { display: flex; flex-direction: column; gap: 4px; max-width: 85%; }
.ai-user { align-self: flex-end; align-items: flex-end; }
.ai-assistant { align-self: flex-start; }
.ai-who { font-size: 12px; opacity: .7; font-weight: 700; }
.ai-text { background: rgba(255,255,255,.08); padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.ai-user .ai-text { background: #335fff; color: #fff; }
.ai-form { display: flex; gap: 8px; }
.ai-form .ai-input { flex: 1; }

/* Settings page */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-weight: 600; }
.set-row input[type=checkbox] { width: 22px; height: 22px; accent-color: #335fff; }
.set-curpw, .set-newpw { display: block; width: 100%; max-width: 320px; margin: 6px 0; padding: 10px 12px; border-radius: 10px; border: 2px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25); color: inherit; font: inherit; }
.set-pw-btn { margin-top: 8px; }
/* UGC Studio */
.ugc-templates { margin: 10px 0; }
.ugc-templates .item-grid { max-height: 220px; overflow-y: auto; }
.av-panel > label { display: block; margin: 10px 0; font-size: 14px; }
.av-panel > label input { display: block; width: 100%; max-width: 280px; margin-top: 4px; padding: 10px 12px; border-radius: 10px; border: 2px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25); color: inherit; font: inherit; }
.ugc-submit { margin-top: 6px; }
.ugc-status { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.ugc-status.pending { background: rgba(255,193,7,.2); color: #ffc107; }
.ugc-status.approved { background: rgba(76,175,80,.2); color: #66bb6a; }
.ugc-status.rejected { background: rgba(244,67,54,.2); color: #ef5350; }
.mod-report .cat-img img { width: 72px; height: 72px; border-radius: 8px; }
/* UGC GLB models */
.ugc-drop { display: flex; gap: 8px; margin: 10px 0; align-items: center; }
.ugc-drop .btn-secondary { cursor: pointer; }
.ugc-model-err { display: none; color: #ef5350; font-size: 13px; margin: 4px 0; }
.ugc-model-err.show { display: block; }
.glb-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 90px; font-size: 34px; background: rgba(0,0,0,.25); border-radius: 10px; }
.glb-ph span { font-size: 11px; color: #8ab4ff; margin-top: 4px; }
.glb-canvas { width: 360px; max-width: 100%; height: 360px; background: rgba(0,0,0,.3); border-radius: 12px; }
/* Online player count + settings links */
.tb-online { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tb-online .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.tb-online b { color: var(--text); }
a.set-row.set-link { text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
a.set-row.set-link:last-child { border-bottom: 0; }
/* UGC transform editor */
.ugc-xform { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.xf-row { display: grid; grid-template-columns: 1fr 130px 44px; align-items: center; gap: 8px; font-size: 13px; }
.xf-row input[type=range] { width: 100%; accent-color: #335fff; }
.xf-row b { text-align: right; font-weight: 600; }
/* Spooky Rivals Tournament */
.tourney-hero { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.tourney-prize, .tourney-countdown { flex: 1; min-width: 220px; background: rgba(0,0,0,.3); border: 2px solid #b388ff; border-radius: 14px; padding: 18px; text-align: center; }
.tourney-prize .tp-emoji { font-size: 52px; display: block; }
.tourney-prize b { display: block; font-size: 18px; margin: 8px 0 4px; }
.tourney-prize em { color: var(--muted); font-size: 13px; }
.tourney-countdown span { color: var(--muted); font-size: 13px; }
.tourney-countdown b { display: block; font-size: 28px; margin-top: 6px; color: #ffca28; }
.tourney-actions { display: flex; gap: 10px; align-items: center; margin: 12px 0 20px; }
.tourney-board { display: flex; flex-direction: column; gap: 6px; }
.tourney-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; background: rgba(0,0,0,.25); border-radius: 10px; padding: 10px 14px; }
.tourney-row.me { border: 2px solid #ffd400; }
.tourney-rank { font-size: 20px; font-weight: 800; color: #ffca28; }
.tourney-name { font-weight: 700; }
.tourney-wins { color: var(--muted); }
.tourney-hud { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.65); border: 2px solid #b388ff; border-radius: 12px; padding: 8px 18px; font-size: 17px; z-index: 50; white-space: nowrap; }
/* Rivals remake */
.rivals-hud { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.rv-round { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.65); border: 2px solid #b388ff; border-radius: 12px; padding: 8px 20px; font-size: 17px; white-space: nowrap; }
.rv-hitmark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.6); font-size: 42px; font-weight: 900; color: #fff; opacity: 0; text-shadow: 0 0 6px #000; }
.rv-hitmark.show { opacity: 1; transform: translate(-50%,-50%) scale(1); transition: transform .08s; }
.rv-hitmark.hs { color: #ff5252; }
.rv-hitmark.kill { color: #ff1744; font-size: 54px; }
.rv-bottom { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; }
.rv-hp { width: 220px; height: 14px; background: rgba(0,0,0,.6); border-radius: 8px; overflow: hidden; border: 1px solid #555; }
.rv-hpfill { height: 100%; width: 100%; background: linear-gradient(90deg, #66bb6a, #9ccc65); transition: width .15s; }
.rv-ammo { background: rgba(0,0,0,.6); border-radius: 8px; padding: 6px 14px; font-size: 16px; font-weight: 700; border: 1px solid #555; }
.tourney-loadout { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.loadout-picks { display: flex; gap: 8px; }
.loadout-pick { background: rgba(0,0,0,.3); border: 2px solid #555; border-radius: 10px; padding: 8px 14px; font-size: 15px; cursor: pointer; color: #fff; }
.loadout-pick.active { border-color: #ffd400; background: rgba(255,212,0,.15); }
/* Easter eggs */
.egg-confetti { position: fixed; top: -40px; z-index: 9999; pointer-events: none; animation: egg-fall 3s ease-in forwards; }
@keyframes egg-fall { to { transform: translateY(110vh) rotate(360deg); } }
.logo.egg-spin .logo-icon { animation: egg-spin 1.2s ease; }
@keyframes egg-spin { to { transform: rotate(720deg); } }
.ugc-warn { background: #4a2a00; border: 2px solid #ff9800; border-radius: 10px; padding: 12px 16px; font-weight: 700; }
/* 📡 News broadcast */
.news-overlay { position: fixed; inset: 0; z-index: 5000; background: #000; display: grid; place-items: center; }
.news-glitch { animation: news-flicker .12s infinite; }
.news-static { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, #111 0 2px, #222 2px 4px); opacity: .7; animation: news-static .2s infinite; }
@keyframes news-static { 50% { transform: translateY(3px); } }
@keyframes news-flicker { 50% { filter: hue-rotate(90deg) contrast(1.6); } }
.news-glitch-text { position: relative; font-size: 34px; font-weight: 900; color: #fff; text-shadow: 3px 0 #f0f, -3px 0 #0ff; animation: news-rgb .3s infinite; letter-spacing: 2px; }
@keyframes news-rgb { 50% { text-shadow: -3px 0 #f0f, 3px 0 #0ff; transform: skewX(4deg); } }
.news-frame { position: relative; width: min(900px, 94vw); }
.news-banner { background: var(--grad); font-weight: 900; font-size: 22px; padding: 10px 20px; border-radius: 12px 12px 0 0; letter-spacing: 1px; }
.news-video-el { width: 100%; max-height: 70vh; background: #000; display: block; }
.news-lower3rd { background: rgba(0,0,0,.85); border-left: 6px solid var(--pink); padding: 12px 18px; font-size: 18px; border-radius: 0 0 12px 12px; }
.news-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 18px; font-weight: 900; }
/* 📡 News Maker */
.news-maker { display: flex; gap: 24px; flex-wrap: wrap; }
.nm-preview canvas { width: 300px; height: 300px; background: radial-gradient(circle at 50% 30%, #2a2a5e, #12121f); border-radius: 16px; border: 1px solid var(--line); }
.nm-panel { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 14px; }
.nm-panel label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.nm-panel input, .nm-panel textarea, .nm-panel select { background: var(--card); border: 1px solid var(--line); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 15px; font-family: inherit; }
.nm-panel input:focus, .nm-panel textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--glow); }
.nm-actions { display: flex; gap: 10px; }
.news-live-stage { background: #05050f; border-radius: 12px; display: grid; place-items: center; padding: 0; overflow: hidden; }
.news-anchor-canvas { width: min(520px, 92vw); height: min(520px, 92vw); display: block; }
.news-script { font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 6px; max-height: 80px; overflow-y: auto; }
.news-video-intro { display: flex; align-items: center; gap: 18px; background: radial-gradient(circle at 30% 30%, #2a2a5e, #0a0a18); border-radius: 12px; padding: 16px; }
.news-video-intro .news-anchor-canvas { width: 180px; height: 180px; flex: none; }
.news-intro-text { font-size: 20px; }
.news-video-wrap { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.news-unmute { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--grad); border: 0; color: #fff; font-size: 20px; font-weight: 900; padding: 16px 28px; border-radius: 30px; box-shadow: var(--glow); }
.news-listen { background: var(--grad); border: 0; color: #fff; font-size: 18px; font-weight: 900; padding: 14px 26px; border-radius: 30px; margin-top: 12px; box-shadow: var(--glow); }
.news-fallback-anchor { font-size: 120px; text-align: center; padding: 40px; }

/* ===== 💀 HACKER PANEL ===== */
.hk-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.hk-term { background: #070b07; border: 1px solid #0f0; border-radius: 10px; padding: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; color: #0f0; max-width: 920px; box-shadow: 0 0 24px rgba(0,255,0,.15); }
.hk-out { min-height: 260px; max-height: 440px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.5; }
.hk-line { margin: 2px 0; }
.hk-echo { color: #8f8; }
.hk-ok { color: #0f0; font-weight: 700; }
.hk-err { color: #ff5555; }
.hk-warn { color: #fc0; }
.hk-inrow { display: flex; align-items: center; gap: 8px; border-top: 1px solid rgba(0,255,0,.25); margin-top: 8px; padding-top: 8px; }
.hk-prompt { color: #0f0; white-space: nowrap; font-size: 13px; }
.hk-in { flex: 1; background: transparent; border: 0; outline: 0; color: #0f0; font: inherit; font-size: 13px; min-width: 0; }
/* site-wide corruption fx (pointer-events:none — never blocks clicks) */
.hk-fx { position: fixed; inset: 0; z-index: 99990; pointer-events: none; }
body.hk-shake #app { animation: hkShake .25s infinite; }
@keyframes hkShake { 0% { transform: translate(0,0); } 25% { transform: translate(-6px,3px); } 50% { transform: translate(5px,-4px); } 75% { transform: translate(-3px,-2px); } 100% { transform: translate(4px,3px); } }
body.hk-invert { filter: invert(1) hue-rotate(180deg); }
body.hk-corrupt #app { animation: hkJitter .18s infinite; }
@keyframes hkJitter { 0% { transform: translate(0); } 20% { transform: translate(-4px,2px) skewX(1deg); } 40% { transform: translate(3px,-3px); } 60% { transform: translate(-2px,-2px) skewX(-1deg); } 80% { transform: translate(4px,2px); } 100% { transform: translate(0); } }
.hk-corrupt-ov { background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 2px, transparent 2px 4px); display: flex; align-items: center; justify-content: center; }
.hk-corrupt-msg { font: 900 42px/1.4 ui-monospace, monospace; color: #f00; text-shadow: 2px 0 #0ff, -2px 0 #f0f; animation: hkBlink .5s steps(2) infinite; text-align: center; padding: 0 16px; }
.hk-corrupt-msg span { font-size: 16px; color: #0f0; text-shadow: none; }
@keyframes hkBlink { 50% { opacity: .25; } }
.hk-takeover { background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.hk-takeover-title { font: 900 min(9vw,64px)/1.2 ui-monospace, monospace; color: #f00; text-shadow: 3px 0 #0ff, -3px 0 #f0f; animation: hkBlink .4s steps(2) infinite; text-align: center; padding: 0 16px; }
.hk-takeover-sub { font: 700 15px ui-monospace, monospace; color: #888; letter-spacing: 4px; text-align: center; }
.hk-takeover-log { font: 13px ui-monospace, monospace; color: #0f0; min-height: 110px; text-align: left; }
.hk-jump { background: #000; display: flex; align-items: center; justify-content: center; animation: hkBlink .12s steps(2) infinite; }
.hk-jump-face { font-size: min(42vw, 300px); }
.hk-matrix { background: #000; }

/* floating hacker panel window (summoned by typing "hack") */
.hk-panel { position: fixed; right: 12px; bottom: 12px; width: min(620px, 94vw); z-index: 99999; background: #070b07; border: 1px solid #0f0; border-radius: 12px; box-shadow: 0 0 40px rgba(0,255,0,.25); overflow: hidden; }
.hk-panel-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #0a120a; color: #0f0; font: 700 13px ui-monospace, monospace; border-bottom: 1px solid rgba(0,255,0,.25); }
.hk-x { background: transparent; border: 1px solid #0f0; color: #0f0; border-radius: 6px; cursor: pointer; font-size: 12px; padding: 2px 9px; }
.hk-x:hover { background: #0f0; color: #000; }
.hk-panel .hk-quick { padding: 8px 10px 0; }
.hk-panel .hk-term { border: 0; box-shadow: none; border-radius: 0; max-width: none; }
.hk-panel .hk-out { min-height: 170px; max-height: 300px; }
.voice-btn { position: fixed; bottom: 90px; right: 16px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(20,20,40,.85); font-size: 24px; z-index: 500; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
.voice-btn.on { background: var(--grad); box-shadow: var(--glow); }
.scripts-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; margin-top: 16px; }
.scripts-list { background: var(--card); border-radius: 12px; padding: 14px; }
.script-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-radius: 8px; cursor: pointer; margin: 4px 0; }
.script-item.active, .script-item:hover { background: rgba(124,108,245,.15); }
.scripts-editor { background: var(--card); border-radius: 12px; padding: 14px; }
.scripts-editor textarea { width: 100%; height: 400px; font-family: monospace; font-size: 14px; background: #0a0a18; color: #e0e0ff; border: 1px solid rgba(124,108,245,.3); border-radius: 8px; padding: 12px; margin: 10px 0; }
.scripts-editor input { width: 100%; padding: 10px; margin-bottom: 8px; background: #0a0a18; border: 1px solid rgba(124,108,245,.3); border-radius: 8px; color: #fff; }
.github-sync { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(124,108,245,.2); }
.github-sync input { width: 100%; padding: 8px; margin: 4px 0; background: #0a0a18; border: 1px solid rgba(124,108,245,.3); border-radius: 6px; color: #fff; font-size: 13px; }
.farm-report { background: rgba(255,60,60,.08); border: 1px solid rgba(255,60,60,.3); border-radius: 10px; padding: 12px; margin: 8px 0; }
.farm-report .row { display: flex; gap: 8px; margin-top: 8px; }

/* Lobby overlay: pages open on top of the 3D lobby instead of navigating away */
.lb-overlay { position: fixed; inset: 0; z-index: 1000; background: #0a0a14; transform: translateY(102%); transition: transform .32s cubic-bezier(.2,.8,.25,1); display: flex; flex-direction: column; }
.lb-overlay.open { transform: translateY(0); }
.lb-ov-close { position: absolute; top: 10px; right: 12px; z-index: 1002; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.lb-ov-close:hover { background: rgba(255,255,255,.22); }
.lb-ov-body { flex: 1; overflow-y: auto; padding: 18px 18px 40px; }
.lb-ov-body.fullscreen { padding: 0; overflow: hidden; }

/* ============ 3D Lobby (Fortnite-style home) ============ */
.lobby { position: fixed; inset: 0; overflow: hidden; background: #07070f; color: #fff; font-family: inherit; z-index: 1; }
.lb-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 120%, #1a1a3a 0%, #07070f 70%); }
.lb-3d { position: absolute; inset: 0; }
.lb-3d canvas { width: 100%; height: 100%; display: block; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; z-index: 10; }
.lb-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: 1px; }
.lb-logo-badge { background: linear-gradient(135deg, #7c6cf5, #4a3fd4); width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.lb-tag { font-size: 11px; background: rgba(124,108,245,.25); border: 1px solid rgba(124,108,245,.5); padding: 2px 8px; border-radius: 999px; letter-spacing: 2px; }
.lb-top-right { display: flex; align-items: center; gap: 10px; }
.lb-tix { background: rgba(0,0,0,.5); border: 1px solid rgba(255,215,0,.4); padding: 6px 12px; border-radius: 999px; font-weight: 700; }
.lb-chip { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.15); padding: 4px 12px 4px 4px; border-radius: 999px; color: #fff; text-decoration: none; }
.lb-chip img { width: 28px; height: 28px; border-radius: 50%; }
.lb-iconbtn { width: 38px; height: 38px; border-radius: 12px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; text-decoration: none; }
.lb-iconbtn:hover { background: rgba(255,255,255,.12); }
.lb-rail { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 10; }
.lb-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: rgba(0,0,0,.45); border: 1px solid transparent; color: #cfcfcf; text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: .5px; min-width: 150px; }
.lb-item span { font-size: 18px; }
.lb-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.lb-item.active { background: rgba(124,108,245,.25); border-color: rgba(124,108,245,.6); color: #fff; }
.lb-dot { background: #ff4757; color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; }
.lb-panel { position: absolute; right: 16px; top: 80px; width: 290px; background: rgba(10,10,20,.72); border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 16px; z-index: 10; backdrop-filter: blur(8px); }
.lb-mode-label { font-size: 11px; letter-spacing: 2px; color: #8f8fa3; font-weight: 700; margin-bottom: 8px; }
.lb-chips { display: flex; gap: 6px; margin-bottom: 14px; }
.lb-chips button { flex: 1; padding: 8px 4px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #cfcfcf; font-size: 12px; font-weight: 700; cursor: pointer; }
.lb-chips button.on { background: rgba(124,108,245,.3); border-color: rgba(124,108,245,.7); color: #fff; }
.lb-feat { margin-bottom: 12px; }
.lb-feat-thumb { width: 100%; height: 110px; border-radius: 12px; background: linear-gradient(135deg, #1c1c34, #2a2a4a); display: flex; align-items: center; justify-content: center; font-size: 48px; margin-bottom: 10px; }
.lb-feat-name { font-size: 17px; font-weight: 800; margin: 0 0 4px; }
.lb-feat-meta { font-size: 12px; color: #8f8fa3; }
.lb-play { width: 100%; padding: 14px; border: none; border-radius: 14px; background: linear-gradient(135deg, #ffd32a, #ffa502); color: #1a1a1a; font-size: 17px; font-weight: 900; letter-spacing: 1px; cursor: pointer; margin-bottom: 14px; }
.lb-play:disabled { opacity: .4; cursor: default; }
.lb-play:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,210,42,.35); }
.lb-party { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.lb-party-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-pchip { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.06); padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 12px; }
.lb-pchip img { width: 24px; height: 24px; border-radius: 50%; }
.lb-pchip a { color: #7c6cf5; font-weight: 700; text-decoration: none; }
.lb-pchip i { color: #8f8fa3; font-style: normal; }
.lb-pempty { font-size: 12px; color: #8f8fa3; }
.lb-nameplate { position: absolute; left: 50%; bottom: 132px; transform: translateX(-50%); text-align: center; z-index: 5; pointer-events: none; }
.lb-nameplate b { display: block; font-size: 20px; }
.lb-nameplate span { font-size: 12px; color: #8f8fa3; }
.lb-tiles { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; justify-content: center; padding: 14px; z-index: 10; }
.lb-tile { display: flex; align-items: center; gap: 10px; background: rgba(10,10,20,.72); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 10px 16px; color: #fff; text-decoration: none; backdrop-filter: blur(8px); }
.lb-tile:hover { background: rgba(255,255,255,.1); }
.lb-tile span { font-size: 22px; }
.lb-tile b { display: block; font-size: 14px; }
.lb-tile i { display: block; font-size: 11px; color: #8f8fa3; font-style: normal; }
@media (max-width: 900px) {
  .lb-rail { left: 8px; }
  .lb-item { min-width: 0; padding: 10px 12px; font-size: 0; }
  .lb-item span { font-size: 20px; }
  .lb-panel { width: 230px; right: 8px; }
  .lb-tiles { flex-wrap: wrap; }
}

/* Lobby emotes */
.lb-emotes { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); display: flex; gap: 6px; z-index: 10; }
.lb-emotes button { width: 44px; height: 44px; border-radius: 12px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.15); font-size: 20px; cursor: pointer; line-height: 1; }
.lb-emotes button:hover { background: rgba(255,255,255,.12); }
/* 🎃 Halloween countdown — banner + backdrop get scarier each day (scare-1..6). */
.lb-countdown { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,140,0,.5); color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; letter-spacing: .5px; white-space: nowrap; }
.lb-countdown span { font-size: 18px; }
.lb-countdown.scare-1 { border-color: rgba(255,140,0,.5); box-shadow: 0 0 12px rgba(255,140,0,.25); }
.lb-countdown.scare-2 { border-color: rgba(255,100,0,.65); box-shadow: 0 0 16px rgba(255,100,0,.35); }
.lb-countdown.scare-3 { border-color: rgba(180,0,255,.6); box-shadow: 0 0 18px rgba(180,0,255,.35); }
.lb-countdown.scare-4 { border-color: rgba(255,0,60,.7); box-shadow: 0 0 20px rgba(255,0,60,.4); }
.lb-countdown.scare-5 { border-color: #ff0033; box-shadow: 0 0 24px rgba(255,0,51,.55); animation: lb-flicker 2.4s infinite; }
.lb-countdown.scare-6 { border-color: #ff0033; background: rgba(40,0,0,.7); box-shadow: 0 0 30px rgba(255,0,51,.7); animation: lb-flicker 1.2s infinite; }
@keyframes lb-flicker { 0%, 100% { opacity: 1; } 88% { opacity: 1; } 90% { opacity: .55; } 92% { opacity: 1; } 94% { opacity: .7; } 96% { opacity: 1; } }
.lb-bg::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.lobby.scare-1 .lb-bg::after { background: radial-gradient(ellipse at 50% 100%, rgba(255,120,0,.12), transparent 60%); }
.lobby.scare-2 .lb-bg::after { background: linear-gradient(180deg, transparent 40%, rgba(120,0,180,.18) 100%), radial-gradient(ellipse at 50% 100%, rgba(255,120,0,.15), transparent 60%); }
.lobby.scare-3 .lb-bg::after { background: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,.55), transparent 65%), linear-gradient(180deg, transparent 30%, rgba(80,0,140,.25) 100%); }
.lobby.scare-4 .lb-bg::after { background: radial-gradient(circle at 85% 15%, rgba(255,30,30,.28), transparent 35%), radial-gradient(ellipse at 50% 0%, rgba(0,0,0,.65), transparent 60%), linear-gradient(180deg, transparent 25%, rgba(60,0,100,.3) 100%); }
.lobby.scare-5 .lb-bg::after { background: radial-gradient(circle at 85% 15%, rgba(255,20,20,.4), transparent 40%), radial-gradient(ellipse at 50% 0%, rgba(0,0,0,.75), transparent 55%), linear-gradient(180deg, transparent 20%, rgba(40,0,80,.35) 100%); }
.lobby.scare-6 .lb-bg::after { background: radial-gradient(circle at 85% 15%, rgba(255,0,0,.5), transparent 45%), radial-gradient(ellipse at 50% 0%, rgba(0,0,0,.85), transparent 50%), linear-gradient(180deg, rgba(20,0,0,.4), rgba(30,0,60,.4) 100%); }
@media (max-width: 640px) { .lb-countdown { font-size: 12px; padding: 6px 12px; top: 60px; max-width: 92vw; white-space: normal; text-align: center; } }
/* 👻 Constant glitches + scary stuff — burst loop never stops, faster at higher scare levels. */
.lb-countdown b { text-shadow: 1px 0 rgba(255,0,60,.8), -1px 0 rgba(0,255,255,.8); }
.lb-countdown.scare-6 b { text-shadow: 2px 0 rgba(255,0,60,.9), -2px 0 rgba(0,255,255,.9); }
.lb-glitch { position: absolute; inset: 0; z-index: 50; pointer-events: none; opacity: 0; background: repeating-linear-gradient(0deg, rgba(255,0,60,.14) 0 2px, transparent 2px 7px, rgba(0,255,255,.12) 7px 9px, transparent 9px 14px); mix-blend-mode: screen; animation: lb-glitch-burst 7s infinite; }
.lobby.scare-1 .lb-glitch { animation-duration: 9s; }
.lobby.scare-2 .lb-glitch { animation-duration: 8s; }
.lobby.scare-3 .lb-glitch { animation-duration: 7s; }
.lobby.scare-4 .lb-glitch { animation-duration: 6s; }
.lobby.scare-5 .lb-glitch { animation-duration: 4.5s; }
.lobby.scare-6 .lb-glitch { animation-duration: 3s; }
@keyframes lb-glitch-burst {
  0%, 90%, 94%, 100% { opacity: 0; transform: none; filter: none; }
  91% { opacity: .6; transform: translate(4px, -2px); }
  92% { opacity: .35; transform: translate(-4px, 2px); filter: hue-rotate(90deg); }
  93% { opacity: .5; transform: translate(2px, 1px); }
}
.lb-haunt { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.lb-haunt span { position: absolute; left: 0; opacity: .85; animation-name: lb-drift; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes lb-drift { from { transform: translateX(-10vw); } to { transform: translateX(110vw); } }
.lb-eyes { position: absolute; top: 18%; right: 12%; z-index: 5; font-size: 34px; pointer-events: none; opacity: 0; animation: lb-eyes-blink 5s infinite; }
@keyframes lb-eyes-blink { 0%, 70%, 100% { opacity: 0; } 75%, 85% { opacity: .9; } 80% { opacity: .2; } }
.lb-emotes button.on { background: rgba(124,108,245,.35); border-color: rgba(124,108,245,.7); }

/* 🎃 SCARY MODE — while Halloween is active the whole site goes blood-dark */
body.scary { --bg: #070203; --bg2: #0d0407; --card: #170709; --card2: #20090d; --line: #4a0f18; --text: #ffe9e9; --muted: #b08a8a; --blue: #ff2d40; --blue2: #c40f24; --pink: #ff9f43; --grad: linear-gradient(135deg, #ff2d40, #7a0c1c); --glow: 0 0 18px rgba(255,45,64,.45); }
body.scary .topbar { background: linear-gradient(180deg, #1c0208, #0d0104); border-bottom: 3px solid #a31220; }
body.scary .sidebar { background: #0d0104; }
.scary-decor { position: fixed; top: 58px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 10px; font-size: 26px; pointer-events: none; z-index: 40; }
.scary-decor .sd-bats { display: inline-block; animation: sd-drift 7s ease-in-out infinite alternate; }
@keyframes sd-drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
