:root {
  --bg: #010101;
  --text: #e6e6e6;
  --muted: rgba(230, 230, 230, 0.56);
  --panel-border: transparent;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  overflow: hidden;
  font-weight: 400;
  user-select: none;
  -webkit-user-select: none;
}

button,
input {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: none;
  opacity: 0;
}

.app {
  position: relative;
  min-height: 100vh;
}

.scene-corner {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 4;
}

.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease,
    transform 0.8s ease;
  transform: translateY(8px);
}

.scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scene-intro {
  gap: 64px;
  text-align: center;
}

.brand-shell {
  max-width: 1120px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  font-size: 16px;
}

.type-title,
.info-modal h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.type-title {
  min-height: 1.2em;
  font-size: clamp(15px, 2.1vw, 28px);
  text-transform: none;
  white-space: nowrap;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.95em;
  margin-left: 0.08em;
  vertical-align: -0.08em;
  background: var(--text);
  animation: blink 1s step-end infinite;
}

.subtitle,
.form-copy,
.info-text,
.status-list {
  color: var(--muted);
}

.subtitle {
  max-width: 420px;
  margin: 22px auto 0;
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.7;
}

.intro-actions {
  display: grid;
  justify-items: center;
  gap: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-switcher__button {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(230, 230, 230, 0.42);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.lang-switcher__button:hover,
.lang-switcher__button.is-active {
  color: rgba(230, 230, 230, 0.88);
}

.primary-button,
.info-button,
.close-button {
  cursor: pointer;
  border: 0;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    opacity 0.25s ease;
}

.primary-button:hover,
.info-button:hover,
.close-button:hover {
  transform: translateY(-2px);
}

.primary-button {
  min-width: 320px;
  padding: 21px 32px;
  color: #111;
  background: #f4f4f4;
  border-radius: 16px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
  font-size: 18px;
}

.primary-button:disabled {
  opacity: 0.36;
  cursor: default;
  transform: none;
}

.primary-button.is-pending {
  opacity: 1;
  cursor: progress;
}

.primary-button.is-pending span {
  opacity: 0.92;
}

.scene-network {
  background: #000;
  overflow: hidden;
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.network-overlay {
  position: relative;
  z-index: 1;
  width: min(100vw, 1400px);
  height: min(100vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: var(--shadow);
}

.info-modal h2 {
  font-size: clamp(34px, 5vw, 60px);
}

.scene-form {
  background: #010101;
}

.panel {
  position: relative;
  width: min(94vw, 760px);
  padding: clamp(28px, 4vw, 48px) clamp(18px, 4vw, 32px);
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: var(--shadow);
  text-align: center;
}

.activation-view {
  transition:
    filter 0.45s ease,
    opacity 0.45s ease;
}

.panel.is-loading .activation-view {
  filter: blur(14px);
  opacity: 0.18;
  pointer-events: none;
}

.panel.is-success .activation-view {
  opacity: 0;
  pointer-events: none;
}

.info-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 38px;
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 8;
}

.info-hint {
  position: fixed;
  top: 86px;
  right: 128px;
  width: 240px;
  z-index: 9;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.info-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.info-hint.is-erasing {
  opacity: 0;
  transform: translateY(-4px);
}

.info-hint__text {
  display: block;
  max-width: 240px;
  color: #ff4b4b;
  font-family: "Caveat", "Manrope", cursive;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: left;
  white-space: pre-line;
  text-shadow: 0 0 18px rgba(255, 75, 75, 0.1);
  opacity: 0;
  transform: rotate(-2deg) translateY(-2px);
}

.info-hint.is-visible .info-hint__text {
  animation: markerText 0.42s ease forwards 0.15s;
}

.info-hint.is-erasing .info-hint__text {
  animation: markerEraseText 0.42s ease forwards;
}

.form-copy {
  max-width: 520px;
  min-height: 3.4em;
  margin: 18px auto 40px;
  line-height: 1.7;
  font-size: clamp(17px, 2.1vw, 22px);
}

.token-form {
  display: grid;
  gap: 20px;
  max-width: 620px;
  margin: 0 auto;
}

.token-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 82px;
  width: min(100%, 700px);
  margin: 0 auto;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
}

.token-prompt {
  color: var(--text);
  font-size: 26px;
  font-weight: 400;
}

.token-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  text-align: left;
  font-family: "SFMono-Regular", "SF Mono", "Menlo", "Consolas", monospace;
  font-size: clamp(12px, 1.2vw, 17px);
  letter-spacing: 0;
  line-height: 1.2;
}

.token-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.token-caret {
  width: 2px;
  height: 22px;
  flex: 0 0 auto;
  background: var(--text);
  animation: blink 1s step-end infinite;
}

.verify-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.verify-indicator.is-visible {
  opacity: 1;
}

.verify-indicator.is-checking {
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.76);
  animation: pulse 0.9s ease-in-out infinite;
}

.verify-indicator.is-valid {
  opacity: 1;
  background: #6dff8d;
  transform: scale(1);
}

.verify-indicator.is-invalid {
  opacity: 0.82;
  background: #ff5555;
  transform: scale(1);
}

.token-form.is-invalid .token-prompt,
.token-form.is-invalid .token-input {
  color: #ff5555;
}

.token-form.is-valid .token-prompt,
.token-form.is-valid .token-input {
  color: #6dff8d;
}

.token-form.is-invalid .token-caret {
  background-color: #ff5555;
}

.token-form.is-valid .token-caret {
  background-color: #6dff8d;
}

.token-form.is-invalid {
  animation: signalError 0.36s linear 2;
}

.token-form.is-invalid .token-input::placeholder {
  color: rgba(255, 85, 85, 0.5);
}

.token-form.is-valid .token-input::placeholder {
  color: rgba(109, 255, 141, 0.45);
}

.loading-state,
.success-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.loading-state {
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.panel.is-loading .loading-state {
  opacity: 1;
}

.panel.is-success .success-state {
  opacity: 1;
  pointer-events: auto;
}

.loading-ring {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loading-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.success-state {
  gap: 10px;
}

.success-avatar {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.success-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.success-username {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.04em;
}

.success-status {
  margin: -6px 0 18px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.success-actions {
  display: grid;
  justify-items: center;
}

.success-link {
  text-decoration: none;
}

.info-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
  z-index: 10;
}

.info-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.info-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
}

.info-modal__content {
  position: relative;
  z-index: 1;
  width: min(100%, 1100px);
  min-height: min(84vh, 820px);
  padding: clamp(28px, 4vw, 48px);
  border-radius: 0;
  border: 0;
  background: rgba(5, 5, 5, 0.98);
  box-shadow: var(--shadow);
}

.close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font-size: 36px;
  line-height: 1;
}

.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;
}

.info-text {
  max-width: 360px;
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.7;
}

.phone-demo {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(260px, 380px);
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 80px);
  min-height: 70vh;
}

.phone-frame {
  position: relative;
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 14px;
  border-radius: 42px;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  min-height: 680px;
  border-radius: 30px;
  background: #000;
  overflow: hidden;
}

.phone-topbar {
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.chat-flow {
  display: grid;
  gap: 12px;
  padding: 18px 18px 26px;
}

.message {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.message-out {
  justify-self: end;
  border-radius: 18px 18px 6px 18px;
  background: #f4f4f4;
  color: #111;
}

.message-accent {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
}

.phone-copy {
  max-width: 380px;
}

strong {
  color: var(--text);
}

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

@keyframes pulse {
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

@keyframes signalError {
  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@keyframes markerText {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }

  100% {
    opacity: 1;
    transform: rotate(-2deg) translateY(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes markerEraseText {
  0% {
    opacity: 1;
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }

  100% {
    opacity: 0;
    filter: blur(6px);
    clip-path: inset(0 100% 0 0);
  }
}

@keyframes rknGlitch {
  0%,
  100% {
    opacity: 1;
    transform: translateX(0);
  }

  20% {
    opacity: 0.35;
    transform: translateX(-2px);
  }

  40% {
    opacity: 1;
    transform: translateX(2px);
  }

  60% {
    opacity: 0.4;
    transform: translateX(-1px);
  }
}

@media (max-width: 720px) {
  .scene {
    padding: 24px 18px;
  }

  .scene-corner,
  .panel-head {
    top: 18px;
    right: 18px;
  }

  .scene-corner {
    left: auto;
  }

  .scene-intro,
  .scene-form {
    min-height: 100vh;
  }

  .scene-intro {
    display: grid;
    place-items: center;
  }

  .panel {
    width: 100%;
    min-height: calc(100vh - 48px);
    display: grid;
    place-items: center;
  }

  .activation-view {
    width: 100%;
    display: grid;
    justify-items: center;
  }

  .form-copy {
    text-align: center;
  }

  .token-form {
    width: 100%;
    justify-items: center;
  }

  .success-state {
    align-content: start;
    padding-top: 18vh;
  }

  .success-state .primary-button {
    margin-top: 28px;
  }

  .info-hint {
    top: 52px;
    right: 74px;
    width: 170px;
  }

  .info-hint__text {
    max-width: 170px;
    font-size: 23px;
  }
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .scene {
    padding: 24px 18px;
  }

  .screen-shell,
  .panel,
  .info-modal__content {
    min-height: 100vh;
  }

  .screen-topbar {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
  }

  .type-title {
    white-space: nowrap;
    font-size: clamp(11px, 3.2vw, 14px);
    line-height: 1.1;
  }

  .subtitle {
    max-width: 300px;
    font-size: 16px;
    line-height: 1.5;
  }

  .network-node {
    gap: 10px;
  }

  .network-badge {
    font-size: 12px;
    padding: 5px 10px 6px;
    letter-spacing: 0.12em;
  }

  .network-detail {
    margin-top: 7px;
    font-size: 10px;
  }

  .network-node--social {
    top: 25%;
    left: 16%;
  }

  .network-node--geo {
    top: 50%;
    left: 50%;
  }

  .network-node--device {
    left: 18%;
    bottom: 20%;
  }

  .primary-button,
  .intro-button {
    width: 100%;
  }

  .token-input {
    width: min(100%, 100%);
    font-size: 11px;
  }

  .token-prompt {
    font-size: 24px;
  }

  .token-caret {
    height: 18px;
  }

  .form-copy {
    max-width: 320px;
    min-height: 4.8em;
    margin-bottom: 30px;
    font-size: 16px;
  }

  .info-button {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }

  .phone-demo {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
  }

  .phone-frame {
    display: none;
  }

  .phone-copy {
    max-width: 100%;
    text-align: left;
  }

  .primary-button {
    min-width: 0;
    padding: 18px 22px;
    border-radius: 14px;
    font-size: 17px;
  }

  .loading-copy {
    font-size: 14px;
  }

  .success-username {
    font-size: 16px;
  }

  .info-modal__content {
    width: 100%;
    padding-top: 84px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .close-button {
    position: fixed;
    top: 16px;
    right: 16px;
  }
}

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

@keyframes networkReveal {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes networkDrift {
  50% {
    transform: translate3d(0, -14px, 0);
  }
}

@keyframes orbFloat {
  50% {
    transform: translate3d(0, -18px, 0);
  }
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .scene {
    padding: 24px 18px;
  }

  .scene-intro {
    gap: 42px;
  }

  .panel-head {
    align-items: center;
  }

  .lang-switcher__button {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .primary-button,
  .intro-button {
    width: 100%;
  }

  .type-title {
    white-space: nowrap;
    font-size: clamp(11px, 3.2vw, 14px);
    line-height: 1.1;
  }

  .subtitle {
    max-width: 300px;
    font-size: 16px;
    line-height: 1.5;
  }

  .network-overlay h2,
  .info-modal h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .network-node {
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .network-node--telegram {
    top: 28%;
    left: 12%;
  }

  .network-node--server {
    top: 24%;
    right: 10%;
  }

  .network-node--rkn {
    left: 18%;
    bottom: 28%;
  }

  .eyebrow {
    font-size: 14px;
  }

  .network-overlay {
    width: 100%;
    height: 100%;
  }

  .network-label {
    gap: 10px;
  }

  .network-label--telegram {
    top: 23%;
    left: 10%;
    right: auto;
  }

  .network-label--osint {
    top: 18%;
    right: 8%;
  }

  .network-label--vpn {
    top: 47%;
    right: 10%;
  }

  .network-label--rkn {
    left: 14%;
    bottom: 27%;
  }

  .network-label--device {
    display: none;
  }

  .network-tag {
    font-size: 12px;
    letter-spacing: 0.12em;
    padding: 5px 10px 6px;
  }

  .network-meta {
    margin-top: 8px;
    font-size: 10px;
  }

  .token-input {
    font-size: 11px;
  }

  .token-prompt {
    font-size: 24px;
  }

  .token-caret {
    height: 18px;
  }

  .form-copy {
    max-width: 320px;
    min-height: 4.8em;
    margin-bottom: 30px;
    font-size: 16px;
  }

  .panel-head {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 8;
    margin-bottom: 0;
  }

  .info-button {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }

  .success-avatar {
    width: 84px;
    height: 84px;
  }

  .phone-demo {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
  }

  .phone-frame {
    display: none;
  }

  .phone-copy {
    max-width: 100%;
    text-align: left;
  }

  .primary-button {
    min-width: 0;
    padding: 18px 22px;
    border-radius: 14px;
    font-size: 17px;
  }

  .token-line {
    min-height: 74px;
    padding: 16px 18px;
    border-radius: 18px;
  }

  .loading-copy {
    font-size: 14px;
  }

  .success-username {
    font-size: 16px;
  }

  .success-copy {
    font-size: 14px;
  }

  .info-modal__content {
    min-height: 100vh;
    width: 100%;
    padding-top: 84px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .close-button {
    position: fixed;
    top: 16px;
    right: 16px;
  }
}
