/* ===================================
   Generador QR — Tema Dark / Mint
   (paleta inspirada en portafolio: bg casi negro + acento menta neón)
   =================================== */

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

:root {
  --bg: #06070c;
  --bg-elevated: #0d0f18;
  --surface: #11131e;
  --surface-border: #1f2230;
  --surface-hover: #161925;
  --accent: #34f5c5;
  --accent-soft: #34f5c526;
  --accent-foreground: #04120d;
  --text-primary: #eef0f6;
  --text-secondary: #b7bbcc;
  --text-muted: #8b8fa3;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
  --transition: 0.2s ease;
  --font-display: 'Space Grotesk', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background glow blobs (sutil, un solo acento) ── */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  animation: float 14s ease-in-out infinite alternate;
}
.blob-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -140px; left: -140px;
  animation-duration: 16s;
}
.blob-2 {
  width: 420px; height: 420px;
  background: var(--accent);
  bottom: -120px; right: -120px;
  opacity: 0.08;
  animation-duration: 12s;
}
.blob-3 {
  width: 320px; height: 320px;
  background: var(--accent);
  top: 42%; left: 50%;
  opacity: 0.06;
  transform: translateX(-50%);
  animation-duration: 10s;
}
@keyframes float {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(30px) scale(1.06); }
}

/* ── Page layout ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 36px;
}
.logo-mark {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--accent-foreground);
  box-shadow: 0 4px 24px rgba(52, 245, 197, 0.35);
  flex-shrink: 0;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.2;
}
.subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* ── Main Card ── */
.main-card {
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ── URL Input Section ── */
.input-section {
  margin-bottom: 28px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.field-label i { color: var(--accent); }
.input-wrapper {
  display: flex;
  gap: 10px;
}
.input-wrapper input {
  flex: 1;
  padding: 13px 18px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrapper input::placeholder { color: var(--text-muted); }
.input-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
#btn-generate {
  padding: 13px 24px;
  background: var(--accent);
  color: var(--accent-foreground);
  border: none;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(52, 245, 197, 0.3);
}
#btn-generate:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(52, 245, 197, 0.45);
}
#btn-generate:active { transform: translateY(0); }

/* ── Two-column Editor ── */
.editor-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}
@media (max-width: 820px) {
  .editor-layout { grid-template-columns: 1fr; }
}

/* ── Customizer Panel ── */
.customizer-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.panel-title i { color: var(--accent); }

.option-group {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.option-row:last-child { margin-bottom: 0; }
.option-row label:not(.toggle) {
  color: var(--text-secondary);
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Color pickers */
.color-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
input[type="color"] {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 2px;
  background: transparent;
  outline: none;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}
.color-hex {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  min-width: 70px;
  width: 70px;
  padding: 4px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  outline: none;
  text-align: center;
  letter-spacing: 0.04em;
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}
.color-hex:focus {
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.color-hex::placeholder { color: var(--text-muted); opacity: 0.5; }

/* Selects */
select {
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  min-width: 140px;
  transition: border-color var(--transition);
}
select:focus { border-color: var(--accent); }
select option { background: var(--bg-elevated); }

/* Range sliders */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: var(--surface-border);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(52, 245, 197, 0.5);
  transition: transform var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.option-row label strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.small-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-mono);
  outline: none;
}
.small-input:focus { border-color: var(--accent); }
.small-input::placeholder { color: var(--text-muted); }

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--surface-border);
  border-radius: 24px;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: var(--text-primary);
  border-radius: 50%;
  transition: transform var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before {
  background: var(--accent-foreground);
  transform: translateX(18px);
}

/* Dot Style Grid */
.dot-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.dot-style-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition);
}
.dot-style-btn svg {
  width: 28px; height: 28px;
  fill: currentColor;
}
.dot-style-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-primary);
}
.dot-style-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(52, 245, 197, 0.25);
}

/* ── Preview Panel ── */
.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-actions {
  display: flex;
  gap: 10px;
}
.btn-primary, .btn-secondary {
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
  box-shadow: 0 4px 16px rgba(52, 245, 197, 0.3);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qr-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  min-height: 320px;
}
.qr-canvas-area {
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-canvas-area canvas,
.qr-canvas-area svg {
  border-radius: var(--radius-sm);
  max-width: 100%;
}
.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
}
.qr-placeholder i {
  font-size: 64px;
  opacity: 0.2;
}
.qr-placeholder p { font-size: 13px; }

/* Presets */
.presets-section {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.preset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
}
.preset-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-primary);
}
.preset-swatch {
  width: 16px; height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── SEO content: about + FAQ ── */
.seo-section {
  margin-top: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 28px;
}
.seo-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.seo-text {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.7;
  max-width: 760px;
  margin-bottom: 24px;
}
.seo-faq-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 4px 18px;
  transition: border-color var(--transition);
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  padding: 14px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  padding-bottom: 16px;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-border);
}
#sociales {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 10px;
  list-style: none;
}
#sociales a {
  color: var(--text-muted);
  font-size: 20px;
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}
#sociales a:hover { transform: scale(1.2); }
#gmail svg {
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter var(--transition), opacity var(--transition);
}
#gmail:hover svg {
  filter: grayscale(0);
  opacity: 1;
}
#github:hover    { color: #ffffff; }
#linkedin:hover  { color: #0a66c2; }
#instagram:hover { color: #e1306c; }
#autor {
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
}
#autor i { color: var(--accent); }
#autor-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
#autor-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Floating "made by" badge ── */
.made-by-badge {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-sans);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.made-by-badge strong {
  color: var(--text-primary);
  font-weight: 600;
  transition: color var(--transition);
}
.made-by-badge:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(52, 245, 197, 0.25);
}
.made-by-badge:hover strong { color: var(--accent); }
.made-by-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (max-width: 560px) {
  .made-by-badge {
    bottom: 14px;
    left: 14px;
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  z-index: 999;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { border-color: var(--accent); }
.toast.error   { border-color: #f87171; }
