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

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --red: #e11d2e;
  --red-glow: rgba(225, 29, 46, 0.35);
  --red-muted: #991b1b;
  --text: #f4f4f5;
  --text-muted: #71717a;
  --border: rgba(255, 255, 255, 0.06);
  --discord: #5865f2;
  --discord-hover: #4752c4;
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.logo {
  position: fixed;
  top: 1.35rem;
  left: 1.35rem;
  z-index: 10;
  width: 1.85rem;
  height: 1.85rem;
  display: block;
  text-decoration: none;
  animation: logo-spin 14s linear infinite;
  will-change: transform;
}

.logo::before {
  content: "";
  position: absolute;
  inset: -0.65rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 29, 46, 0.18) 0%, transparent 68%);
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.logo:hover::before {
  opacity: 1.35;
  transform: scale(1.08);
}

.logo-mark {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.logo-depth {
  fill: #7f1d1d;
  opacity: 0.4;
}

.logo-shape {
  fill: url(#logo-grad);
  filter:
    drop-shadow(0 0.5px 0 rgba(255, 255, 255, 0.15))
    drop-shadow(0 0 10px rgba(225, 29, 46, 0.35))
    drop-shadow(0 4px 14px rgba(225, 29, 46, 0.2));
  transition: filter 0.35s ease;
}

.logo-highlight {
  fill: url(#logo-shine);
  opacity: 0.55;
  mix-blend-mode: screen;
}

.logo:hover .logo-shape {
  filter:
    drop-shadow(0 0.5px 0 rgba(255, 255, 255, 0.25))
    drop-shadow(0 0 14px rgba(225, 29, 46, 0.5))
    drop-shadow(0 6px 18px rgba(225, 29, 46, 0.28));
}

.logo-flame {
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.4));
  transition: filter 0.35s ease;
}

.logo:hover .logo-flame {
  filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.65));
}

@keyframes logo-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo {
    animation: none;
  }
}

.glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.42;
  will-change: auto;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--red-glow);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: rgba(153, 27, 27, 0.2);
  bottom: -100px;
  right: 10%;
}

.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 2rem;
  width: 100%;
  max-width: 520px;
}

.hero {
  text-align: center;
}

.title {
  font-size: clamp(2.5rem, 8vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.title-void {
  color: var(--text);
}

.title-gen {
  color: var(--red);
}

.title-tld {
  color: var(--text-muted);
  font-weight: 500;
}

.tagline {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1.5rem;
  background: var(--discord);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
}

.discord-btn:hover {
  background: var(--discord-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.45);
}

.discord-btn:active {
  transform: translateY(0);
}

.discord-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 1rem 0.625rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.user-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.logout-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.logout-btn:hover {
  color: var(--text);
}

.auth-error {
  font-size: 0.8rem;
  color: #f87171;
  text-align: center;
}

@property --stats-rotation {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.stats {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  width: 100%;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  background: transparent;
}

.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--stats-rotation),
    transparent 0deg,
    transparent 280deg,
    var(--red) 310deg,
    rgba(225, 29, 46, 0.4) 330deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: stats-border-spin 3s linear infinite;
  pointer-events: none;
}

@keyframes stats-border-spin {
  to {
    --stats-rotation: 360deg;
  }
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-separator {
  width: 1px;
  height: 2rem;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .logo {
    top: calc(0.85rem + env(safe-area-inset-top));
    left: calc(0.85rem + env(safe-area-inset-left));
    width: 1.6rem;
    height: 1.6rem;
  }

  .container {
    gap: 2rem;
    padding: 1.25rem 1rem 2rem;
    max-width: 100%;
  }

  .stats {
    gap: 1.25rem;
    padding: 1.25rem 1.25rem;
    width: 100%;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .discord-btn {
    width: 100%;
    max-width: 320px;
    min-height: 2.75rem;
  }

  .user-card {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 400px) {
  .stats {
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem 1rem;
  }

  .stat-separator {
    width: 3rem;
    height: 1px;
  }

  .tagline {
    font-size: 0.82rem;
    padding: 0 0.5rem;
  }
}

@media (max-height: 700px) and (max-width: 640px) {
  body {
    align-items: flex-start;
  }

  .container {
    padding-top: 3.5rem;
    gap: 1.5rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .container {
    max-width: 560px;
    padding: 1.75rem;
  }
}