@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap');

.welcome-modal[hidden] {
  display: none !important;
}

html.welcome-modal-open,
body.welcome-modal-open {
  overflow: hidden;
  height: 100%;
}

.welcome-modal {
  --wm-display: 'Syne', system-ui, sans-serif;
  --wm-body: 'Inter', system-ui, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 340;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  font-family: var(--wm-body);
  overflow: hidden;
}

.welcome-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 3, 3, 0.48);
  backdrop-filter: blur(14px) saturate(1.05);
  cursor: pointer;
  animation: wmBackdropIn 0.45s ease both;
}

.welcome-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 40rem);
  max-height: calc(100dvh - 1.5rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(16, 185, 129, 0.07), transparent 55%),
    rgba(10, 10, 12, 0.88);
  box-shadow: 0 32px 80px -32px rgba(0, 0, 0, 0.85);
  animation: wmPanelIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Leaderboard popup — visible mockup, no internal scroll */
.welcome-modal > .welcome-modal__panel {
  max-height: calc(100dvh - 1.5rem);
}

.welcome-modal > .welcome-modal__panel .welcome-modal__mock {
  overflow: hidden;
}

.welcome-modal > .welcome-modal__panel .welcome-modal__mock .mock-screen {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  max-height: min(36dvh, calc(100dvh - 18rem));
}

.welcome-modal > .welcome-modal__panel .welcome-modal__mock .mock-layout-mobile .mock-screen {
  aspect-ratio: 9 / 15;
  max-height: min(34dvh, calc(100dvh - 16rem));
}

.welcome-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  background: none;
  color: #52525b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.welcome-modal__close:hover {
  color: #d4d4d8;
  transform: rotate(90deg);
}

.welcome-modal__copy {
  flex: 0 0 auto;
  padding: 1.5rem 1.25rem 0.65rem;
  text-align: center;
  animation: wmCopyIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.welcome-modal__title {
  margin: 0 0 0.85rem;
  font-family: var(--wm-display);
  font-size: clamp(1.85rem, 5.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: #fafafa;
}

.welcome-modal__title span {
  color: #52525b;
}

.welcome-modal__lead {
  margin: 0 0 0.6rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #a1a1aa;
}

.welcome-modal__lead strong {
  color: #e4e4e7;
  font-weight: 600;
}

.welcome-modal__sub {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #71717a;
}

.welcome-modal__sub strong {
  color: #d4d4d8;
  font-weight: 600;
}

.welcome-modal__twitch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0 0.1rem;
  color: #9146ff;
  font-weight: 600;
  white-space: nowrap;
}

.welcome-modal__twitch svg {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
}

.welcome-modal__signup {
  display: inline-flex;
  align-items: center;
  min-height: 1.35em;
  font-family: var(--wm-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #34d399;
  text-decoration: none;
  outline: none;
}

.welcome-modal__signup:focus {
  outline: none;
}

.welcome-modal__signup:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.45);
  outline-offset: 3px;
}

.welcome-modal__signup .slot-text {
  font-weight: inherit;
}

.welcome-modal__skip {
  display: inline-block;
  margin-top: 0.85rem;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  color: #52525b;
  cursor: pointer;
  transition: color 0.2s ease;
}

.welcome-modal__skip:hover {
  color: #a1a1aa;
}

.welcome-modal__mock {
  flex: 0 0 auto;
  padding: 0.5rem 1rem 1.15rem;
  animation: wmMockIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.welcome-modal__mock .mockup-wrap {
  perspective: none;
}

.welcome-modal__mock .mockup-frame {
  transform: none !important;
  border-radius: 0 !important;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px -28px rgba(0, 0, 0, 0.85);
}

.welcome-modal__mock .mockup-wrap:hover .mockup-frame {
  transform: none !important;
}

.welcome-page-shell .welcome-modal__mock .mock-screen {
  aspect-ratio: 16 / 10;
  width: 100%;
  min-height: 0;
  max-height: min(38vh, 14rem);
}

.welcome-modal__mock .mock-chrome {
  padding: 8px 10px;
}

.welcome-modal .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.welcome-page-shell {
  max-width: min(100%, 34rem);
  margin: 0 auto;
}

.welcome-page-shell .welcome-modal__panel {
  max-height: none;
  overflow: visible;
  width: 100%;
}

@media (min-width: 768px) {
  .welcome-modal {
    padding: 1.5rem;
    align-items: center;
  }

  .welcome-modal > .welcome-modal__panel {
    width: min(94vw, 64rem);
    max-height: calc(100dvh - 3rem);
  }

  .welcome-modal__copy {
    padding: 2.25rem 2.5rem 1rem;
  }

  .welcome-modal__title {
    font-size: clamp(2.35rem, 4.5vw, 3.5rem);
    margin-bottom: 1.1rem;
  }

  .welcome-modal__lead {
    font-size: 1.125rem;
    line-height: 1.72;
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
  }

  .welcome-modal__sub {
    font-size: 1rem;
    line-height: 1.62;
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.35rem;
  }

  .welcome-modal__signup {
    font-size: 1.5rem;
  }

  .welcome-modal__skip {
    font-size: 0.9375rem;
    margin-top: 1rem;
  }

  .welcome-modal__mock {
    padding: 0.75rem 2rem 1.75rem;
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__mock .mock-screen {
    max-height: min(46dvh, calc(100dvh - 24rem));
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__mock .mock-layout-mobile .mock-screen {
    max-height: min(40dvh, calc(100dvh - 20rem));
  }

  .welcome-page-shell .welcome-modal__mock .mock-screen {
    max-height: min(52vh, 28rem);
  }

  .welcome-modal__mock .mock-chrome {
    padding: 12px 16px;
  }

  .welcome-page-shell {
    max-width: min(100%, 72rem);
    padding: 1.25rem 0 3rem;
  }

  .welcome-page-shell .welcome-modal__panel {
    width: 100%;
    max-width: none;
  }

  .welcome-page-shell .welcome-modal__copy {
    padding: 2.5rem 3rem 1.1rem;
  }

  .welcome-page-shell .welcome-modal__title {
    font-size: clamp(2.35rem, 4.2vw, 3.35rem);
    margin-bottom: 1.15rem;
  }

  .welcome-page-shell .welcome-modal__lead {
    font-size: 1.12rem;
    line-height: 1.72;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
  }

  .welcome-page-shell .welcome-modal__sub {
    font-size: 1rem;
    line-height: 1.62;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.35rem;
  }

  .welcome-page-shell .welcome-modal__signup {
    font-size: 1.45rem;
  }

  .welcome-page-shell .welcome-modal__mock {
    padding: 0.65rem 2.25rem 2rem;
  }

  .welcome-page-shell .welcome-modal__mock .mock-screen {
    max-height: min(56vh, 32rem);
  }

  .welcome-page-shell .welcome-modal__mock .mock-chrome {
    padding: 12px 16px;
  }
}

@media (min-width: 1200px) {
  .welcome-modal > .welcome-modal__panel {
    width: min(92vw, 72rem);
    max-height: calc(100dvh - 3rem);
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__copy {
    padding: 2.75rem 3.25rem 1.15rem;
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__title {
    font-size: clamp(2.75rem, 3.8vw, 3.85rem);
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__mock .mock-screen {
    max-height: min(50dvh, calc(100dvh - 26rem));
  }
}

@media (max-height: 760px) {
  .welcome-modal > .welcome-modal__panel .welcome-modal__copy {
    padding: 1.15rem 1.25rem 0.45rem;
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__title {
    font-size: clamp(1.65rem, 4.2vw, 2.35rem);
    margin-bottom: 0.55rem;
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__lead {
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: 0.4rem;
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__sub {
    font-size: 0.8125rem;
    margin-bottom: 0.65rem;
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__signup {
    font-size: 1.125rem;
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__mock {
    padding: 0.35rem 0.85rem 0.85rem;
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__mock .mock-screen {
    max-height: min(30dvh, calc(100dvh - 15rem));
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__mock .mock-layout-mobile .mock-screen {
    max-height: min(28dvh, calc(100dvh - 14rem));
  }
}

@media (max-width: 640px) {
  .welcome-modal > .welcome-modal__panel {
    width: min(100%, 100%);
    max-height: calc(100dvh - 1rem);
  }

  .welcome-modal > .welcome-modal__panel .welcome-modal__copy {
    padding: 1.25rem 1rem 0.4rem;
  }
}

@keyframes wmBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wmPanelIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes wmCopyIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes wmMockIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}