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

:root {
  --gap: 24px;
  --radius: 8px;
  --theme: rgb(8, 9, 12);
  --entry: rgba(18, 20, 26, 0.92);
  --primary: rgb(230, 230, 232);
  --secondary: rgb(130, 132, 138);
  --border: rgba(42, 44, 52, 0.95);
  color-scheme: dark;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--primary);
  background: var(--theme);
}

#star-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#star-bg canvas {
  display: block;
  position: absolute;
  inset: 0;
}

body.no-stars #star-bg {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.main {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--gap);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.main > h1,
.error h1 {
  margin: 0 0 var(--gap);
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
}

.typewriter-cursor {
  display: inline-block;
  width: 0.1em;
  height: 0.9em;
  margin-left: 0.06em;
  background: currentColor;
  vertical-align: baseline;
  transform: translateY(0.08em);
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

.intro {
  margin: 0 0 var(--gap);
  width: 100%;
  max-width: min(56ch, 100%);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--secondary);
}

.actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--entry);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.link-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.link-btn svg.icon-bluesky {
  width: 20px;
  height: auto;
}

.link-btn:hover,
.link-btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.wallet {
  margin-top: 1.5rem;
}

.wallet-label {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
}

.wallet-address {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--secondary);
  word-break: break-all;
  max-width: 28rem;
}

.error {
  gap: 1rem;
}

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

@media (max-width: 480px) {
  .intro {
    max-width: 100%;
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .actions {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-inline: var(--gap);
    margin-inline: calc(var(--gap) * -1);
    width: calc(100% + var(--gap) * 2);
  }

  .actions::-webkit-scrollbar {
    display: none;
  }

  .actions .link-btn {
    scroll-snap-align: center;
  }
}
