/* style.css — HashtagLab: tema oscuro vibrante social */
:root {
  --bg: #0b0914;
  --bg2: #13101f;
  --card: #1a1528;
  --linea: rgba(255, 255, 255, .08);
  --texto: #f3f1fa;
  --texto2: #9d96b8;
  --rosa: #ff4d8d;
  --violeta: #7c5cff;
  --cian: #22d3ee;
  --grad: linear-gradient(120deg, var(--cian), var(--violeta) 45%, var(--rosa));
  --radio: 12px;
  --sombra: 0 10px 30px -8px rgba(0, 0, 0, .55);
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 92, 255, .18), transparent 60%),
    radial-gradient(700px 400px at -10% 15%, rgba(255, 77, 141, .13), transparent 60%),
    var(--bg);
  color: var(--texto);
  font-family: -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

:focus-visible { outline: 2px solid var(--cian); outline-offset: 2px; border-radius: 4px; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 16px 20px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em;
  color: var(--texto); text-decoration: none;
}
.logo svg { color: var(--rosa); }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar nav { display: flex; gap: 20px; }
.topbar nav a {
  color: var(--texto2); text-decoration: none; font-size: .85rem;
  letter-spacing: .04em; transition: color .2s;
}
.topbar nav a:hover { color: var(--texto); }
@media (max-width: 560px) { .topbar nav a:not(:first-child) { display: none; } }

/* ---------- Hero ---------- */
.hero { max-width: 720px; margin: 0 auto; padding: 34px 20px 26px; text-align: center; animation: entrar .5s ease both; }
.hero__kicker {
  font-size: .72rem; font-weight: 700; letter-spacing: .28em; color: var(--cian);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 850;
  letter-spacing: -.03em; line-height: 1.08;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { color: var(--texto2); margin-top: 12px; font-size: 1.05rem; }

.tool { display: flex; gap: 10px; margin-top: 26px; }
.tool input {
  flex: 1; min-width: 0; padding: 14px 18px; font-size: 1rem;
  border-radius: var(--radio); border: 1px solid var(--linea);
  background: var(--card); color: var(--texto); transition: border-color .2s, box-shadow .2s;
}
.tool input::placeholder { color: #6e6788; }
.tool input:focus { outline: none; border-color: var(--violeta); box-shadow: 0 0 0 3px rgba(124, 92, 255, .25); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border: none; border-radius: var(--radio);
  font-weight: 700; font-size: .95rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px -6px rgba(124, 92, 255, .6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -6px rgba(255, 77, 141, .55); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { background: transparent; border: 1px solid var(--linea); color: var(--texto); min-height: 38px; padding: 6px 14px; font-size: .85rem; }
.btn--ghost:hover { border-color: var(--violeta); background: rgba(124, 92, 255, .12); }
.btn--danger { background: transparent; border: 1px solid rgba(255, 77, 141, .45); color: var(--rosa); min-height: 38px; padding: 6px 14px; font-size: .85rem; }
.btn--danger:hover { background: rgba(255, 77, 141, .12); }

.plataformas { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.plat {
  min-height: 40px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--linea); background: transparent;
  color: var(--texto2); font-weight: 600; font-size: .88rem; cursor: pointer;
  transition: all .2s;
}
.plat:hover { color: var(--texto); border-color: var(--violeta); }
.plat.is-active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px -4px rgba(124, 92, 255, .6); }

.plataforma-info { margin-top: 10px; font-size: .82rem; color: var(--texto2); }
.plataforma-info span { display: block; }
#plataforma-max { font-weight: 700; color: var(--cian); letter-spacing: .04em; }

/* ---------- Resultados ---------- */
.resultados { max-width: 880px; margin: 0 auto; padding: 8px 20px 30px; }
.vacio {
  display: grid; place-items: center; gap: 12px; text-align: center;
  padding: 42px 24px; color: var(--texto2);
  border: 1px dashed var(--linea); border-radius: var(--radio);
}
.vacio svg { color: var(--violeta); opacity: .8; }

.resultados__barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
#contador-total { font-size: .85rem; color: var(--texto2); letter-spacing: .03em; }
.acciones { display: flex; gap: 8px; }

.grupos__titulo {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--texto2); margin: 18px 0 10px;
}
.grupos__titulo small { font-weight: 500; letter-spacing: 0; text-transform: none; }
.punto { width: 8px; height: 8px; border-radius: 50%; }
.punto--grande { background: var(--rosa); box-shadow: 0 0 8px var(--rosa); }
.punto--medio { background: var(--violeta); box-shadow: 0 0 8px var(--violeta); }
.punto--nicho { background: var(--cian); box-shadow: 0 0 8px var(--cian); }

.tags-grid { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 6px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--linea);
  animation: aparecer .35s ease both; transition: border-color .2s, transform .15s;
}
.tag:hover { border-color: var(--violeta); transform: translateY(-1px); }
.tag__fav {
  display: grid; place-items: center; width: 26px; height: 26px;
  border: none; border-radius: 50%; background: rgba(255, 255, 255, .06);
  color: #6e6788; cursor: pointer; transition: color .2s, background .2s;
}
.tag__fav:hover { color: #ffd166; background: rgba(255, 209, 102, .15); }
.tag__fav[aria-pressed="true"] { color: #ffd166; }
.tag__texto { cursor: pointer; font-size: .9rem; font-weight: 600; word-break: break-all; }
.tag__texto:hover { text-decoration: underline; text-decoration-color: var(--violeta); }
.tag__len {
  font-size: .68rem; font-weight: 700; color: var(--texto2);
  background: rgba(255, 255, 255, .07); padding: 1px 6px; border-radius: 999px;
}
.tag--nicho { border-left: 2px solid var(--cian); }
.tag--medio { border-left: 2px solid var(--violeta); }
.tag--grande { border-left: 2px solid var(--rosa); }

.favoritos { max-width: 880px; margin: 0 auto; padding: 10px 20px 30px; }
.favoritos h2, .contenido h2, .cta-final h2 { font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 14px; }
.favoritos__vacio { color: var(--texto2); font-size: .9rem; margin-bottom: 12px; }
#btn-limpiar-favs { margin-top: 14px; }

/* ---------- Contenido ---------- */
.contenido { max-width: 760px; margin: 0 auto; padding: 34px 20px; }
.pasos { list-style: none; counter-reset: paso; display: grid; gap: 14px; }
.pasos li {
  counter-increment: paso; position: relative;
  padding: 16px 18px 16px 58px; color: var(--texto2); font-size: .95rem;
  background: var(--bg2); border: 1px solid var(--linea); border-radius: var(--radio);
}
.pasos li strong { color: var(--texto); }
.pasos li::before {
  content: counter(paso);
  position: absolute; left: 16px; top: 16px;
  display: grid; place-items: center; width: 28px; height: 28px;
  background: var(--grad); border-radius: 8px; font-weight: 800; color: #fff; font-size: .9rem;
}
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.tip { background: var(--bg2); border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px; }
.tip h3 { font-size: 1rem; margin-bottom: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tip p { color: var(--texto2); font-size: .92rem; }

.contenido details {
  background: var(--bg2); border: 1px solid var(--linea);
  border-radius: var(--radio); margin-bottom: 10px; overflow: hidden;
}
.contenido summary {
  cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; transition: color .2s;
}
.contenido summary::-webkit-details-marker { display: none; }
.contenido summary::after { content: "+"; color: var(--violeta); font-size: 1.2rem; font-weight: 700; }
.contenido details[open] summary::after { content: "–"; }
.contenido summary:hover { color: var(--cian); }
.contenido details p { padding: 0 18px 16px; color: var(--texto2); font-size: .93rem; }

.cta-final { text-align: center; padding: 44px 20px 54px; }
.cta-final p { color: var(--texto2); margin-bottom: 18px; }

.footer {
  border-top: 1px solid var(--linea); padding: 26px 20px; text-align: center;
}
.footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
.footer a { color: var(--texto2); text-decoration: none; font-size: .85rem; }
.footer a:hover { color: var(--texto); }
.footer p { color: #6e6788; font-size: .8rem; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 80px);
  background: var(--grad); color: #fff; font-weight: 700; font-size: .9rem;
  padding: 12px 22px; border-radius: 999px; box-shadow: var(--sombra);
  opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease;
  z-index: 100;
}
.toast--visible { transform: translate(-50%, 0); opacity: 1; }

@keyframes entrar { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
