@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@keyframes grid-move {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(50px, 50px, 0);
  }
}

@keyframes glow-pulse {
  from {
    opacity: 0.52;
  }

  to {
    opacity: 1;
  }
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.62;
    transform: scale(1.25);
  }
}

@keyframes particle-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 18vh, 0) rotate(0deg);
  }

  10%,
  82% {
    opacity: var(--particle-opacity, 0.35);
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--particle-drift, 30px), -120vh, 0)
      rotate(360deg);
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

:root {
  --accent-primary: #7dd3fc;
  --accent-strong: #38bdf8;
  --accent-hover: #bae6fd;
  --accent-muted: rgba(125, 211, 252, 0.72);
  --accent-border: rgba(125, 211, 252, 0.42);
  --accent-glow: rgba(56, 189, 248, 0.35);
  --background: #060408;
  --background-deep: #030205;
  --surface: rgba(5, 8, 16, 0.78);
  --surface-soft: rgba(56, 189, 248, 0.045);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.74);
  --success: #61f58b;
  --focus: #bae6fd;
  --font-pixel:
    "Press Start 2P", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

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

html {
  min-width: 320px;
  line-height: 1;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(
      circle at 50% -20%,
      rgba(56, 189, 248, 0.09),
      transparent 43%
    ),
    var(--background);
  font-family: var(--font-pixel);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.popup-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  padding: 12px 16px;
  color: var(--background);
  background: var(--accent-hover);
  font-size: 0.6rem;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.background-grid {
  position: fixed;
  inset: -50px;
  z-index: -4;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.085) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 20s linear infinite;
  pointer-events: none;
  will-change: transform;
}

.ambient-glow {
  position: fixed;
  z-index: -3;
  width: min(58vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.06);
  filter: blur(110px);
  pointer-events: none;
}

.ambient-glow--one {
  top: -34%;
  left: 10%;
}

.ambient-glow--two {
  right: -24%;
  bottom: -42%;
  opacity: 0.55;
}

.floating-particles {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  bottom: -30px;
  left: var(--particle-left, 50%);
  width: var(--particle-size, 3px);
  height: var(--particle-size, 3px);
  border: 1px solid rgba(125, 211, 252, 0.65);
  background: rgba(56, 189, 248, 0.38);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: particle-rise var(--particle-duration, 15s) linear infinite;
  animation-delay: var(--particle-delay, 0s);
}

.site-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px;
  animation: page-enter 520ms ease both;
}

.site-header {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
  color: var(--accent-primary);
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: 90px;
  height: 66px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.28));
  image-rendering: auto;
}

.brand__name {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-shadow: 0 0 15px var(--accent-glow);
  white-space: nowrap;
}

.social-icons {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 15px;
  color: var(--accent-primary);
}

.social-icon {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  opacity: 0.72;
}

.social-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.social-icon--signal {
  position: relative;
}

.social-icon--signal::before,
.social-icon--signal::after,
.social-icon--signal span {
  position: absolute;
  display: block;
  width: 3px;
  background: currentColor;
  box-shadow: 0 0 8px var(--accent-glow);
  content: "";
}

.social-icon--signal::before {
  left: 1px;
  bottom: 2px;
  height: 5px;
}

.social-icon--signal span {
  bottom: 2px;
  height: 10px;
}

.social-icon--signal::after {
  right: 1px;
  bottom: 2px;
  height: 16px;
}

.divider,
.footer-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-primary),
    transparent
  );
  animation: glow-pulse 3s ease-in-out infinite alternate;
}

.divider {
  margin: 20px 0;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.connect-section {
  position: relative;
  padding: 2px 16px 0;
  text-align: center;
}

.hero-title {
  margin: 0 0 10px;
  color: var(--accent-primary);
  font-size: 2rem;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-shadow:
    0 0 12px var(--accent-glow),
    0 0 26px rgba(56, 189, 248, 0.22);
}

.hero-subtitle {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.7;
}

.accent-text {
  color: var(--accent-primary);
  text-shadow: 0 0 12px var(--accent-glow);
}

.wallet-button {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  border-radius: 0;
  padding: 14px 29px;
  color: var(--text);
  background: rgba(3, 2, 5, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.35;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.wallet-button::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(186, 230, 253, 0.12) 50%,
    transparent 75%
  );
  content: "";
  transform: translateX(-125%);
  transition: transform 480ms ease;
}

.wallet-button:hover {
  color: var(--background-deep);
  background: var(--accent-primary);
  box-shadow:
    0 0 14px var(--accent-glow),
    0 0 34px rgba(56, 189, 248, 0.22);
  transform: translateY(-2px);
}

.wallet-button:hover::after {
  transform: translateX(125%);
}

.wallet-button:active {
  transform: translateY(0);
}

.wallet-icon {
  position: relative;
  display: block;
  width: 21px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
}

.wallet-icon::before {
  position: absolute;
  top: -6px;
  left: 2px;
  width: 13px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  content: "";
}

.wallet-icon span {
  position: absolute;
  top: 4px;
  right: -3px;
  width: 6px;
  height: 5px;
  border: 2px solid currentColor;
  background: var(--background);
}

.network-section {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 13px 0;
}

.network-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid var(--accent-border);
  border-radius: 0;
  padding: 8px 17px;
  color: var(--text);
  background: rgba(3, 2, 5, 0.42);
  cursor: default;
  font-size: 0.72rem;
  line-height: 1.35;
}

.network-button img,
.network-option img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 15px 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow:
    0 0 10px var(--success),
    0 0 20px rgba(97, 245, 139, 0.5);
  animation: status-pulse 2s ease-in-out infinite;
}

.status-text {
  color: var(--text-muted);
  font-size: 0.5rem;
  line-height: 1.4;
}

.hero-description {
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 0.6rem;
  line-height: 1.7;
}

.mobile-break {
  display: none;
}

.wallet-notice {
  min-height: 1em;
  margin: 9px 0 0;
  color: var(--accent-muted);
  font-size: 0.48rem;
  line-height: 1.6;
}

.main-nav {
  margin: 20px 0;
}

.nav-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid transparent;
  background: linear-gradient(
      90deg,
      transparent,
      var(--accent-primary),
      transparent
    )
    bottom / 100% 2px no-repeat;
}

.nav-tab {
  position: relative;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding: 15px 25px;
  color: var(--accent-primary);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(125, 211, 252, 0.09);
}

.nav-tab.is-active {
  color: var(--background-deep);
  background: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.tab-panel {
  animation: page-enter 240ms ease both;
}

.simple-page {
  padding: 40px 20px;
  text-align: center;
}

.page-title {
  margin: 0 0 15px;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.21);
}

.page-subtitle {
  margin: 0 0 30px;
  color: var(--text-muted);
  font-size: 0.67rem;
  line-height: 1.85;
}

.faq-section {
  padding-top: 6px;
}

.faq-section > h2 {
  margin: 0 0 30px;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.21);
}

.faq-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  overflow: clip;
  margin-bottom: 20px;
  border: 2px solid var(--accent-primary);
  border-radius: 3px;
  background: rgba(3, 2, 5, 0.2);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.faq-item:hover {
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.faq-item.is-open {
  border-color: var(--text);
  box-shadow: 0 0 25px var(--accent-glow);
}

.faq-item h3 {
  margin: 0;
}

.faq-question {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  padding: 15px 20px;
  color: var(--accent-primary);
  background: transparent;
  cursor: pointer;
  font-size: 0.66rem;
  line-height: 1.65;
  text-align: left;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.faq-question:hover {
  color: var(--accent-hover);
  background: rgba(125, 211, 252, 0.055);
}

.faq-item.is-open .faq-question {
  color: var(--text);
  background: rgba(125, 211, 252, 0.09);
}

.faq-toggle {
  flex: 0 0 auto;
  color: var(--accent-primary);
  font-size: 1rem;
  line-height: 1;
  transform: rotate(0deg);
  transition:
    color 220ms ease,
    transform 220ms ease;
}

.faq-item.is-open .faq-toggle {
  color: var(--text);
  transform: rotate(45deg) scale(1.08);
}

.faq-answer {
  padding: 17px 20px 20px;
  border-top: 1px solid rgba(125, 211, 252, 0.14);
}

.faq-answer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.58rem;
  line-height: 1.9;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
}

.footer-divider {
  margin-bottom: 20px;
}

.copyright {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.48rem;
  line-height: 1.65;
  text-align: center;
}

.popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 180ms ease;
}

.popup.is-open {
  opacity: 1;
}

.popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.popup__content {
  position: relative;
  z-index: 1;
  width: min(100%, 375px);
  border: 2px solid var(--accent-primary);
  border-radius: 0;
  padding: 28px;
  color: var(--text);
  background:
    linear-gradient(rgba(56, 189, 248, 0.025), rgba(56, 189, 248, 0.025)),
    var(--background);
  box-shadow:
    0 0 25px rgba(0, 0, 0, 0.62),
    0 0 34px rgba(56, 189, 248, 0.14);
  transform: translateY(8px) scale(0.985);
  transition: transform 180ms ease;
}

.popup.is-open .popup__content {
  transform: translateY(0) scale(1);
}

.popup__content h2 {
  margin: 8px 0 20px;
  font-size: 1rem;
  line-height: 1.45;
  text-align: center;
}

.popup__close {
  position: absolute;
  top: 11px;
  right: 13px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  color: var(--accent-primary);
  background: transparent;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 1.5rem;
  line-height: 1;
}

.popup__close:hover {
  color: var(--accent-hover);
}

.network-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.network-option {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--accent-border);
  border-radius: 0;
  padding: 14px 16px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-size: 0.58rem;
  line-height: 1.45;
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.network-option:hover {
  border-color: var(--accent-primary);
  background: rgba(125, 211, 252, 0.07);
}

.network-option.is-selected {
  border-color: var(--accent-primary);
  background: rgba(125, 211, 252, 0.1);
  box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.06);
}

.network-tag {
  color: var(--accent-muted);
  font-size: 0.38rem;
  letter-spacing: 0.08em;
}

.popup__info {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.43rem;
  line-height: 1.75;
  text-align: center;
}

@media (max-width: 768px) {
  .site-shell {
    max-width: 100%;
    padding: 10px;
  }

  .site-header {
    min-height: 72px;
    gap: 14px;
  }

  .brand {
    gap: 11px;
  }

  .brand__logo {
    width: 70px;
    height: 56px;
  }

  .brand__name {
    font-size: 0.78rem;
  }

  .social-icons {
    gap: 13px;
  }

  .divider {
    margin: 15px 0;
  }

  .connect-section {
    padding: 20px 10px 0;
  }

  .hero-title {
    margin-bottom: 15px;
    font-size: 1.5rem;
    line-height: 1.45;
  }

  .hero-subtitle {
    margin-bottom: 25px;
    font-size: 0.7rem;
    line-height: 1.65;
  }

  .wallet-button {
    width: 100%;
    max-width: 320px;
    min-height: 54px;
    padding: 14px 24px;
    font-size: 0.7rem;
  }

  .network-button {
    padding: 7px 20px;
    font-size: 0.62rem;
  }

  .hero-description {
    margin: 25px 0 0;
    font-size: 0.66rem;
  }

  .mobile-break {
    display: block;
  }

  .main-nav {
    margin: 15px 0;
  }

  .nav-tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    background-size: 100% 2px;
  }

  .nav-tab {
    min-width: 112px;
    flex: 1 1 calc(25% - 5px);
    padding: 12px 13px;
    font-size: 0.56rem;
    text-align: center;
  }

  .simple-page {
    padding: 30px 10px;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .page-subtitle {
    font-size: 0.62rem;
    line-height: 1.85;
  }

  .faq-section > h2 {
    margin-bottom: 20px;
    font-size: 1.2rem;
  }

  .faq-container {
    padding: 0 10px;
  }

  .faq-item {
    margin-bottom: 15px;
  }

  .faq-question {
    min-height: 54px;
    padding: 12px 15px;
    font-size: 0.58rem;
    line-height: 1.65;
  }

  .faq-answer {
    padding: 15px;
  }

  .faq-answer p {
    font-size: 0.54rem;
    line-height: 1.85;
  }

  .site-footer {
    margin-top: 30px;
    padding-top: 15px;
  }
}

@media (max-width: 480px) {
  .site-shell {
    padding: 8px;
  }

  .site-header {
    min-height: 64px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand__logo {
    width: 58px;
    height: 48px;
  }

  .brand__name {
    font-size: 0.62rem;
    letter-spacing: 0;
  }

  .social-icons {
    gap: 9px;
  }

  .social-icon {
    width: 1rem;
    height: 1rem;
  }

  .connect-section {
    padding: 17px 4px 0;
  }

  .hero-title {
    font-size: 1.14rem;
    letter-spacing: 0.04em;
  }

  .hero-subtitle {
    font-size: 0.57rem;
  }

  .wallet-button {
    max-width: 300px;
    padding: 12px 18px;
    font-size: 0.59rem;
  }

  .network-button {
    max-width: 100%;
    padding: 7px 13px;
    font-size: 0.53rem;
  }

  .status-text {
    font-size: 0.48rem;
  }

  .hero-description {
    font-size: 0.56rem;
    line-height: 1.8;
  }

  .wallet-notice {
    font-size: 0.43rem;
  }

  .nav-tab {
    min-width: calc(50% - 5px);
    flex-basis: calc(50% - 5px);
    padding: 11px 8px;
    font-size: 0.5rem;
  }

  .simple-page {
    padding: 25px 7px;
  }

  .page-title {
    font-size: 1.05rem;
  }

  .page-subtitle {
    font-size: 0.53rem;
    line-height: 1.85;
  }

  .faq-container {
    padding: 0 4px;
  }

  .faq-question {
    gap: 12px;
    font-size: 0.51rem;
  }

  .faq-answer p {
    font-size: 0.49rem;
  }

  .copyright {
    font-size: 0.43rem;
  }

  .popup {
    align-items: end;
    padding: 0;
  }

  .popup__content {
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px 18px max(24px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .popup__content h2 {
    font-size: 0.82rem;
  }

  .network-option {
    min-height: 64px;
    padding: 12px 14px;
    font-size: 0.52rem;
  }
}

@media (max-width: 350px) {
  .brand__logo {
    width: 50px;
  }

  .brand__name {
    font-size: 0.54rem;
  }

  .social-icons {
    gap: 6px;
  }

  .hero-title {
    font-size: 1rem;
  }

  .wallet-button {
    max-width: 284px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-particles {
    display: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --accent-border: #7dd3fc;
    --text-muted: #ffffff;
  }
}
