/* ============================================
   WESSZN.COM — Ultra Neon Red / Gamer Premium
   ============================================ */

:root {
  --bg0: #020204;
  --bg1: #050508;
  --bg2: #08080d;

  --text: #ffffff;
  --muted: rgba(210, 210, 224, 0.62);
  --muted-strong: rgba(230, 230, 240, 0.82);

  /* Vermelho MUITO mais forte */
  --neon: #ff0028;
  --neon-hot: #ff123a;
  --neon-deep: #c8001f;
  --neon-glow: rgba(255, 0, 40, 0.85);

  /* Azul/cyan para o botão Ephemeris (precision + esp) */
  --cyan: #00e5ff;
  --cyan-hot: #35f0ff;
  --cyan-deep: #0086b8;
  --cyan-glow: rgba(0, 229, 255, 0.85);

  --metal: #f2f2f6;

  --glass: rgba(14, 14, 20, 0.62);
  --glass2: rgba(22, 22, 30, 0.44);

  --radius: 26px;
  --btn-radius: 15px;

  --font-display: "Orbitron", "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Consolas", monospace;
}

/* Cursor customizado estilo mira (gamer) — só onde tem hover real */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><g fill='none' stroke='%23ffffff' stroke-width='1.5'><circle cx='14' cy='14' r='9'/><line x1='14' y1='2' x2='14' y2='9'/><line x1='14' y1='19' x2='14' y2='26'/><line x1='2' y1='14' x2='9' y2='14'/><line x1='19' y1='14' x2='26' y2='14'/><circle cx='14' cy='14' r='1.2' fill='%23ff0028' stroke='none'/></g></svg>") 14 14, crosshair;
  }
  a, button, .link-btn, .tool-btn, [data-close] {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><g fill='none' stroke='%23ff0028' stroke-width='2'><circle cx='14' cy='14' r='9'/><line x1='14' y1='2' x2='14' y2='9'/><line x1='14' y1='19' x2='14' y2='26'/><line x1='2' y1='14' x2='9' y2='14'/><line x1='19' y1='14' x2='26' y2='14'/><circle cx='14' cy='14' r='1.6' fill='%23ff0028' stroke='none'/></g></svg>") 14 14, pointer;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

/* Evita que iOS aumente fonte em landscape e melhora rendering mobile */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 50% -14%, rgba(255, 0, 40, 0.22), transparent 60%),
    radial-gradient(900px 560px at 100% 6%, rgba(255, 0, 40, 0.10), transparent 60%),
    radial-gradient(760px 520px at 0% 96%, rgba(255, 0, 40, 0.09), transparent 60%),
    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 45%, var(--bg2) 100%);
  -webkit-font-smoothing: antialiased;
}

/* Vinheta escura nas bordas para foco no card */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.72) 100%);
  z-index: 2;
}

#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Grid tecnológico */
.gridOverlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 0, 40, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 40, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(65% 60% at 50% 45%, rgba(0, 0, 0, 1), transparent 100%);
  -webkit-mask-image: radial-gradient(65% 60% at 50% 45%, rgba(0, 0, 0, 1), transparent 100%);
  animation: gridPan 28s linear infinite;
}

@keyframes gridPan {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 46px, 46px 0;
  }
}

/* Scanlines sutis, estilo monitor */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.020) 0px,
    rgba(255, 255, 255, 0.020) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* Fumaça vermelha leve */
.smoke {
  position: fixed;
  inset: -30%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  filter: blur(28px);
  background:
    radial-gradient(closest-side at 22% 38%, rgba(255, 0, 40, 0.16), transparent 60%),
    radial-gradient(closest-side at 62% 26%, rgba(255, 255, 255, 0.045), transparent 58%),
    radial-gradient(closest-side at 78% 68%, rgba(255, 0, 40, 0.14), transparent 55%),
    radial-gradient(closest-side at 32% 82%, rgba(255, 255, 255, 0.035), transparent 60%);
  animation: smokeDrift 18s ease-in-out infinite;
}

@keyframes smokeDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-2.5%, 1.8%, 0) scale(1.04);
  }
}

/* ============ Layout ============ */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 14px 24px;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.cardGlow {
  position: absolute;
  width: min(760px, 96vw);
  height: min(560px, 76vw);
  border-radius: 999px;
  background:
    radial-gradient(closest-side, rgba(255, 0, 40, 0.55), rgba(255, 0, 40, 0.18) 40%, transparent 70%);
  filter: blur(36px);
  animation: glowPulse 4.5s ease-in-out infinite;
  z-index: 0;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* ============ Card com borda neon animada ============ */

.card {
  width: min(500px, 96vw);
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  padding: 30px 22px 20px;
  background:
    linear-gradient(180deg, var(--glass), var(--glass2)) padding-box,
    conic-gradient(
        from var(--borderAngle, 0deg),
        var(--neon),
        rgba(255, 255, 255, 0.22) 22%,
        var(--neon-deep) 44%,
        rgba(255, 255, 255, 0.18) 66%,
        var(--neon) 100%
      )
      border-box;
  border: 1.5px solid transparent;
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.65),
    0 0 44px rgba(255, 0, 40, 0.34),
    0 0 130px rgba(255, 0, 40, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation:
    borderSpin 6s linear infinite,
    cardIn 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@property --borderAngle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes borderSpin {
  to {
    --borderAngle: 360deg;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Reflexo interno */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(640px 240px at 22% -4%, rgba(255, 0, 40, 0.22), transparent 48%),
    radial-gradient(480px 200px at 92% 12%, rgba(255, 255, 255, 0.07), transparent 52%);
  pointer-events: none;
}

/* ============ Cabeçalho ============ */

.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 22px;
}

.brandLogo {
  width: min(340px, 84%);
  height: auto;
  display: block;
  filter:
    drop-shadow(0 0 18px rgba(255, 0, 40, 0.65))
    drop-shadow(0 0 54px rgba(255, 0, 40, 0.32));
  animation: logoGlow 3s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes logoGlow {
  0%,
  100% {
    filter:
      drop-shadow(0 0 18px rgba(255, 0, 40, 0.65))
      drop-shadow(0 0 54px rgba(255, 0, 40, 0.32));
    transform: translateY(0);
  }
  50% {
    filter:
      drop-shadow(0 0 28px rgba(255, 0, 40, 0.90))
      drop-shadow(0 0 78px rgba(255, 0, 40, 0.44));
    transform: translateY(-4px);
  }
}

.subtitle {
  margin: 16px 0 0;
  color: var(--muted-strong);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.subDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon), 0 0 20px var(--neon);
}

.statusPill {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 0, 40, 0.28), rgba(255, 0, 40, 0.10));
  border: 1px solid rgba(255, 0, 40, 0.55);
  box-shadow:
    0 0 24px rgba(255, 0, 40, 0.28),
    inset 0 0 14px rgba(255, 0, 40, 0.14);
}

.statusDot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--neon-hot);
  box-shadow: 0 0 12px var(--neon-hot), 0 0 20px var(--neon-hot);
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

/* ============ Botões ============ */

.links {
  display: grid;
  gap: 13px;
  padding: 6px 2px 16px;
}

.link-btn {
  --accent: var(--neon);
  --accent-hot: var(--neon-hot);
  --accent-deep: var(--neon-deep);
  --accent-glow: var(--neon-glow);

  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 16px 13px 13px;
  border-radius: var(--btn-radius);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(10, 10, 16, 0.55);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
  animation: btnIn 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(180ms + var(--i, 0) * 70ms);
}

@keyframes btnIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Barra lateral neon */
.link-btn::after {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent), 0 0 26px var(--accent);
  opacity: 0.35;
  transform: scaleY(0.55);
  transition: opacity 220ms ease, transform 260ms ease;
}

/* Sheen que atravessa */
.link-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    var(--accent-glow) 50%,
    transparent 70%
  );
  opacity: 0.25;
  transform: translateX(-110%);
}

.link-btn:hover,
.link-btn:focus-visible {
  transform: scale(1.028) translateY(-1px);
  border-color: var(--accent);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 18%, transparent),
      color-mix(in srgb, var(--accent) 4%, transparent)
    ),
    rgba(14, 8, 10, 0.55);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.5),
    0 0 32px var(--accent-glow),
    0 0 92px color-mix(in srgb, var(--accent) 30%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  outline: none;
}

.link-btn:hover::after,
.link-btn:focus-visible::after {
  opacity: 1;
  transform: scaleY(1);
}

.link-btn:hover::before {
  animation: sheen 720ms ease;
}

@keyframes sheen {
  from {
    transform: translateX(-110%);
    opacity: 0.9;
  }
  to {
    transform: translateX(110%);
    opacity: 0.9;
  }
}

.link-btn:active {
  transform: scale(0.985);
}

/* Botão principal (Loja) — mais destaque */
.link-btn--primary {
  border-color: rgba(255, 0, 40, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 0, 40, 0.16), rgba(255, 0, 40, 0.04)),
    rgba(14, 8, 10, 0.55);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(255, 0, 40, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.link-btn--primary::after {
  opacity: 0.9;
  transform: scaleY(1);
}

/* Botão Ephemeris — cyan/precision */
.link-btn--alt {
  --accent: var(--cyan);
  --accent-hot: var(--cyan-hot);
  --accent-deep: var(--cyan-deep);
  --accent-glow: var(--cyan-glow);
}

.link-btn--alt .btnIcon {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(160deg, rgba(0, 229, 255, 0.42), rgba(0, 229, 255, 0.08));
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.20), inset 0 0 14px rgba(0, 229, 255, 0.12);
}

.link-btn--alt .btnIcon i {
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.75);
}

.link-btn--alt .btnBadge {
  color: #cffbff;
  background: rgba(0, 229, 255, 0.14);
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.28);
}

/* Ícone */
.btnIcon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(160deg, rgba(255, 0, 40, 0.52), rgba(255, 0, 40, 0.08));
  border: 1px solid rgba(255, 0, 40, 0.36);
  box-shadow:
    0 0 18px rgba(255, 0, 40, 0.20),
    inset 0 0 14px rgba(255, 0, 40, 0.12);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.link-btn:hover .btnIcon {
  transform: scale(1.08) rotate(-4deg);
  box-shadow:
    0 0 28px var(--accent-glow),
    inset 0 0 18px color-mix(in srgb, var(--accent) 40%, transparent);
}

.btnIcon i {
  font-size: 19px;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255, 0, 40, 0.75);
}

/* Label */
.btnLabel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.btnLabel strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.btnLabel small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge lateral (JOIN / HOT / EPHEMERIS) */
.btnBadge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #ffe6ea;
  background: rgba(255, 0, 40, 0.14);
  border: 1px solid rgba(255, 0, 40, 0.45);
  box-shadow: 0 0 12px rgba(255, 0, 40, 0.28);
  text-transform: uppercase;
}

.btnBadge--hot {
  background: linear-gradient(180deg, var(--neon), var(--neon-deep));
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 16px rgba(255, 0, 40, 0.55);
  animation: hotBadge 1.6s ease-in-out infinite;
}

@keyframes hotBadge {
  0%,
  100% {
    box-shadow: 0 0 16px rgba(255, 0, 40, 0.55);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 0, 40, 0.9);
  }
}

/* Seta */
.btnArrow {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.45);
}

.btnArrow i {
  font-size: 14px;
  transition: transform 220ms ease, color 220ms ease;
}

.link-btn:hover .btnArrow i {
  transform: translateX(5px);
  color: var(--accent-hot);
}

/* ============ Rodapé ============ */

.footer {
  padding: 6px 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footerLine {
  width: 62%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 40, 0.6), transparent);
}

.footerText {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(210, 210, 224, 0.52);
  text-align: center;
}

.footerText strong {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.14em;
}

/* ============ Responsivo ============ */

@media (max-width: 640px) {
  .page {
    padding: 20px 12px 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .card {
    width: 100%;
    max-width: 460px;
    padding: 22px 14px 14px;
    border-radius: 22px;
  }

  .brand {
    padding-bottom: 18px;
  }

  .brandLogo {
    width: min(260px, 88%);
  }

  .subtitle {
    font-size: 10.5px;
    letter-spacing: 0.20em;
    margin-top: 14px;
  }

  .statusPill {
    padding: 7px 14px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .links {
    gap: 11px;
  }

  .link-btn {
    padding: 12px 12px 12px 11px;
    gap: 11px;
    border-radius: 14px;
  }

  .btnIcon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .btnIcon i {
    font-size: 17px;
  }

  .btnLabel strong {
    font-size: 14px;
  }

  .btnLabel small {
    font-size: 11px;
  }

  .btnBadge {
    display: none;
  }

  .btnArrow i {
    font-size: 13px;
  }

  .footerText {
    font-size: 10.5px;
  }
}

/* ============ Mobile: desliga animações pesadas ============ */

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  /* Grid animado consome muito repaint no mobile */
  .gridOverlay {
    animation: none;
    background-size: 40px 40px;
  }

  /* Fumaça: fica estática, mas mantém o visual */
  .smoke {
    animation: none;
    filter: blur(22px);
  }

  /* Halo do card sem pulsar */
  .cardGlow {
    animation: none;
  }

  /* Card sem borda cônica animada — foi o maior custo de repaint */
  .card {
    animation: cardIn 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
    background:
      linear-gradient(180deg, var(--glass), var(--glass2));
    border: 1.5px solid rgba(255, 0, 40, 0.55);
    box-shadow:
      0 22px 60px rgba(0, 0, 0, 0.6),
      0 0 30px rgba(255, 0, 40, 0.28),
      0 0 90px rgba(255, 0, 40, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    /* Suaviza cantos serrilhados que aparecem no Android com backdrop-filter */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Logo sem drop-shadow pulsante (drop-shadow é caro em GPU mobile) */
  .brandLogo {
    animation: none;
    filter:
      drop-shadow(0 0 14px rgba(255, 0, 40, 0.55))
      drop-shadow(0 0 34px rgba(255, 0, 40, 0.22));
  }

  /* Scanlines caras — remove no mobile */
  .scanlines {
    display: none;
  }

  /* Badge HOT sem pulsar */
  .btnBadge--hot {
    animation: none;
  }

  /* Botão sem backdrop-filter no mobile — economiza muito */
  .link-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ============ Bio ============ */

.bio {
  margin: 12px auto 0;
  max-width: 380px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.bio strong {
  color: #ffffff;
  font-weight: 700;
}

/* Cursor animado (typewriter) */
.typewriter::after {
  content: "_";
  margin-left: 3px;
  color: var(--neon);
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ============ Live dot (Discord online) ============ */

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e, 0 0 20px rgba(34, 197, 94, 0.6);
  animation: livePulse 2s ease-in-out infinite;
  margin-right: 2px;
  vertical-align: baseline;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.link-btn--alt .live-dot {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan-glow);
}

/* ============ Loader (splash screen) ============ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(600px 400px at 50% 50%, rgba(255, 0, 40, 0.18), transparent 65%),
    linear-gradient(180deg, #050508, #020204);
  display: grid;
  place-items: center;
  transition: opacity 500ms ease, visibility 500ms;
}

.loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.loader-logo {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 0 22px rgba(255, 0, 40, 0.7));
  animation: loaderPulse 1.2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 22px rgba(255, 0, 40, 0.7)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 34px rgba(255, 0, 40, 1)); }
}

.loader-bar {
  width: 200px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.loader-bar span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  animation: loaderBar 1.1s ease-in-out infinite;
}

@keyframes loaderBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ============ Toolbar (canto superior) ============ */

.toolbar {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 5;
  display: flex;
  gap: 8px;
}

.tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 15, 22, 0.55);
  border: 1px solid rgba(255, 0, 40, 0.28);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(255, 0, 40, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, color 200ms ease;
  padding: 0;
}

.tool-btn:hover {
  transform: translateY(-2px);
  border-color: var(--neon);
  color: var(--neon-hot);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 0, 40, 0.5);
}

.tool-btn i {
  font-size: 15px;
}

/* ============ Modal QR ============ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 220ms ease;
}

.modal.open {
  opacity: 1;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(340px, 90vw);
  padding: 26px 22px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20, 20, 28, 0.95), rgba(10, 10, 16, 0.95));
  border: 1.5px solid rgba(255, 0, 40, 0.45);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 0, 40, 0.3);
  text-align: center;
  transform: scale(0.95);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.open .modal-card {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  display: grid;
  place-items: center;
  transition: background 200ms;
}

.modal-close:hover {
  background: rgba(255, 0, 40, 0.3);
}

.modal-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
}

.qr-wrap {
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 0 40px rgba(255, 0, 40, 0.35);
  min-width: 220px;
  min-height: 220px;
}

.qr-wrap svg {
  display: block;
  width: 220px !important;
  height: 220px !important;
}

.modal-hint {
  margin: 14px 0 16px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 0, 40, 0.5);
  background: linear-gradient(180deg, rgba(255, 0, 40, 0.25), rgba(255, 0, 40, 0.08));
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 180ms ease, box-shadow 200ms ease;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 0, 40, 0.35);
}

/* ============ Toast ============ */

.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(15, 15, 22, 0.95);
  border: 1px solid rgba(255, 0, 40, 0.55);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 0, 40, 0.3);
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

/* ============ Responsivo p/ novos elementos ============ */

@media (max-width: 640px) {
  .bio {
    font-size: 12px;
    max-width: 320px;
  }

  .toolbar {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    gap: 6px;
  }

  .tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .tool-btn i {
    font-size: 13px;
  }

  .loader-logo {
    width: 160px;
  }

  .loader-bar {
    width: 160px;
  }
}

/* ============ Acessibilidade ============ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
