:root {
  --void: #080808;
  --surface: #0d0d0d;
  --surface-2: #1a1a1a;
  --border: #222222;
  --border-strong: #2b2b2b;
  --text-1: #f0f0f0;
  --text-2: #999999;
  --text-3: #707070;
  --violet: #a93080;
  --violet-dim: #d12755;
  --flame: #fa8238;
  --green: #34d399;
  --amber: #fa8238;
  --gradient: linear-gradient(90deg, #a93080 0%, #d12755 35%, #f83427 68%, #fa8238 100%);
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* ============ RESET ============ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: none;
  scroll-behavior: smooth;
}

/* ============ BODY / FONDO ============ */

body {
  min-height: 100dvh;
  background-color: var(--void);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(169, 48, 128, .10), transparent 42%),
    radial-gradient(circle at 88% 84%, rgba(250, 130, 56, .08), transparent 45%),
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
  color: var(--text-1);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, var(--void) 92%);
  pointer-events: none;
}

/* ============ ACCESIBILIDAD: FOCO VISIBLE ============ */

a:focus-visible,
button:focus-visible,
.tab:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============ WINDOW SHELL ============ */

.window {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 2px 0 rgba(255, 255, 255, .02);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.dots { display: flex; gap: 6px; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }

.titlebar-path {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.titlebar-path .sep { opacity: .5; }
.titlebar-path b { color: var(--text-2); font-weight: 500; }

.titlebar-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--green);
}
.titlebar-status i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(52, 211, 153, .7);
}

.panel { padding: clamp(1.5rem, 5vw, 2.25rem); }

/* ============ HEADER ============ */

.header { margin-bottom: 1.5rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: .12em;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.eyebrow::before { content: "//"; color: var(--text-3); }

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 2rem);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: .55rem;
}
h1 .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--text-2);
  font-size: .92rem;
  line-height: 1.55;
  max-width: 42ch;
}

/* ============ DEVICE TABS ============ */

.tabstrip {
  display: flex;
  gap: 2px;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin: 1.5rem 0;
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem .75rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tab svg { width: 15px; height: 15px; flex-shrink: 0; }
.tab:hover { color: var(--text-2); }
.tab.active {
  background: var(--surface-2);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

/* ============ STEP LOG ============ */

.log {
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-3);
  letter-spacing: .03em;
}
.log-head .state { color: var(--amber); }

.step-list { list-style: none; }

.step {
  display: flex;
  gap: .85rem;
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  transition: background .15s ease;
}
.step:last-child { border-bottom: none; }
.step:hover { background: rgba(169, 48, 128, .045); }

.step-no {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-3);
  min-width: 1.6rem;
  padding-top: .15rem;
  transition: color .15s ease;
}
.step:hover .step-no { color: var(--violet); }

.step p {
  font-size: .87rem;
  color: var(--text-2);
  line-height: 1.5;
}

.highlight-text {
  color: var(--text-1);
  font-weight: 600;
  background: rgba(169, 48, 128, .10);
  padding: 0 .3rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .85em;
}

kbd {
  font-family: var(--font-mono);
  font-size: .78em;
  color: var(--text-1);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: .05rem .4rem;
}

.hidden { display: none !important; }

/* ============ ACTIONS ============ */

.actions { display: flex; gap: .7rem; margin-bottom: 1.25rem; }

.btn {
  height: 46px;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  flex: 1.6;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 22px rgba(210, 39, 85, .28), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(248, 52, 39, .34), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary.copied {
  background: linear-gradient(180deg, var(--green), #0f9d70);
  box-shadow: 0 8px 22px rgba(52, 211, 153, .28);
}

.btn-secondary {
  flex: 1;
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-2);
}
.btn-secondary:hover {
  color: var(--text-1);
  border-color: var(--violet);
  transform: translateY(-1px);
}

/* ============ TRUST FOOTER ============ */

.trust {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-3);
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}
.trust i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(52, 211, 153, .6); }
.trust b { color: var(--text-2); font-weight: 500; }

/* ============ TOAST ============ */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: .78rem;
  padding: .7rem 1.1rem;
  border-radius: 9px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  gap: .55rem;
  opacity: 0;
  transition: all .35s cubic-bezier(.16, 1, .3, 1);
  z-index: 50;
  width: max-content;
  max-width: 90vw;
}
.toast svg { width: 15px; height: 15px; color: var(--green); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ RESPONSIVE ============ */

@media (max-width: 420px) {
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}

@media (max-width: 360px) {
  .panel { padding: 1.25rem; }
  .window { border-radius: 12px; }
}

/* ============ REDUCIR ANIMACIONES ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Logo principal: SVG embebido sin romper el atributo src. */
.logo-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; overflow: hidden; }
.logo-icon img { width: 24px; height: 24px; display: block; object-fit: contain; }
