:root {
  --bg: #0b1020;
  --bg-2: #121a33;
  --ink: #f4f1ea;
  --muted: #a9b0c7;
  --accent: #ff6a3d;
  --accent-2: #3dffc8;
  --danger: #ff4d6d;
  --line: rgba(244, 241, 234, 0.12);
  --glow: rgba(255, 106, 61, 0.35);
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(255, 106, 61, 0.22), transparent 55%),
    radial-gradient(900px 600px at -10% 20%, rgba(61, 255, 200, 0.12), transparent 50%),
    linear-gradient(160deg, var(--bg), var(--bg-2) 55%, #0a0e1a);
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.top,
main,
footer {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 6vw;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.hero {
  min-height: calc(100vh - 5rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 6vw 4rem;
}

.eyebrow {
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.panel-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.panel-subtitle {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 0;
}

.is-hidden {
  display: none !important;
}

.btn-small {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.lead.compact {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #1a0d08;
  box-shadow: 0 0 0 0 var(--glow);
  animation: pulse 2.8s ease-in-out infinite;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 77, 109, 0.45);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  animation: none;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--glow);
  }
  50% {
    box-shadow: 0 0 28px 2px var(--glow);
  }
}

.hero-stage {
  min-height: 360px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 106, 61, 0.18), transparent 45%),
    linear-gradient(320deg, rgba(61, 255, 200, 0.12), transparent 40%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-stage::before {
  content: "";
  position: absolute;
  width: 180%;
  height: 180%;
  background: conic-gradient(from 120deg, transparent, rgba(255, 106, 61, 0.15), transparent 35%);
  animation: spin 14s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.chat-preview {
  position: relative;
  width: min(100%, 420px);
  display: grid;
  gap: 0.75rem;
}

.chat-line {
  background: rgba(8, 12, 24, 0.82);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  border-radius: 14px;
  color: var(--muted);
  transform: translateY(12px);
  opacity: 0;
  animation: rise 700ms ease forwards;
}

.chat-line:nth-child(2) {
  animation-delay: 250ms;
}

.chat-line:nth-child(3) {
  animation-delay: 500ms;
}

.chat-line span {
  color: var(--ink);
  font-weight: 700;
}

.chat-line.in span {
  color: var(--accent-2);
}

.chat-line.out span {
  color: var(--accent);
}

@keyframes rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.steps {
  padding: 1rem 6vw 5rem;
}

.steps h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.4rem;
}

.section-lead {
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  counter-reset: step;
}

.steps li {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 0.45rem;
}

.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.steps strong {
  font-size: 1.1rem;
}

.steps span {
  color: var(--muted);
  line-height: 1.45;
}

footer {
  padding: 1.5rem 6vw 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.erro,
.feedback {
  margin-top: 1rem;
  color: #ffb4c0;
}

.dash {
  padding: 2rem 6vw 4rem;
  max-width: 820px;
  display: grid;
  gap: 1.25rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.75rem;
  background: rgba(8, 12, 24, 0.55);
  backdrop-filter: blur(8px);
}

.user-row {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.user-meta {
  display: grid;
  gap: 0.2rem;
}

.user-name {
  display: block;
  line-height: 1.3;
}

.user-row img,
.avatar-skel {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.muted {
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.status-card {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 0.45rem;
}

.status-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
}

.status-line.warn-line {
  color: #ffb4c0;
}

.status-line.ok-line {
  color: #9dffd8;
}

.status-card code,
.hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent-2);
  background: rgba(61, 255, 200, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.status-card.active {
  border-color: rgba(61, 255, 200, 0.45);
}

.status-card.inactive {
  border-color: rgba(255, 106, 61, 0.35);
}

.hint {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hint p {
  margin: 0;
  line-height: 1.55;
}

.history-panel {
  margin-top: 0;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.history-lead {
  margin-bottom: 1rem;
}

.history-list {
  display: grid;
  gap: 0.55rem;
  max-height: 420px;
  overflow: auto;
  padding-right: 0.25rem;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.history-item.join {
  border-color: rgba(61, 255, 200, 0.28);
}

.history-item.part {
  border-color: rgba(255, 106, 61, 0.28);
}

.history-main {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  line-height: 1.35;
}

.history-main strong {
  color: var(--ink);
}

.history-item.join .history-main span {
  color: var(--accent-2);
}

.history-item.part .history-main span {
  color: var(--accent);
}

.history-item time {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.feedback {
  margin-top: 1rem;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .steps ol {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 280px;
  }
}
