:root{
  /* ---- Dark theme (default) ---- */
  --bg: #0a0d13;
  --bg-elevated: #10141d;
  --bg-card: #141925;
  --bg-card-hover: #1a2130;
  --border: #232b3a;
  --border-strong: #34405a;
  --text: #eef0f4;
  --text-dim: #9aa3b5;
  --text-faint: #5c6579;

  --ember-1: #ff6b35;
  --ember-2: #e63946;
  --cyan: #00d9c0;
  --gold: #ffc857;

  --accent-gradient: linear-gradient(135deg, var(--ember-1), var(--ember-2));
  --accent-gradient-soft: linear-gradient(135deg, rgba(255,107,53,.16), rgba(230,57,70,.10));

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.35);
  --shadow-glow: 0 0 0 1px rgba(255,107,53,.25), 0 0 32px rgba(255,107,53,.18);

  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  color-scheme: dark;
}

html[data-theme="light"]{
  --bg: #f5f3ee;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #e91e63;
  --border: #e4ddcf;
  --border-strong: #d3c9b4;
  --text: #1c1a17;
  --text-dim: #6b6255;
  --text-faint: #948a78;

  --shadow-1: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 20px rgba(60,45,20,.08);
  --shadow-glow: 0 0 0 1px rgba(230,57,70,.18), 0 0 28px rgba(255,107,53,.14);
  color-scheme: light;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,h2,h3{ font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; margin: 0 0 .5em; color: var(--text); }
h1{ font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; text-transform: uppercase; }
h2.section-title{ font-size: clamp(1.3rem, 3vw, 1.7rem); text-transform: uppercase; display:flex; align-items:center; gap:.5em; }
h2{ font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3{ font-size: 1.15rem; }
p{ margin: 0 0 1em; color: var(--text-dim); }
a{ color: inherit; }
code{ font-family: var(--font-mono); background: var(--bg-elevated); border:1px solid var(--border); padding: .15em .5em; border-radius: 6px; font-size: .85em; color: var(--cyan); }

.container{ max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.text-accent{ background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.skip-link{
  position: absolute; left: -999px; top: 0; background: var(--ember-1); color:#fff;
  padding: .6em 1em; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

/* ---------- Buttons / inputs ---------- */
button{ font-family: inherit; cursor: pointer; }
:focus-visible{ outline: 2px solid var(--cyan); outline-offset: 2px; }

.btn{
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  padding: .65em 1.2em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .92rem;
  display: inline-flex; align-items: center; gap: .5em;
}
.btn:hover{ transform: translateY(-1px); background: var(--bg-card-hover); }
.btn:active{ transform: translateY(0); }
.btn-primary{
  background: var(--accent-gradient); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(230,57,70,.28);
}
.btn-primary:hover{ box-shadow: 0 8px 22px rgba(230,57,70,.4); }
.btn-ghost{ background: transparent; }

.icon-btn{
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-card);
  color: var(--text); font-size: 1.1rem; transition: background .2s ease, transform .15s ease;
}
.icon-btn:hover{ background: var(--bg-card-hover); transform: translateY(-1px); }

.chip{
  border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-dim);
  padding: .4em .9em; border-radius: 999px; font-size: .82rem; font-weight: 600;
  transition: all .15s ease; white-space: nowrap;
}
.chip:hover{ color: var(--text); border-color: var(--ember-1); background: var(--accent-gradient-soft); }

input[type="text"], select{
  font-family: inherit; font-size: 1rem; color: var(--text); background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .8em 1em;
}
input[type="text"]:focus, select:focus{ border-color: var(--ember-1); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  max-width: 1200px; margin: 0 auto; padding: 12px 15px;
  display: flex; align-items: center; gap: 20px;
}
.logo{ display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; }
.logo-mark{
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  background: var(--accent-gradient); color: #fff; padding: .3em .6em; border-radius: 6px;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
}
.logo-text{ font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; }
.logo-text strong{ color: var(--ember-1); }

.tab-nav{ display: flex; gap: 4px; background: var(--bg-card); border:1px solid var(--border); padding: 4px; border-radius: 999px; }
.tab-nav a{text-decoration: none;}
.tab-nav button{text-decoration: none; border: none; border: none; background: transparent; color: var(--text-dim); font-family: var(--font-display);
  font-weight: 600; font-size: .88rem; padding: 10px 5px; border-radius: 999px;
  display: flex; align-items: center; gap: .4em; transition: all .2s ease; text-transform: uppercase;}
.tab-nav2{
      display: flex !important;
    gap: 4px;
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 999px;
    margin: 10px auto;
    justify-content: center;
    width: fit-content;
}
.tab-btn{
  border: none; background: transparent; color: var(--text-dim); font-family: var(--font-display);
  font-weight: 600; font-size: .88rem; padding: 10px 5px; border-radius: 999px;
  display: flex; align-items: center; gap: .4em; transition: all .2s ease; text-transform: uppercase;
}
.tab-btn:hover{ color: var(--text); }
.tab-btn.is-active{ background: var(--accent-gradient); color: #fff; box-shadow: 0 4px 14px rgba(230,57,70,.3); }
.tab-icon{ font-size: .95em; }

.theme-toggle{
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--bg-card); display: flex; align-items: center; justify-content: center; position: relative;
}
.theme-toggle svg{ width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; position: absolute; transition: opacity .2s ease, transform .3s ease; }
.icon-moon{ opacity: 1; transform: scale(1); }
.icon-sun{ opacity: 0; transform: scale(.5) rotate(-90deg); }
html[data-theme="light"] .icon-moon{ opacity: 0; transform: scale(.5) rotate(90deg); }
html[data-theme="light"] .icon-sun{ opacity: 1; transform: scale(1) rotate(0); }

.mobile-menu-btn{ display: none; width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-card); flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.mobile-menu-btn span{ width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

.mobile-tab-nav{ display: none; flex-direction: column; gap: 6px; padding: 10px 16px 16px; border-top: 1px solid var(--border); }
.mobile-tab-nav .tab-btn{ justify-content: flex-start; width: 100%; text-transform: none; font-size: .95rem; padding: .7em 1em; }

/* =========================================================
   TABS / PANELS
   ========================================================= */
.tab-panel{ display: none; animation: fadeSlideIn .35s ease; }
.tab-panel.is-active{ display: block; }
@keyframes fadeSlideIn{ from{ opacity: 0; transform: translateY(10px); } to{ opacity: 1; transform: translateY(0); } }

.page-header{ padding: 48px 20px 20px; text-align: center; }
.page-header .hero-sub{ max-width: 560px; margin: 0 auto; }

.eyebrow{
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: .6em;
}
.hero-sub{ font-size: 1.05rem; max-width: 620px; }

/* =========================================================
   HERO / GENERATOR CARD
   ========================================================= */
.hero{ position: relative; padding: 56px 0 40px; overflow: hidden; text-align: center; }
.hero-bg{
  position: absolute; inset: -20% -10% auto -10%; height: 480px; z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 30% 0%, rgba(255,107,53,.16), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(0,217,192,.10), transparent 60%);
  filter: blur(10px);
}
.hero-inner{ position: relative; }

.generator-card{
  position: relative; max-width: 640px; margin: 36px auto 0; text-align: left;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 26px 22px; box-shadow: var(--shadow-1);
}
.id-card-corner{ position: absolute; width: 22px; height: 22px; border: 2px solid var(--ember-1); opacity: .7; }
.id-card-corner.tl{ top: -1px; left: -1px; border-right: none; border-bottom: none; border-radius: var(--radius-lg) 0 0 0; }
.id-card-corner.tr{ top: -1px; right: -1px; border-left: none; border-bottom: none; border-radius: 0 var(--radius-lg) 0 0; }
.id-card-corner.bl{ bottom: -1px; left: -1px; border-right: none; border-top: none; border-radius: 0 0 0 var(--radius-lg); }
.id-card-corner.br{ bottom: -1px; right: -1px; border-left: none; border-top: none; border-radius: 0 0 var(--radius-lg) 0; }

.field-label{ display: block; font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: .5em; }
.input-row{ display: flex; gap: 8px; flex-wrap: wrap; }
.input-row input{ flex: 1; font-size: 1.1rem; font-weight: 600; }

.counter-row{ display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.length-meter{ flex: 1; height: 6px; background: var(--bg-elevated); border-radius: 999px; position: relative; overflow: hidden; border: 1px solid var(--border); }
.length-meter-fill{ height: 100%; width: 0%; background: var(--accent-gradient); border-radius: 999px; transition: width .2s ease, background .2s ease; }
.length-meter-fill.is-over{ background: linear-gradient(135deg,#ff3b3b,#c1121f); }
.counter-text{ font-family: var(--font-mono); font-size: .78rem; color: var(--text-faint); white-space: nowrap; }

.preview-label{ font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin: 18px 0 8px; }
.live-preview{
  min-height: 56px; display: flex; align-items: center; padding: 12px 16px;
  background: var(--bg-elevated); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 1.25rem; word-break: break-all;
}
.live-preview .ghost{ color: var(--text-faint); font-size: .9rem; font-family: var(--font-body); }

.quick-tools{ display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.quick-tools-label{ font-size: .78rem; color: var(--text-faint); margin-right: 4px; }

/* =========================================================
   RESULTS GRID
   ========================================================= */
.results-toolbar{ display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 40px 0 18px; }
.toolbar-actions{ display: flex; gap: 10px; }
.count-badge{ font-family: var(--font-mono); font-size: .7rem; background: var(--bg-card); border: 1px solid var(--border-strong); padding: .15em .55em; border-radius: 999px; color: var(--cyan); }

.results-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 40px; }
.result-card{
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s ease, transform .15s ease, box-shadow .2s ease;
  animation: popIn .3s ease backwards;
}
.result-card:hover{ border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-1); }
@keyframes popIn{ from{ opacity: 0; transform: scale(.94); } to{ opacity: 1; transform: scale(1); } }

.result-style-name{ font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.result-text{ font-size: 1.15rem; word-break: break-all; min-height: 1.4em; line-height: 1.3; }
.result-actions{ display: flex; gap: 8px; margin-top: auto; }
.result-actions .btn{ flex: 1; justify-content: center; padding: .5em .8em; font-size: .82rem; }
.fav-btn.is-fav{ color: var(--gold); border-color: var(--gold); }

.panel-block{ margin: 40px 0; }
.panel-sub{ margin-top: -8px; }
.chips-row{ display: flex; flex-wrap: wrap; gap: 8px; }
.chips-row .chip{ cursor: pointer; }

/* =========================================================
   SEO CONTENT / FAQ
   ========================================================= */
.link {
    display: block;
    margin: 5px auto;
}
.link a {
    text-decoration: none;
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    color: var(--text-dim);
    padding: .4em .9em;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    transition: all .15s ease;
}
   .mainimg {
    display: block;
    margin: 10px auto;
    width: 90%;
    border: 1px solid #d5d5d5;
    border-radius: 10px;
}
.seo-content{ margin: 56px auto 0; max-width: 780px; padding-top: 20px; border-top: 1px solid var(--border); }
.lead-text{ font-size: 1.08rem; color: var(--text); }
.seo-content h2{ margin-top: 1.6em; }

.faq-section{ max-width: 780px; margin: 20px auto 60px; }
.faq-list{ display: flex; flex-direction: column; gap: 10px; }
.faq-item{ background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px 18px; }
.faq-item summary{ cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-size: 1.02rem; }
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-item summary::after{ content: '+'; font-size: 1.4rem; color: var(--ember-1); margin-left: 12px; transition: transform .2s ease; }
.faq-item[open] summary::after{ transform: rotate(45deg); }
.faq-item p{ padding-bottom: 16px; margin: 0; }

/* =========================================================
   INVISIBLE SPACE TAB
   ========================================================= */
.invisible-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; margin-top: 20px; }
.invisible-card{ background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; text-align: center; }
.invisible-preview{ font-family: var(--font-mono); font-size: 1.3rem; background: var(--bg-elevated); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px; letter-spacing: .1em; }
.invisible-preview .marker{ color: var(--text-faint); }
.invisible-card code{ display: inline-block; margin: 6px 0 10px; }

.mini-builder{ display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.mini-builder input{ flex: 2; min-width: 180px; }
.mini-builder select{ flex: 1; min-width: 160px; }

.steps-list{ padding-left: 1.2em; color: var(--text-dim); }
.steps-list li{ margin-bottom: .6em; }

/* =========================================================
   SYMBOLS TAB
   ========================================================= */
.category-tabs{ display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 20px; }
.category-tab{
  border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-dim);
  padding: .5em 1.1em; border-radius: 999px; font-size: .85rem; font-weight: 600; transition: all .15s ease;
}
.category-tab.is-active{ background: var(--accent-gradient); color: #fff; border-color: transparent; }

.symbol-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(76px,1fr)); gap: 10px; margin-bottom: 60px; }
.symbol-tile{
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all .15s ease; position: relative;
}
.symbol-tile:hover{ border-color: var(--ember-1); background: var(--accent-gradient-soft); transform: translateY(-2px) scale(1.04); }
.symbol-tile.copied::after{
  content: '✓ Copiado'; position: absolute; inset: auto 0 -26px 0; text-align: center; font-size: .65rem;
  font-family: var(--font-mono); color: var(--cyan);
}

/* =========================================================
   PRO NAMES TAB
   ========================================================= */
.pro-toolbar{ margin: 4px 0 20px; }
.pro-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 12px; margin-bottom: 60px; }
.pro-card{
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; animation: popIn .3s ease backwards;
}
.pro-card-text{ font-size: 1.1rem; word-break: break-all; }
.pro-card-tag{ font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; color: var(--cyan); letter-spacing: .06em; }

/* =========================================================
   SIDE DRAWER (favoritos / recientes)
   ========================================================= */
.side-drawer{
  position: fixed; top: 0; right: -420px; width: min(400px, 92vw); height: 100%; background: var(--bg-elevated);
  border-left: 1px solid var(--border); z-index: 200; transition: right .3s ease; display: flex; flex-direction: column;
  box-shadow: -20px 0 40px rgba(0,0,0,.3);
}
.side-drawer.is-open{ right: 0; }
.side-drawer-header{ display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.side-drawer-header h2{ margin: 0; font-size: 1.1rem; }
.side-drawer-body{ padding: 16px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.drawer-item{ display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.drawer-item span{ word-break: break-all; font-size: .95rem; }
.drawer-empty{ color: var(--text-faint); text-align: center; padding: 40px 10px; font-size: .9rem; }

.drawer-overlay{ position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 190; }
.drawer-overlay.is-open{ opacity: 1; pointer-events: auto; }

/* =========================================================
   TOAST
   ========================================================= */
.toast{
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 300;
  background: var(--bg-card); border: 1px solid var(--border-strong); color: var(--text);
  padding: .8em 1.3em; border-radius: 999px; font-size: .9rem; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: all .28s cubic-bezier(.2,.9,.3,1.2);
  display: flex; align-items: center; gap: .5em;
}
.toast.is-visible{ opacity: 1; transform: translate(-50%, 0); }
.toast::before{ content: '✓'; color: var(--cyan); font-weight: 800; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{ border-top: 1px solid var(--border); padding: 30px 0 60px; margin-top: 40px; }
.footer-inner p{ font-size: .82rem; color: var(--text-faint); margin: 0 0 .4em; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px){
    .tab-nav2{ 
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 999px;
    margin: 10px auto;
    justify-content: center;
    width: fit-content;
  }
  .tab-nav{ display: none; }
  .mobile-menu-btn{ display: flex; }
  .mobile-tab-nav.is-open{ display: flex; }
}

@media (max-width: 560px){
  .header-inner{ padding: 10px 14px; }
  .logo-text{ font-size: .95rem; }
  .hero{ padding: 32px 0 24px; }
  .generator-card{ padding: 20px 16px 16px; margin-left: 12px; margin-right: 12px; }
  .quick-tools{ gap: 6px; }
  .results-toolbar{ flex-direction: column; align-items: flex-start; }
  .mini-builder{ flex-direction: column; }
  .mini-builder input, .mini-builder select{ width: 100%; }
  .symbol-grid{ grid-template-columns: repeat(auto-fill, minmax(60px,1fr)); }
}
