:root {
  --bg: #03060f;
  --bg2: #060b1a;
  --bg3: #040814;
  --card: #091126;
  --card2: #0e1938;
  --line: rgba(255, 212, 0, 0.16);
  --line-soft: rgba(140, 170, 255, 0.1);
  --text: #f6f8ff;
  --muted: #93a2c8;
  --yellow: #ffd400;
  --yellow-2: #ffe347;
  --yellow-3: #e0a800;
  --accent: #ffd400;
  --red: #ef4444;
  --green: #16a34a;
  --purple: #eab308;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 18px;
  --shadow: 0 4px 0 #010207, 0 16px 38px rgba(0, 0, 0, 0.68);
  --vx-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath fill='%23806600' d='M4 1h2v3h3v2H6v3H4V6H1V4h3z'/%3E%3Cpath fill='%23ffd400' d='M3 0h2v3h3v2H5v3H3V5H0V3h3z'/%3E%3C/svg%3E");
  --vx-shadow: 0 4px 0 rgba(1, 2, 7, 0.85);
  --vx-seta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath fill='%23806600' d='M3 1h2v1h1v1h1v1h1v2H7v1H6v1H5v1H3z'/%3E%3Cpath fill='%23ffd400' d='M2 0h2v1h1v1h1v1h1v2H6v1H5v1H4v1H2z'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1100px 540px at 12% -10%, rgba(255, 212, 0, 0.14), transparent 62%),
    radial-gradient(1000px 520px at 88% -8%, rgba(20, 48, 122, 0.35), transparent 62%),
    radial-gradient(900px 600px at 50% 100%, rgba(10, 24, 64, 0.45), transparent 70%),
    var(--bg);
  min-height: 100vh;
}

::selection {
  background: var(--yellow);
  color: #03060f;
}

a {
  color: var(--yellow);
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover {
  color: var(--yellow-2);
}

.display {
  font-family: 'Bungee', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.wrap {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- botões e campos ---------- */
.btn {
  appearance: none;
  border: 1px solid rgba(255, 238, 130, 0.35);
  border-radius: 12px;
  padding: 12px 18px;
  font: 800 15px 'Rubik', sans-serif;
  color: #03060f;
  background: linear-gradient(180deg, #ffe347 0%, #ffd400 55%, #ebb400 100%);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 4px 0 #010207, 0 8px 20px rgba(255, 212, 0, 0.18);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  filter: brightness(1.07);
  color: #03060f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 4px 0 #010207, 0 10px 26px rgba(255, 212, 0, 0.3);
}
.btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 #010207;
}
.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}
.btn.red {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 55%, #dc2626 100%);
  border-color: rgba(255, 180, 180, 0.3);
  color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28), 0 4px 0 #010207;
}
.btn.red:hover:not(:disabled) {
  color: #fff;
}
.btn.green {
  background: linear-gradient(180deg, #ffe347 0%, #ffd400 55%, #ebb400 100%);
  border-color: rgba(255, 238, 130, 0.4);
  color: #03060f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 4px 0 #010207, 0 8px 22px rgba(255, 212, 0, 0.22);
}
.btn.green:hover:not(:disabled) {
  color: #03060f;
}
.btn.ghost {
  background: rgba(11, 20, 44, 0.85);
  color: var(--text);
  border: 1px solid rgba(255, 212, 0, 0.22);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 3px 0 #010207;
}
.btn.ghost:hover:not(:disabled) {
  background: rgba(255, 212, 0, 0.1);
  border-color: rgba(255, 212, 0, 0.55);
  color: var(--yellow);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 3px 0 #010207, 0 6px 18px rgba(255, 212, 0, 0.12);
}
.btn.dark {
  background: #02040a;
  color: var(--yellow);
  border: 1px solid rgba(255, 212, 0, 0.3);
}
.btn.sm {
  padding: 8px 13px;
  font-size: 13px;
  border-radius: 9px;
}
.btn.block {
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid rgba(255, 212, 0, 0.18);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: 500 15px 'Rubik', sans-serif;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input::placeholder,
textarea::placeholder {
  color: rgba(147, 162, 200, 0.58);
}
input:focus,
select:focus,
textarea:focus {
  background: #060c1e;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.18);
}
input[type='color'] {
  padding: 4px;
  height: 46px;
}
input[type='checkbox'] {
  width: 22px;
  height: 22px;
  accent-color: var(--yellow);
}
input[type='range'] {
  padding: 0;
  accent-color: var(--yellow);
}
label.f {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  margin: 12px 0 6px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.row.wrap-row {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
  .grid3 {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: linear-gradient(180deg, rgba(14, 25, 56, 0.94) 0%, rgba(7, 13, 30, 0.98) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 212, 0, 0.08), var(--shadow);
}
.card h2,
.card h3 {
  margin: 0 0 10px;
}
.card + .card {
  margin-top: 14px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(14, 25, 56, 0.9);
  border: 1px solid rgba(255, 212, 0, 0.2);
  font-size: 12px;
  font-weight: 800;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}
.dot.on {
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 212, 0, 0.25);
  animation: pulse 1.2s infinite;
}
.dot.wait {
  background: var(--warn);
}
.dot.bad {
  background: var(--bad);
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(255, 212, 0, 0.05);
  }
}

.copy {
  display: flex;
  gap: 8px;
}
.copy input {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
}

.toast-box {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 2147483600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}
.toast {
  background: #040814;
  border: 1px solid rgba(255, 212, 0, 0.35);
  border-left: 5px solid var(--yellow);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: tin 0.2s ease;
}
.toast.err {
  border-left-color: var(--bad);
}
@keyframes tin {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}

.hidden {
  display: none !important;
}

/* ícones */
.ico {
  display: inline-block;
  vertical-align: -0.18em;
  flex: none;
}
.btn .ico {
  vertical-align: middle;
}
h2 .ico,
h3 .ico {
  color: var(--yellow);
  margin-right: 4px;
}
.tdot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 0.05em;
}
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  vertical-align: middle;
  box-shadow: 0 6px 18px rgba(255, 212, 0, 0.28);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* aviso do site (topo) */
.aviso-bar,
.aviso-preview {
  background: linear-gradient(90deg, #060d24, #0f1f4d 50%, #060d24);
  border-bottom: 1px solid rgba(255, 212, 0, 0.3);
  color: var(--text);
}
.aviso-bar.k-promo,
.aviso-preview.k-promo {
  background: linear-gradient(90deg, #d99b00, #ffd400 50%, #ffe347);
  color: #03060f;
}
.aviso-bar.k-alerta,
.aviso-preview.k-alerta {
  background: linear-gradient(90deg, #991b1b, #ef4444);
  color: #fff;
}
.aviso-bar.k-whatsapp,
.aviso-preview.k-whatsapp {
  background: linear-gradient(90deg, #051129, #0b1c40 60%, #132a5c);
  border-bottom: 1px solid rgba(255, 212, 0, 0.35);
  color: #fff;
}
.aviso-bar.k-discord,
.aviso-preview.k-discord {
  background: linear-gradient(90deg, #08122b, #14285c);
  color: #fff;
}
.aviso-stack {
  position: relative;
  z-index: 50;
}
.aviso-bar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 50px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  animation: avisoIn 0.45s cubic-bezier(0.2, 1, 0.3, 1);
}
.aviso-bar + .aviso-bar {
  border-top: 1px solid rgba(255, 212, 0, 0.2);
}
.aviso-ic {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 212, 0, 0.18);
  color: var(--yellow);
  flex: none;
}
.k-promo .aviso-ic {
  background: rgba(3, 6, 15, 0.16);
  color: #03060f;
}
.aviso-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: #03060f;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.k-promo .aviso-btn {
  background: #03060f;
  color: var(--yellow);
}
.aviso-btn:hover {
  transform: translateY(-1px) scale(1.03);
}
.aviso-x {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
}
@media (max-width: 600px) {
  .aviso-bar {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 7px 40px 7px 12px;
    font-size: 12.5px;
    font-weight: 700;
    justify-content: flex-start;
    text-align: left;
  }
  .aviso-ic {
    display: none;
  }
  .aviso-txt {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
  }
  .aviso-bar.open .aviso-txt {
    -webkit-line-clamp: unset;
    display: block;
  }
  .aviso-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
  .aviso-x {
    right: 6px;
    width: 26px;
    height: 26px;
  }
}
@keyframes avisoIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* ===== janelas próprias (confirmar / avisar) ===== */
.dlg-back {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 4, 10, 0.82);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.dlg-back.on {
  opacity: 1;
}
.dlg {
  width: min(410px, 100%);
  padding: 26px 22px 20px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid rgba(255, 212, 0, 0.28);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 212, 0, 0.06) inset;
  transform: translateY(14px) scale(0.96);
  transition: transform 0.22s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.dlg-back.on .dlg {
  transform: none;
}
.dlg-ic {
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: var(--yellow);
  background: rgba(255, 212, 0, 0.14);
  border: 1px solid rgba(255, 212, 0, 0.3);
}
.dlg.tone-danger .dlg-ic {
  color: #f87171;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.3);
}
.dlg.tone-ok .dlg-ic {
  color: var(--yellow);
  background: rgba(255, 212, 0, 0.14);
  border-color: rgba(255, 212, 0, 0.35);
}
.dlg h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.dlg p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.dlg-in {
  width: 100%;
  margin-top: 14px;
}
.dlg-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.dlg-btns .btn {
  flex: 1;
  justify-content: center;
}

/* ===== tema de evento ===== */
html.ev-halloween body,
html.ev-natal body {
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, color-mix(in srgb, var(--ev-2) 30%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 110%, color-mix(in srgb, var(--ev-1) 22%, transparent), transparent 70%);
  background-attachment: fixed;
}
html.ev-halloween .kicker-sm,
html.ev-natal .kicker-sm {
  color: var(--ev-1);
}
.ev-decor { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.ev-i { position: absolute; display: block; opacity: 0.85; will-change: transform; }
.ev-i svg { width: 100%; height: 100%; display: block; }
.ev-i.bat { width: 54px; height: 26px; top: calc(8% + var(--i) * 13%); left: -80px; animation: evBat calc(22s + var(--i) * 5s) linear infinite; animation-delay: calc(var(--i) * -7s); }
.ev-i.pumpkin { width: 46px; height: 44px; bottom: 74px; animation: evBob 3.2s ease-in-out infinite; }
.ev-i.pumpkin:nth-child(4) { left: 10px; }
.ev-i.pumpkin:nth-child(5) { right: 10px; animation-delay: -1.6s; }
.ev-i.snow { width: 10px; height: 10px; top: -20px; left: calc(var(--i) * 12.5% + 3%); opacity: 0.7; animation: evSnow calc(9s + var(--i) * 1.3s) linear infinite; animation-delay: calc(var(--i) * -1.7s); }
@keyframes evBat { 0% { transform: translate(0, 0) scale(1); } 25% { transform: translate(30vw, -24px) scale(1.05, 0.85); } 50% { transform: translate(60vw, 10px) scale(1); } 75% { transform: translate(90vw, -18px) scale(1.05, 0.85); } 100% { transform: translate(115vw, 0) scale(1); } }
@keyframes evBob { 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes evSnow { to { transform: translate(30px, 105vh); } }
.ev-chip { position: fixed; left: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 40; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ev-1) 60%, transparent); background: rgba(4, 8, 20, 0.92); color: #fff; font: 700 12px 'Rubik', sans-serif; cursor: pointer; backdrop-filter: blur(6px); }
.ev-chip svg { color: var(--ev-1); }
.ev-chip b { color: var(--ev-1); font-weight: 800; }
.ev-chip.mini { padding: 7px; }
.ev-chip.mini span, .ev-chip.mini b { display: none; }
.ev-chip:hover span, .ev-chip:hover b, .ev-chip:focus-visible span, .ev-chip:focus-visible b { display: inline; }
@media (prefers-reduced-motion: reduce) { .ev-decor { display: none; } }

.vx-plus {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: var(--vx-plus) center / contain no-repeat;
  image-rendering: pixelated;
  transition: transform 0.18s ease;
  flex: 0 0 auto;
}
@media (prefers-reduced-motion: reduce) {
  .btn, .vx-plus { transition: none; }
}
