/* Android Cloud — estilo neon (azul-noite + roxo), inspirado em interfaces de jogos do Roblox. */

:root {
  --bg-0: #060a26;
  --bg-1: #0b1350;
  --bg-2: #15207a;
  --panel: rgba(17, 25, 88, 0.72);
  --panel-solid: #121a5c;
  --panel-2: rgba(28, 38, 118, 0.66);
  --band: rgba(36, 48, 140, 0.55);
  --band-2: rgba(28, 38, 112, 0.35);
  --line: rgba(150, 170, 255, 0.22);
  --text: #f4f6ff;
  --muted: #a3afe8;
  --dim: #6f7bc2;
  --purple: #a855f7;
  --purple-2: #7c3aed;
  --magenta: #d946ef;
  --pink: #f0abfc;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gold: #fbbf24;
  --gold-2: #f59e0b;
  --red: #ef4444;
  --red-2: #b91c1c;
  --green: #22c55e;
  --green-2: #4ade80;
  --radius: 10px;
  --font-title: 'Lilita One', 'Fredoka', system-ui, sans-serif;
  --font: 'Fredoka', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background-color: var(--bg-0);
  background-image:
    url('/assets/noise.svg'),
    url('/assets/stars.svg'),
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(88, 80, 255, 0.35), transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(168, 85, 247, 0.22), transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
  background-size: 240px 240px, 420px 420px, auto, auto, auto;
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before { /* névoa a mexer devagar */
  content: '';
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 30% 60%, rgba(124, 58, 237, 0.18), transparent),
    radial-gradient(closest-side at 70% 40%, rgba(34, 211, 238, 0.08), transparent);
  animation: drift 40s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes drift { to { transform: translate3d(4%, -3%, 0) scale(1.08); } }

a { color: var(--cyan); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(168, 85, 247, 0.5); }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; }
.i.lg { width: 28px; height: 28px; }

/* ---------- texto estilizado ---------- */

.outline { /* texto com contorno escuro, como nos jogos */
  font-family: var(--font-title);
  letter-spacing: 0.4px;
  text-shadow:
    -1.5px -1.5px 0 #0a0f3a, 1.5px -1.5px 0 #0a0f3a, -1.5px 1.5px 0 #0a0f3a, 1.5px 1.5px 0 #0a0f3a,
    0 3px 0 #0a0f3a;
}

.title-neon {
  position: relative;
  display: inline-block;
  margin: 6px 0 2px;
  font-family: var(--font-title);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  color: transparent;
  background: linear-gradient(180deg, #fbe7ff 0%, #e879f9 38%, #a855f7 70%, #6d28d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.6px #1a0b3d;
  filter: drop-shadow(0 3px 0 #1a0b3d) drop-shadow(0 0 14px rgba(192, 132, 252, 0.65));
  z-index: 1;
}

.title-wrap { position: relative; padding-top: 4px; }
.title-wrap::before { /* fumo roxo por trás do título */
  content: '';
  position: absolute;
  left: -30px;
  top: -24px;
  width: 260px;
  height: 90px;
  background: url('/assets/smoke.svg') no-repeat center / contain;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

/* ---------- topo ---------- */

.app { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 10px;
  background: linear-gradient(180deg, rgba(8, 12, 48, 0.92), rgba(8, 12, 48, 0.55) 80%, transparent);
  backdrop-filter: blur(6px);
}

.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 4px 2px; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  min-width: 112px;
  padding: 10px 18px 9px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #1d2a7a, #16206a);
  box-shadow: inset 0 0 0 1.5px rgba(120, 140, 255, 0.28), 0 4px 0 #0a0f3a;
  color: #e6eaff;
  font-family: var(--font-title);
  font-size: 19px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s, color 0.2s;
}
.tab:hover { transform: translateY(-1px); background: linear-gradient(180deg, #24339a, #1a267d); }
.tab:active { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px rgba(120, 140, 255, 0.28), 0 1px 0 #0a0f3a; }
.tab.active {
  background: linear-gradient(180deg, #ffffff, #dfe4ff);
  color: #0e1450;
  box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(255, 255, 255, 0.45), 0 4px 0 #0a0f3a;
}

.coin-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #17226e, #10185a);
  box-shadow: inset 0 0 0 1.5px rgba(251, 191, 36, 0.35), 0 4px 0 #0a0f3a;
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--gold);
  text-shadow: 0 2px 0 #7c2d12;
  white-space: nowrap;
  cursor: pointer;
}
.coin-pill img { width: 30px; height: 30px; }

.icon-btn-red { /* botão vermelho triangular (sair) */
  position: relative;
  width: 46px;
  height: 42px;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 3px 0 #450a0a) drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}
.icon-btn-red::before {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #fb7185, #dc2626 60%, #991b1b);
}
.icon-btn-red span {
  position: absolute;
  inset: 13px 0 0;
  font-family: var(--font-title);
  font-size: 20px;
  color: #fff;
  text-shadow: 0 2px 0 #7f1d1d;
}

.subbar { display: flex; justify-content: flex-end; gap: 10px; padding: 0 18px; position: relative; z-index: 30; }

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #17216b, #111a5a);
  box-shadow: inset 0 0 0 1.5px rgba(120, 140, 255, 0.25), 0 3px 0 #0a0f3a;
  font-family: var(--font-title);
  font-size: 17px;
  cursor: pointer;
}
.switch {
  width: 46px;
  height: 26px;
  border-radius: 5px;
  background: #0b1140;
  box-shadow: inset 0 0 0 1.5px rgba(150, 170, 255, 0.3);
  position: relative;
  flex: none;
}
.switch::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: #4b5694;
  transition: left 0.18s, background 0.18s, box-shadow 0.18s;
}
.on > .switch::after, .switch.on::after {
  left: 24px;
  background: linear-gradient(180deg, #86efac, #22c55e);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
}

/* ---------- conteúdo ---------- */

.page { position: relative; padding: 8px 18px 40px; flex: 1; animation: pagein 0.25s ease-out; }
@keyframes pagein { from { transform: translateY(6px); } }
.hidden { display: none !important; }

.dash {
  display: grid;
  grid-template-columns: minmax(300px, 470px) minmax(200px, 1fr) minmax(320px, 520px);
  gap: 22px;
  align-items: start;
}

.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.section-head { /* ✦——— TÍTULO ———✦ */
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 2px;
  font-family: var(--font-title);
  font-size: 19px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-head .ln { height: 2px; flex: 1; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.15)); box-shadow: 0 0 6px rgba(199, 210, 254, 0.7); }
.section-head .ln.rev { background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.95)); }
.section-head .ln.short { flex: 0 0 26px; }
.section-head .spark { width: 22px; height: 22px; flex: none; background: url('/assets/sparkle.svg') no-repeat center / contain; filter: drop-shadow(0 0 6px #c7d2fe); }
.section-head .spark + .ln, .section-head .ln + .spark { margin-left: -8px; }

.level { display: flex; flex-direction: column; gap: 6px; }
.level .row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-title); font-size: 18px; }
.level .row b { color: var(--cyan); font-weight: 400; }
.level .row small { color: var(--cyan); font-size: 15px; }
.bar {
  height: 10px;
  border-radius: 6px;
  background: rgba(10, 16, 70, 0.9);
  box-shadow: inset 0 0 0 1.5px rgba(150, 170, 255, 0.35);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6 60%, #818cf8);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.7);
  transition: width 0.6s ease;
}
.bar.warn > i { background: linear-gradient(90deg, #fbbf24, #f97316); box-shadow: 0 0 12px rgba(251, 191, 36, 0.6); }
.bar.bad > i { background: linear-gradient(90deg, #f87171, #dc2626); box-shadow: 0 0 12px rgba(239, 68, 68, 0.6); }

.stats { display: flex; flex-direction: column; }
.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-family: var(--font-title);
  font-size: 17px;
  letter-spacing: 0.3px;
}
.stat:nth-child(odd) { background: linear-gradient(90deg, var(--band), transparent 95%); }
.stat:nth-child(even) { background: linear-gradient(90deg, var(--band-2), transparent 95%); }
.stat .v { color: #fff; }
.stat .v.good { color: var(--green-2); }
.stat .v.warn { color: var(--gold); }
.stat .v.bad { color: #fca5a5; }
.stat.hot { background: linear-gradient(90deg, rgba(239, 68, 68, 0.35), transparent 90%) !important; }

/* ---------- hexágonos ---------- */

.hex {
  --hex-a: #60a5fa;
  --hex-b: #1d4ed8;
  position: relative;
  width: 74px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: #fff;
  filter: drop-shadow(0 4px 0 #0a0f3a) drop-shadow(0 0 10px rgba(96, 165, 250, 0.55));
  transition: transform 0.12s, filter 0.2s;
}
.hex::before, .hex::after {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hex::before { background: linear-gradient(180deg, #dbeafe, #93c5fd); }
.hex::after { inset: 4px; background: radial-gradient(circle at 50% 30%, var(--hex-a), var(--hex-b) 75%); }
.hex .i { position: relative; z-index: 1; width: 34px; height: 34px; stroke-width: 2.2; filter: drop-shadow(0 2px 0 rgba(10, 15, 58, 0.7)); }
.hex:hover { transform: translateY(-2px) scale(1.04); }
.hex:active { transform: translateY(2px) scale(0.98); }
.hex:disabled { cursor: not-allowed; filter: grayscale(0.8) brightness(0.6); }
.hex.purple { --hex-a: #c084fc; --hex-b: #6d28d9; filter: drop-shadow(0 4px 0 #0a0f3a) drop-shadow(0 0 10px rgba(192, 132, 252, 0.6)); }
.hex.purple::before { background: linear-gradient(180deg, #f5d0fe, #c084fc); }
.hex.red { --hex-a: #f87171; --hex-b: #991b1b; filter: drop-shadow(0 4px 0 #0a0f3a) drop-shadow(0 0 10px rgba(248, 113, 113, 0.6)); }
.hex.red::before { background: linear-gradient(180deg, #fecaca, #f87171); }
.hex.green { --hex-a: #4ade80; --hex-b: #15803d; filter: drop-shadow(0 4px 0 #0a0f3a) drop-shadow(0 0 10px rgba(74, 222, 128, 0.55)); }
.hex.green::before { background: linear-gradient(180deg, #dcfce7, #86efac); }
.hex.gold { --hex-a: #fcd34d; --hex-b: #b45309; filter: drop-shadow(0 4px 0 #0a0f3a) drop-shadow(0 0 10px rgba(251, 191, 36, 0.55)); }
.hex.gold::before { background: linear-gradient(180deg, #fef3c7, #fcd34d); }
.hex.sm { width: 52px; height: 60px; }
.hex.sm .i { width: 24px; height: 24px; }

.hex-row { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.hex-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 86px; text-align: center; }
.hex-item label { font-family: var(--font-title); font-size: 14px; line-height: 1.1; min-height: 31px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.hex-item label em { font-style: normal; color: var(--cyan); }

.status-block { display: flex; align-items: center; gap: 16px; padding: 4px 6px; }
.status-block h3 { margin: 0 0 4px; font-family: var(--font-title); font-weight: 400; font-size: 22px; color: #93c5fd; text-shadow: 0 2px 0 #0a0f3a; }
.status-block h3.green { color: var(--green-2); }
.status-block h3.gold { color: var(--gold); }
.status-block h3.red { color: #fca5a5; }
.status-block p { margin: 0; font-family: var(--font-title); font-size: 15px; color: #e6eaff; line-height: 1.3; }

/* ---------- cartões de Android (moldura de fogo) ---------- */

.devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }

.dev-card {
  position: relative;
  aspect-ratio: 200 / 260;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  color: #fff;
  transition: transform 0.15s;
}
.dev-card:hover { transform: translateY(-3px); }
.dev-card .shot {
  position: absolute;
  inset: 4.5% 4% 3% 4%;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #3b2a8a, #160f4a 70%);
}
.dev-card .shot img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.1); }
.dev-card .shot::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20, 8, 60, 0.92)); }
.dev-card .frame {
  position: absolute;
  inset: -9% -10% -2%;
  background: url('/assets/flame-frame.svg') no-repeat center / 100% 100%;
  pointer-events: none;
  animation: flicker 2.6s ease-in-out infinite;
}
.dev-card:nth-child(2n) .frame { animation-delay: -1.1s; }
@keyframes flicker { 50% { filter: brightness(1.18) saturate(1.2); transform: translateY(-1.5px); } }
.dev-card .meta { position: absolute; left: 0; right: 0; bottom: 8%; text-align: right; padding: 0 10%; font-family: var(--font-title); }
.dev-card .meta .name { font-size: 13px; text-transform: uppercase; line-height: 1.05; }
.dev-card .meta .lvl { font-size: 14px; color: #c4b5fd; }
.dev-card .meta .lvl.green { color: var(--green-2); }
.dev-card .meta .lvl.red { color: #fca5a5; }
.dev-card .meta .lvl.gold { color: var(--gold); }
.dev-card.add .shot { display: grid; place-items: center; background: rgba(40, 20, 110, 0.6); }
.dev-card.add .shot::after { display: none; }
.dev-card.add .plus { font-family: var(--font-title); font-size: 48px; color: #e9d5ff; text-shadow: 0 0 14px #a855f7; }
.dev-card.selected .shot { box-shadow: 0 0 0 3px #fff, 0 0 18px #fff; }

/* ---------- cartão do jogo atual (estilo "arma") ---------- */

.game-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 16px 20px;
  border-radius: 6px;
  background:
    url('/assets/dots.svg'),
    linear-gradient(110deg, #3b0764 0%, #6b21a8 40%, #9333ea 100%);
  box-shadow: inset 0 0 0 2px rgba(240, 171, 252, 0.6), 0 0 24px rgba(168, 85, 247, 0.45);
  overflow: hidden;
}
.game-card::before { /* fogo no canto */
  content: '';
  position: absolute;
  left: -40px;
  top: -30px;
  width: 140px;
  height: 180px;
  background: url('/assets/flame-frame.svg') no-repeat left top / 300% 100%;
  opacity: 0.8;
  pointer-events: none;
}
.game-card .glyph { position: relative; width: 74px; height: 74px; flex: none; display: grid; place-items: center; }
.game-card .glyph .i { width: 54px; height: 54px; stroke-width: 1.6; color: #fdf4ff; filter: drop-shadow(0 0 10px #f0abfc); }
.game-card .info { position: relative; margin-left: auto; text-align: right; font-family: var(--font-title); }
.game-card .info .n { font-size: 20px; line-height: 1.1; }
.game-card .info .r { font-size: 16px; }
.r.green { color: var(--green-2); }
.r.blue { color: #93c5fd; }
.r.red { color: #fca5a5; }
.r.gold { color: var(--gold); }

/* ---------- pré-visualização central ---------- */

.preview {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(180deg, #1f2a85, #0c1250);
  box-shadow: 0 0 0 2px rgba(150, 170, 255, 0.35), 0 0 60px rgba(124, 58, 237, 0.45), 0 20px 40px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.preview.landscape { aspect-ratio: 16 / 9; width: 100%; max-width: 640px; }
.preview img { width: 100%; height: 100%; object-fit: contain; border-radius: 20px; background: #050822; display: block; }
.preview .hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(8, 12, 48, 0.8);
  font-family: var(--font-title);
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.preview:hover .hint { opacity: 1; }

/* ---------- alerta vermelho ---------- */

.alert-banner {
  position: fixed;
  left: 50%;
  top: 34%;
  z-index: 60;
  width: min(92vw, 700px);
  transform: translateX(-50%);
  padding: 22px 64px;
  text-align: center;
  font-family: var(--font-title);
  font-size: clamp(18px, 2.6vw, 28px);
  color: #fee2e2;
  text-shadow: 0 2px 0 #450a0a;
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, 0.12) 10px 12px, transparent 12px) 0 0 / 24px 100%,
    linear-gradient(180deg, rgba(220, 38, 38, 0.92), rgba(153, 27, 27, 0.92));
  border: 3px solid #fca5a5;
  border-radius: 6px;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.35), 0 0 40px rgba(239, 68, 68, 0.8);
  animation: bannerin 0.35s ease-out, pulse 1.6s ease-in-out infinite 0.35s;
  cursor: pointer;
}
.alert-banner::before, .alert-banner::after { /* chevrons */
  content: '';
  position: absolute;
  top: 50%;
  width: 34px;
  height: 46px;
  transform: translateY(-50%);
  background: linear-gradient(135deg, transparent 45%, #fecaca 46% 56%, transparent 57%), linear-gradient(45deg, transparent 45%, #fecaca 46% 56%, transparent 57%);
  background-size: 100% 50%;
  background-position: top, bottom;
  background-repeat: no-repeat;
  opacity: 0.7;
}
.alert-banner::before { left: 16px; }
.alert-banner::after { right: 16px; transform: translateY(-50%) scaleX(-1); }
.alert-banner .skull { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); width: 56px; height: 56px; color: #f87171; filter: drop-shadow(0 0 10px #ef4444); }
.alert-banner .skull .i { width: 56px; height: 56px; }
.alert-banner small { display: block; margin-top: 6px; font-family: var(--font); font-size: 14px; color: #fecaca; text-shadow: none; }
@keyframes bannerin { from { opacity: 0; transform: translateX(-50%) scaleY(0.2); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0.15), 0 0 60px rgba(239, 68, 68, 0.95); } }

/* ---------- painéis genéricos ---------- */

.panel {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: inset 0 0 0 1.5px var(--line), 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}
.panel h2 { margin: 0 0 12px; font-family: var(--font-title); font-weight: 400; font-size: 22px; text-shadow: 0 2px 0 #0a0f3a; }
.panel p.help { margin: -4px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: start; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #2b3aa8, #1d2885);
  box-shadow: inset 0 0 0 1.5px rgba(150, 170, 255, 0.35), 0 3px 0 #0a0f3a;
  font-family: var(--font-title);
  font-size: 16px;
  letter-spacing: 0.3px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s, filter 0.15s;
  text-decoration: none;
  color: #fff;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px rgba(150, 170, 255, 0.35), 0 1px 0 #0a0f3a; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.6); }
.btn.green { background: linear-gradient(180deg, #4ade80, #16a34a); box-shadow: inset 0 0 0 1.5px #bbf7d0, 0 3px 0 #14532d; text-shadow: 0 1px 0 #14532d; }
.btn.red { background: linear-gradient(180deg, #f87171, #b91c1c); box-shadow: inset 0 0 0 1.5px #fecaca, 0 3px 0 #450a0a; text-shadow: 0 1px 0 #450a0a; }
.btn.purple { background: linear-gradient(180deg, #c084fc, #7c3aed); box-shadow: inset 0 0 0 1.5px #f5d0fe, 0 3px 0 #2e1065; text-shadow: 0 1px 0 #2e1065; }
.btn.gold { background: linear-gradient(180deg, #fcd34d, #d97706); box-shadow: inset 0 0 0 1.5px #fef3c7, 0 3px 0 #78350f; color: #3b1d06; }
.btn.ghost { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.sm { padding: 6px 11px; font-size: 14px; }
.btn.icon { padding: 8px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span { font-family: var(--font-title); font-size: 15px; color: #dbe2ff; }
.field small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: rgba(6, 10, 40, 0.75);
  box-shadow: inset 0 0 0 1.5px rgba(150, 170, 255, 0.3);
  outline: none;
  transition: box-shadow 0.15s;
}
.input:focus { box-shadow: inset 0 0 0 2px var(--purple), 0 0 0 3px rgba(168, 85, 247, 0.25); }
textarea.input { resize: vertical; min-height: 80px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 140px; }

.check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--band-2);
  cursor: pointer;
}
.check .t { font-family: var(--font-title); font-size: 16px; }
.check .d { display: block; font-family: var(--font); font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Caixas de seleção com o mesmo interruptor da "Vigia AFK". */
.check input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 5px;
  background: #0b1140;
  box-shadow: inset 0 0 0 1.5px rgba(150, 170, 255, 0.3);
  cursor: pointer;
}
.check input[type='checkbox']::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: #4b5694;
  transition: left 0.18s, background 0.18s, box-shadow 0.18s;
}
.check input[type='checkbox']:checked::after {
  left: 24px;
  background: linear-gradient(180deg, #86efac, #22c55e);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
}
.check input[type='checkbox']:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
input[type='radio'] { accent-color: var(--purple); width: 18px; height: 18px; cursor: pointer; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--band), rgba(28, 38, 112, 0.25));
}
.item .grow { flex: 1; min-width: 0; }
.item.wrap { flex-wrap: wrap; }
.item.wrap .grow { min-width: 200px; }
.item.wrap .t, .item.wrap .s { white-space: normal; }
.log .e.auth { opacity: 0.7; }
.item .t { font-family: var(--font-title); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .ico {
  width: 42px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: radial-gradient(circle at 50% 30%, #818cf8, #3730a3);
  font-family: var(--font-title);
  font-size: 18px;
}
.item .ico.purple { background: radial-gradient(circle at 50% 30%, #c084fc, #6d28d9); }
.item .ico.green { background: radial-gradient(circle at 50% 30%, #4ade80, #166534); }
.item .ico.gold { background: radial-gradient(circle at 50% 30%, #fcd34d, #92400e); }
.item .ico.red { background: radial-gradient(circle at 50% 30%, #f87171, #7f1d1d); }

.empty { padding: 24px; text-align: center; color: var(--muted); font-family: var(--font-title); }

.drop {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 26px 16px;
  border-radius: 10px;
  border: 2px dashed rgba(192, 132, 252, 0.6);
  background: rgba(88, 28, 135, 0.18);
  text-align: center;
  font-family: var(--font-title);
  font-size: 17px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.drop:hover, .drop.over { background: rgba(147, 51, 234, 0.3); border-color: #f0abfc; transform: scale(1.01); }
.drop small { font-family: var(--font); font-size: 13px; color: var(--muted); }
.drop .i { width: 34px; height: 34px; color: #f0abfc; }

.progress-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.progress-item { padding: 8px 10px; border-radius: 8px; background: var(--band-2); font-size: 14px; }
.progress-item .bar { margin-top: 6px; height: 7px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  padding: 6px 12px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--font-title);
  font-size: 14px;
  cursor: pointer;
}
.chip.active { background: linear-gradient(180deg, #c084fc, #7c3aed); box-shadow: 0 0 12px rgba(168, 85, 247, 0.6); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-family: var(--font-title);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
}
.tag.green { background: rgba(34, 197, 94, 0.25); color: #86efac; }
.tag.red { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.tag.gold { background: rgba(251, 191, 36, 0.22); color: #fde68a; }
.tag.blue { background: rgba(59, 130, 246, 0.25); color: #bfdbfe; }
.tag.purple { background: rgba(168, 85, 247, 0.28); color: #e9d5ff; }

.log { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow: auto; font-size: 13.5px; }
.log .e { display: flex; gap: 10px; padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); }
.log .e time { color: var(--dim); flex: none; font-variant-numeric: tabular-nums; }
.log .e.warn, .log .e.error { background: rgba(239, 68, 68, 0.12); }
.log .e.rejoin { background: rgba(251, 191, 36, 0.1); }
.log .e.roblox { background: rgba(34, 197, 94, 0.08); }

table.kv { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.kv td { padding: 7px 8px; border-bottom: 1px solid rgba(150, 170, 255, 0.12); }
table.kv td:last-child { text-align: right; font-family: var(--font-title); font-size: 15.5px; }

/* ---------- ecrã ao vivo ---------- */

.screen-layout { display: grid; grid-template-columns: auto minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.screen-tools { display: flex; flex-direction: column; gap: 10px; align-items: center; position: sticky; top: 90px; }
.screen-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 60vh;
  height: calc(100vh - 150px);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 40%, rgba(124, 58, 237, 0.25), transparent 70%);
}
.screen-frame {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  padding: 8px;
  background: linear-gradient(180deg, #24308f, #0e1452);
  box-shadow: 0 0 0 2px rgba(190, 200, 255, 0.35), 0 0 50px rgba(124, 58, 237, 0.5), 0 0 120px rgba(34, 211, 238, 0.12);
  display: flex;
}
.screen-frame canvas {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  border-radius: 12px;
  background: #02040f;
  touch-action: none;
  cursor: pointer;
  outline: none;
}
.screen-frame canvas:focus { box-shadow: 0 0 0 2px rgba(240, 171, 252, 0.6); }
.screen-overlay {
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(4, 7, 30, 0.75);
  font-family: var(--font-title);
  font-size: 18px;
  text-align: center;
  padding: 20px;
}
.osd {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
  pointer-events: none;
  font-family: var(--font-title);
  font-size: 13px;
}
.osd span { padding: 3px 8px; border-radius: 5px; background: rgba(4, 7, 30, 0.7); }
.screen-stage:fullscreen { height: 100vh; background: #02040f; }
.screen-stage:fullscreen canvas { max-height: 100vh; }
.mobile-input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

/* ---------- gestor de ficheiros ---------- */

.files-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(6, 10, 40, 0.6);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--font-title);
  font-size: 15px;
}
.crumbs .crumb { border: 0; background: none; color: var(--cyan); cursor: pointer; padding: 2px 6px; border-radius: 5px; font: inherit; }
.crumbs .crumb:hover { background: rgba(255, 255, 255, 0.1); }
.crumbs .crumb.atual { color: #fff; cursor: default; }
.crumbs .sep { color: var(--dim); }

.file-row { transition: background 0.15s; }
.file-row.sel { background: linear-gradient(90deg, rgba(168, 85, 247, 0.4), rgba(168, 85, 247, 0.12)); }
.file-row input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 5px;
  background: rgba(6, 10, 40, 0.8);
  box-shadow: inset 0 0 0 1.5px rgba(150, 170, 255, 0.4);
  cursor: pointer;
  position: relative;
}
.file-row input[type='checkbox']:checked { background: linear-gradient(180deg, #c084fc, #7c3aed); box-shadow: 0 0 10px rgba(168, 85, 247, 0.6); }
.file-row input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.link-name {
  border: 0;
  background: none;
  padding: 0;
  color: var(--cyan);
  font-family: var(--font-title);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.link-name:hover { text-decoration: underline; }

.selbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.35), rgba(124, 58, 237, 0.15));
  box-shadow: inset 0 0 0 1.5px rgba(192, 132, 252, 0.5);
  font-family: var(--font-title);
}

@media (max-width: 1100px) {
  .files-layout { grid-template-columns: 1fr; }
}

/* ---------- modo jogo e editor de teclas ---------- */

.game-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #4ade80, #16a34a);
  color: #052e16;
  font-family: var(--font-title);
  font-size: 13px;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.7);
  pointer-events: none;
}
.game-badge.locked { background: linear-gradient(180deg, #fcd34d, #d97706); box-shadow: 0 0 14px rgba(251, 191, 36, 0.7); color: #3b1d06; }
.screen-frame.gaming { box-shadow: 0 0 0 2px #4ade80, 0 0 50px rgba(74, 222, 128, 0.45), 0 0 120px rgba(34, 211, 238, 0.12); }
.screen-frame.gaming canvas { cursor: crosshair; }

.km-overlay { position: absolute; inset: 0; z-index: 5; }
.km-bar {
  position: absolute;
  left: 50%;
  top: -46px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(10, 14, 52, 0.95);
  box-shadow: inset 0 0 0 1.5px var(--line), 0 8px 24px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  z-index: 3;
}
.km-title { font-family: var(--font-title); font-size: 14px; margin: 0 6px; }
.km-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(10, 14, 52, 0.9);
  font-size: 13px;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}
.km-layer { position: absolute; border-radius: 12px; background: rgba(5, 8, 32, 0.25); outline: 2px dashed rgba(240, 171, 252, 0.6); }
.km-layer.picking { cursor: crosshair; background: rgba(147, 51, 234, 0.18); }
.km-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  font-family: var(--font-title);
  color: #fff;
  text-shadow: 0 1px 0 #0a0f3a;
}
.km-mark:active { cursor: grabbing; }
.km-key {
  min-width: 42px;
  height: 42px;
  padding: 0 6px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: radial-gradient(circle at 50% 30%, #c084fc, #6d28d9);
  box-shadow: 0 0 0 2px #fff;
  line-height: 1;
}
.km-key b { font-size: 15px; font-weight: 400; }
.km-key small { display: block; font-size: 9px; opacity: 0.85; margin-top: 2px; font-family: var(--font); }
.km-key.hold { background: radial-gradient(circle at 50% 30%, #fcd34d, #b45309); }
.km-stick {
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.85);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45), rgba(59, 130, 246, 0.12) 70%);
  font-size: 15px;
}
.km-cam {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #22d3ee;
  background: rgba(34, 211, 238, 0.2);
  font-size: 12px;
}

.kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  margin: 0 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  font-family: var(--font-title);
  font-size: 12.5px;
  text-align: center;
}
.help-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; color: #dbe2ff; }
input[type='range'] { width: 100%; accent-color: var(--purple); }

/* ---------- login ---------- */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}
.login-card {
  width: min(420px, 100%);
  padding: 30px 28px 26px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1.5px var(--line), 0 0 60px rgba(124, 58, 237, 0.35);
  text-align: center;
}
.login-card .logo { width: 96px; height: 96px; filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.7)); }
.login-card .title-neon { font-size: 40px; }
.login-card p { color: var(--muted); margin: 6px 0 20px; }
.login-card .err { color: #fca5a5; min-height: 20px; margin: 10px 0 0; font-family: var(--font-title); }

/* ---------- avisos (toasts) ---------- */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 380px); }
.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 9px;
  background: rgba(15, 22, 80, 0.96);
  box-shadow: inset 0 0 0 1.5px var(--line), 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: toastin 0.25s ease-out;
  font-size: 14.5px;
  line-height: 1.35;
}
.toast b { font-family: var(--font-title); font-weight: 400; font-size: 16px; display: block; }
.toast.ok { box-shadow: inset 0 0 0 1.5px rgba(74, 222, 128, 0.6), 0 0 20px rgba(34, 197, 94, 0.25); }
.toast.err { box-shadow: inset 0 0 0 1.5px rgba(248, 113, 113, 0.7), 0 0 20px rgba(239, 68, 68, 0.3); }
.toast .i { margin-top: 2px; }
.toast.ok .i { color: var(--green-2); }
.toast.err .i { color: #fca5a5; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

.modal-back { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 25, 0.7); backdrop-filter: blur(3px); }
.modal { width: min(480px, 100%); padding: 22px; border-radius: 12px; background: var(--panel-solid); box-shadow: inset 0 0 0 1.5px var(--line), 0 20px 60px rgba(0, 0, 0, 0.6); }
.modal h3 { margin: 0 0 10px; font-family: var(--font-title); font-weight: 400; font-size: 22px; }
.modal p { color: #dbe2ff; line-height: 1.45; }
.modal .btns { justify-content: flex-end; margin-top: 16px; }

.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note { margin-top: 26px; text-align: center; color: var(--dim); font-size: 13px; }

/* ---------- ecrãs pequenos ---------- */

@media (max-width: 1280px) {
  .dash { grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr); }
  .dash .center { grid-column: 1 / -1; order: 3; }
  .screen-layout { grid-template-columns: auto minmax(0, 1fr); }
  .screen-side { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar { padding: 10px 12px 8px; gap: 8px; flex-wrap: wrap; }
  .tabs { order: 3; flex-basis: 100%; }
  .tab { min-width: 0; padding: 8px 12px 7px; font-size: 15px; }
  .brand-mini { display: flex !important; }
  .coin-pill { margin-left: auto; font-size: 18px; padding: 4px 12px 4px 6px; }
  .coin-pill img { width: 24px; height: 24px; }
  .subbar { padding: 0 12px; }
  .page { padding: 6px 12px 40px; }
  .dash { grid-template-columns: 1fr; }
  .hex { width: 62px; height: 70px; }
  .hex .i { width: 28px; height: 28px; }
  .hex-item { width: 72px; }
  .screen-layout { grid-template-columns: 1fr; }
  .screen-tools { position: static; flex-direction: row; flex-wrap: wrap; justify-content: center; order: 2; }
  .screen-stage { height: auto; min-height: 0; }
  .screen-frame canvas { max-height: 70vh; }
  .alert-banner { padding: 18px 46px; }
}

.brand-mini { display: none; align-items: center; gap: 8px; font-family: var(--font-title); font-size: 18px; }
.brand-mini img { width: 30px; height: 30px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
