/* Tokens herdados do painel de stream (StreamControllerProject/painel/stream.css) */
:root {
  --neon-red: #ff003c;
  --neon-blue: #00e0ff;
  --neon-magenta: #ff5be8;
  --neon-purple: #be64f5;
  --neon-yellow: #ffd500;
  --neon-red-rgb: 255, 0, 60;
  --logo-teal: #00c8c0;
  --logo-peach: #ffd9b0;

  --bg: #0a0c19;
  --panel-bg: rgba(15, 18, 32, 0.72);
  --panel-bg-hover: rgba(22, 26, 44, 0.86);
  --text: #e8edf6;
  --text-strong: #ffffff;
  --text-dim: #b3bccd;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.32);
  --shadow-modal: 0 12px 32px rgba(0, 0, 0, 0.55);

  --t-fast: 0.12s;
  --t-base: 0.18s;
  --t-slow: 0.25s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --ls-label: 0.1em;
  --ls-title-md: 0.18em;

  --ring: conic-gradient(from 210deg, var(--neon-red), var(--logo-peach), var(--logo-teal), var(--neon-blue), var(--neon-magenta), var(--neon-red));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Exo 2", "Segoe UI", system-ui, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

/* === Background === */
/* Camada fixa em vez de background-attachment: fixed (quebra no iOS) */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(10, 12, 25, 0.35) 0%, rgba(5, 6, 16, 0.82) 70%, rgba(5, 6, 16, 0.94) 100%),
    url("../assets/bg.webp") center / cover no-repeat;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 16, 0.2) 0%, rgba(5, 6, 16, 0.65) 100%);
}

@media (orientation: portrait) {
  .bg {
    background:
      radial-gradient(ellipse at 50% 25%, rgba(10, 12, 25, 0.45) 0%, rgba(5, 6, 16, 0.86) 70%, rgba(5, 6, 16, 0.95) 100%),
      url("../assets/bg-mobile.webp") center top / cover no-repeat;
  }
}

/* === Layout === */
.card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(var(--space-6), env(safe-area-inset-top)) var(--space-4) max(var(--space-5), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* === Hero === */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding-top: var(--space-4);
}

.avatar {
  position: relative;
  flex: 0 0 auto;
  width: clamp(104px, 32vw, 136px);
  height: clamp(104px, 32vw, 136px);
  padding: 4px;
  border-radius: 50%;
  background: var(--ring);
  box-shadow: 0 0 18px rgba(0, 224, 255, 0.28), 0 0 34px rgba(255, 0, 60, 0.22);
  transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
}

.avatar:hover {
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 0 24px rgba(0, 224, 255, 0.4), 0 0 44px rgba(255, 0, 60, 0.32);
}

.avatar.is-live {
  background: var(--neon-red);
  animation: live-ring 1.8s ease-in-out infinite;
}

.live-badge {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--neon-red);
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  white-space: nowrap;
  border: 2px solid var(--bg);
  box-shadow: 0 0 10px rgba(var(--neon-red-rgb), 0.7);
}

.logo {
  flex: 1 1 0;
  min-width: 0;
  max-width: 260px;
  margin: 0;
}

.logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 18px rgba(0, 200, 192, 0.18));
}

/* === Seções === */
.group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.group-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--ls-title-md);
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(0, 224, 255, 0.45);
}

.group-title::before,
.group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 224, 255, 0.6), rgba(255, 91, 232, 0.6), transparent);
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* === Botões de link === */
.link {
  --brand: var(--neon-blue);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 60px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition:
    transform var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease),
    background var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

/* Faixa de cor da marca na lateral */
.link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
  opacity: 0.85;
  transition: top var(--t-base) var(--ease), bottom var(--t-base) var(--ease);
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  background: var(--panel-bg-hover);
  box-shadow:
    var(--shadow-modal),
    0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent),
    0 0 22px color-mix(in srgb, var(--brand) 30%, transparent);
}

.link:hover::before,
.link:focus-visible::before {
  top: 0;
  bottom: 0;
}

.link:active {
  transform: translateY(0);
}

.link:focus-visible,
.copy:focus-visible,
.avatar:focus-visible {
  outline: 2px solid var(--neon-blue);
  outline-offset: 3px;
}

.link-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  fill: var(--brand);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand) 55%, transparent));
}

.link-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.link-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 700;
}

.link-sub {
  color: var(--text-dim);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: var(--text-dim);
  opacity: 0.6;
  transition: opacity var(--t-base) var(--ease), fill var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.link:hover .link-arrow,
.link:focus-visible .link-arrow {
  opacity: 1;
  fill: var(--brand);
  transform: translate(2px, -2px);
}

/* Twitch ao vivo */
.link.is-live {
  border-color: rgba(var(--neon-red-rgb), 0.55);
  box-shadow: var(--shadow-card), 0 0 18px rgba(var(--neon-red-rgb), 0.28);
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: rgba(var(--neon-red-rgb), 0.18);
  border: 1px solid rgba(var(--neon-red-rgb), 0.6);
  color: #ff6b8a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(var(--neon-red-rgb), 0.8);
}

.live-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-red);
  box-shadow: 0 0 6px var(--neon-red);
  animation: blink 1.2s ease-in-out infinite;
}

/* === Contato === */
.contact {
  display: flex;
  gap: var(--space-2);
}

.contact .link {
  flex: 1;
  min-width: 0;
}

.copy {
  flex: 0 0 auto;
  min-width: 84px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.copy:hover {
  border-color: rgba(255, 213, 0, 0.6);
  color: var(--neon-yellow);
  box-shadow: 0 0 14px rgba(255, 213, 0, 0.2);
}

.copy.is-done {
  border-color: rgba(68, 255, 136, 0.6);
  color: #44ff88;
  text-shadow: 0 0 6px rgba(68, 255, 136, 0.6);
}

/* === Footer === */
.footer {
  margin-top: auto;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  opacity: 0.8;
}

.footer p {
  margin: 0;
}

/* === Animações === */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes live-ring {
  0%, 100% {
    box-shadow: 0 0 12px rgba(var(--neon-red-rgb), 0.55), 0 0 28px rgba(var(--neon-red-rgb), 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(var(--neon-red-rgb), 0.85), 0 0 46px rgba(var(--neon-red-rgb), 0.5);
  }
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.hero,
.group,
.footer {
  animation: rise 0.6s var(--ease) both;
}

.group:nth-of-type(1) { animation-delay: 0.1s; }
.group:nth-of-type(2) { animation-delay: 0.18s; }
.footer { animation-delay: 0.26s; }

.links li {
  animation: rise 0.5s var(--ease) both;
}

.links li:nth-child(1) { animation-delay: 0.14s; }
.links li:nth-child(2) { animation-delay: 0.19s; }
.links li:nth-child(3) { animation-delay: 0.24s; }
.links li:nth-child(4) { animation-delay: 0.29s; }
.links li:nth-child(5) { animation-delay: 0.34s; }
.links li:nth-child(6) { animation-delay: 0.39s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 600px) {
  .card {
    padding-top: 56px;
  }

  .avatar {
    width: 144px;
    height: 144px;
  }
}
