body {
  margin: 0;
}

.root {
  --g: #00ff66;
  --g-dim: #00b347;
  --g-faint: rgba(0, 255, 102, 0.12);
  --red: #ff3b5c;
  --amber: #ffcc00;
  --bg: #020403;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--g);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
}

.rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
}

.scan {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.28) 3px);
}

.scan::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.75) 100%);
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--g-dim);
}

.top a {
  color: var(--g-dim);
  text-decoration: none;
  border-bottom: 1px dashed var(--g-dim);
}

.title {
  position: relative;
  margin: 0 0 6px;
  font-size: clamp(26px, 6vw, 44px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.75), 0 0 22px rgba(0, 255, 102, 0.35);
  animation: flicker 4s infinite;
}

.title::before,
.title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.title::before {
  color: #00e5ff;
  transform: translate(-2px, 0);
  clip-path: inset(0 0 60% 0);
  opacity: 0.55;
  animation: glitch 3.2s infinite steps(1);
}

.title::after {
  color: var(--red);
  transform: translate(2px, 0);
  clip-path: inset(55% 0 0 0);
  opacity: 0.5;
  animation: glitch 2.7s infinite reverse steps(1);
}

.subtitle {
  margin: 0 0 22px;
  color: var(--g-dim);
}

.cursor::after {
  content: '█';
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

.log {
  margin-bottom: 22px;
  padding: 12px 14px;
  min-height: 96px;
  border: 1px solid var(--g-faint);
  background: rgba(0, 20, 8, 0.55);
  font-size: 12px;
  color: var(--g-dim);
  white-space: pre-wrap;
  word-break: break-word;
}

.log b {
  color: var(--g);
  font-weight: 600;
}

.step {
  position: relative;
  margin-bottom: 16px;
  padding: 16px 16px 18px;
  border: 1px solid rgba(0, 255, 102, 0.35);
  background: rgba(0, 12, 5, 0.82);
  box-shadow: inset 0 0 24px rgba(0, 255, 102, 0.05), 0 0 18px rgba(0, 255, 102, 0.06);
  transition: opacity 0.3s, border-color 0.3s;
}

.step.locked {
  opacity: 0.38;
  border-color: rgba(0, 255, 102, 0.15);
}

.step.done {
  border-color: rgba(0, 255, 102, 0.65);
}

.stepHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--g-dim);
}

.stepTitle {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--g);
}

.muted {
  color: var(--g-dim);
}

.tag {
  padding: 1px 8px;
  border: 1px solid currentColor;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.ok {
  color: var(--g);
}

.wait {
  color: var(--amber);
}

.err {
  color: var(--red);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(0, 255, 102, 0.45);
  background: #000;
  color: var(--g);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  outline: none;
  caret-color: var(--g);
}

.input:focus {
  border-color: var(--g);
  box-shadow: 0 0 0 1px var(--g), 0 0 14px rgba(0, 255, 102, 0.35);
}

.input::placeholder {
  color: rgba(0, 255, 102, 0.3);
  letter-spacing: 0.08em;
  text-transform: none;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--g);
  background: transparent;
  color: var(--g);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn:hover:not(:disabled) {
  background: var(--g);
  color: #000;
  box-shadow: 0 0 18px rgba(0, 255, 102, 0.6);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btnSolid {
  background: var(--g);
  color: #000;
}

.btnSolid:hover:not(:disabled) {
  background: #5dff9a;
}

.btnWide {
  width: 100%;
}

.btnRed {
  border-color: var(--red);
  color: var(--red);
}

.btnRed:hover:not(:disabled) {
  background: var(--red);
  color: #000;
  box-shadow: 0 0 18px rgba(255, 59, 92, 0.55);
}

.or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 2px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(0, 255, 102, 0.45);
}

.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 255, 102, 0.2);
}

.note {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 2px solid var(--amber);
  background: rgba(255, 204, 0, 0.06);
  color: var(--amber);
  font-size: 12px;
}

.codeBox {
  margin-top: 14px;
  padding: 18px 12px;
  border: 1px dashed var(--g);
  background: #000;
  text-align: center;
}

.codeLabel {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--g-dim);
}

.code {
  margin: 8px 0 12px;
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 800;
  letter-spacing: 0.14em;
  word-break: break-all;
  text-shadow: 0 0 10px rgba(0, 255, 102, 0.8);
}

.sync {
  margin-top: 18px;
}

.syncHead {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.bar {
  position: relative;
  height: 12px;
  border: 1px solid rgba(0, 255, 102, 0.5);
  background: repeating-linear-gradient(90deg, rgba(0, 255, 102, 0.06) 0 8px, transparent 8px 10px);
  overflow: hidden;
}

.barFill {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(90deg, var(--g) 0 8px, rgba(0, 255, 102, 0.55) 8px 10px);
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.7);
  transition: width 2.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.syncStatus {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--g-dim);
}

.ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 22px 0 6px;
}

.ringBox {
  position: relative;
  width: min(250px, 72vw);
  aspect-ratio: 1;
  filter: drop-shadow(0 0 14px currentColor);
  transition: color 0.6s;
}

.ringSvg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px currentColor);
}

.ringSpin {
  animation: ringSpin 1.6s linear infinite;
}

.ringArc {
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.ringCenter {
  position: absolute;
  inset: 18%;
  display: grid;
  place-items: center;
  text-align: center;
}

.ringText {
  font-size: 15px;
  font-weight: 700;
  color: #b8ffd2;
  letter-spacing: 0.04em;
}

.ringCode {
  font-weight: 800;
  letter-spacing: 0.04em;
  word-break: break-all;
  line-height: 1.1;
  color: currentColor;
  text-shadow: 0 0 12px currentColor;
}

.ringLabel {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--g-dim);
}

.ringNum {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 800;
  color: #8affb5;
  text-shadow: 0 0 10px rgba(0, 255, 102, 0.6);
}

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

.history {
  margin-top: 16px;
  font-size: 12px;
}

.history li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0, 255, 102, 0.15);
}

.history ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer {
  margin-top: 26px;
  font-size: 11px;
  color: rgba(0, 255, 102, 0.45);
  text-align: center;
}

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

@keyframes flicker {
  0%,
  96%,
  100% {
    opacity: 1;
  }
  97% {
    opacity: 0.6;
  }
  98% {
    opacity: 1;
  }
  99% {
    opacity: 0.75;
  }
}

@keyframes glitch {
  0%,
  88%,
  100% {
    transform: translate(0, 0);
  }
  90% {
    transform: translate(-3px, 1px);
  }
  93% {
    transform: translate(3px, -1px);
  }
  96% {
    transform: translate(-1px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .title,
  .title::before,
  .title::after,
  .cursor::after {
    animation: none;
  }
  .barFill {
    transition: none;
  }
}

/* ---------- дополнения отдельного сайта ---------- */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.tabs {
  display: flex;
  gap: 0;
  margin: 4px 0 2px;
  border-bottom: 1px solid rgba(0, 255, 102, 0.25);
}

.tab {
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--g-dim);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.tab.active {
  color: var(--g);
  border-bottom-color: var(--g);
}

.input.plain {
  letter-spacing: 0.04em;
  text-transform: none;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10;
  max-width: min(92vw, 520px);
  padding: 10px 14px;
  border: 1px solid var(--g);
  background: #000;
  color: var(--g);
  font-size: 13px;
  transform: translateX(-50%);
  box-shadow: 0 0 18px rgba(0, 255, 102, 0.35);
}

.toast.error {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 18px rgba(255, 59, 92, 0.35);
}

.stack .input {
  flex: none;
}
