*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #eaf0ff;
  background: radial-gradient(1200px 700px at 75% -10%, #162036 0%, #0b111f 60%, #090f1b 100%);
  background-image: url('img/fondo.jpg');
  
}



/* Header */
.site-header {
  text-align: center;
  padding: 36px 16px 10px;
}
.site-header h1 {
  margin: 0 0 2px;
  font-size: clamp(28px, 4vw, 50px);
  letter-spacing: .5px;
}
.subtitle { margin: 4px 0 18px; color: #A6B4D7; }

.searchbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  width: min(1100px, 92%);
  margin: 0 auto;
}
.searchbar input {
  background: #0f1730;
  border: 1px solid #1b2547;
  color: #eaf0ff;
  padding: 14px 16px;
  border-radius: 14px;
  outline: none;
}
.searchbar input::placeholder { color: #9ab0da; }
.btn {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid #1b2547;
  cursor: pointer;
}
.btn-primary { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.btn-primary:hover { filter: brightness(1.05); }
.ghost { background: #0f1730; color: #bcd0ff; }
.ghost:hover { border-color: #2a3a71; }

/* Estado */
.status {
  width: min(1100px, 92%);
  margin: 16px auto 8px;
  color: #A6B4D7;
}

/* Resultados */
.results {
  width: min(1100px, 92%);
  margin: 0 auto 48px;
}

/* Card de correo */
.card {
  background: #121a33;
  border: 1px solid #1b2547;
  border-radius: 16px;
  margin: 16px 0 24px;
  overflow: hidden;
  animation: fadeUp .35s ease both;
}
.card-head {
  padding: 16px 18px 10px;
}
.card-head .subject {
  font-weight: 700;
  margin-bottom: 4px;
}
.card-head .meta { color: #9ab0da; }
.card-body { padding: 8px 10px 16px; }
.mail-frame {
  width: 100%;
  min-height: 320px;
  border: 0;
  background: #0c142c;
  border-radius: 10px;
}

/* Skeleton */
.skeleton {
  background: #121a33;
  border: 1px solid #1b2547;
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
  overflow: hidden;
}
.sk-head { margin-bottom: 10px; }
.sk-line {
  height: 12px; border-radius: 8px;
  background: linear-gradient(90deg,#192449,#233365,#192449);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  margin: 8px 0;
}
.sk-w-60 { width: 60%; }
.sk-w-40 { width: 40%; }
.sk-body .sk-box {
  height: 180px; border-radius: 10px;
  background: linear-gradient(90deg,#192449,#233365,#192449);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

/* Overlay spinner */
.overlay {
  position: fixed; inset: 0;
  background: rgba(3,6,14,.55);
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  z-index: 50;
  backdrop-filter: blur(1.5px);
}
.loader {
  width: 28px; height: 28px;
  border: 3px solid #3b82f6;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* Timeline “Cómo funciona” */
.how {
  width: min(1100px, 92%);
  margin: 34px auto 60px;
}
.how h2 {
  text-align: center;
  margin: 10px 0 18px;
}
.timeline {
  position: relative;
  padding-left: 36px;
}
.timeline .line {
  position: absolute; left: 16px; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg,#53a5ff,#ff3d7f);
  border-radius: 4px;
  animation: growline .8s ease both;
}
.step { position: relative; margin: 18px 0; }
.step .dot {
  position: absolute; left: 6px; top: 14px;
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #f36 60%, #92127f);
  box-shadow: 0 0 10px rgba(255,80,120,.6);
  animation: pulse 1.8s ease-in-out infinite;
}
.step .bubble {
  background: #121a33; border: 1px solid #1b2547; border-radius: 12px;
  padding: 14px 16px; transform-origin: left center;
  animation: pop .35s ease both;
}
.step:nth-child(2) .bubble { animation-delay: .05s; }
.step:nth-child(3) .bubble { animation-delay: .10s; }
.step:nth-child(4) .bubble { animation-delay: .15s; }
.step:nth-child(5) .bubble { animation-delay: .20s; }

/* Footer */
.site-footer {
  text-align: center;
  color: #93a7d9;
  padding: 24px 12px 30px;
  border-top: 1px solid #132044;
  background: #0b111f;
}

/* Animaciones */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: 0 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes growline {
  from { transform: scaleY(.1); }
  to { transform: scaleY(1); }
}
@keyframes pulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 6px rgba(255,80,120,.5); }
  50%     { transform: scale(1.1); box-shadow: 0 0 14px rgba(255,80,120,.75);}
}
@keyframes pop {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 860px) {
  .searchbar { grid-template-columns: 1fr auto; }
  #btnLast60 { display: none; }
}
@media (max-width: 600px) {
  .timeline { padding-left: 0; }
  .timeline .line { left: -9999px; } /* oculta vertical */
  .step .dot { position: static; margin: 0 0 8px 0; }
  .step .bubble { transform-origin: center; }
}

/* ---------- Paso a paso (guía) ---------- */
.guide{
  width:min(1100px,92%);
  margin:32px auto 18px;
  padding:0 8px;
}
.guide h2{
  text-align:center;
  margin:0 0 14px;
  font-size:clamp(22px,2.2vw,28px);
}
.steps-list{
  counter-reset: step;
  list-style:none;
  display:grid;
  gap:12px;
  margin:0; padding:0;
}
.steps-list li{
  position:relative;
  background:#121a33;
  border:1px solid #1b2547;
  border-radius:12px;
  padding:12px 12px 12px 54px;
}
.steps-list li::before{
  counter-increment: step;
  content: counter(step);
  position:absolute;
  left:12px; top:50%;
  transform:translateY(-50%);
  width:28px; height:28px;
  display:grid; place-items:center;
  border-radius:50%;
  font-weight:800;
  color:#fff;
  background:linear-gradient(135deg,#3b82f6,#a855f7);
  box-shadow:0 4px 16px rgba(59,130,246,.35);
}

/* Tips */
.tips{
  margin-top:14px;
  background:#0f1730;
  border:1px dashed #1e2b55;
  border-radius:12px;
  padding:12px;
}
.tips h3{ margin:0 0 8px; font-size:1rem; }
.tips ul{ margin:0; padding-left:18px; color:#9ab0da; }
.tips code{ background:#0c142c; padding:0 6px; border-radius:6px; }

/* ---------- FAQ (sin JS) ---------- */
.faq-wrap{
  width:min(1100px,92%);
  margin:22px auto 10px;
  padding:0 8px;
}
.faq-wrap h2{
  text-align:center;
  margin:0 0 10px;
  font-size:clamp(22px,2.2vw,28px);
}
.faq-wrap details{
  background:#121a33;
  border:1px solid #1b2547;
  border-radius:12px;
  padding:10px 12px;
  margin:10px 0;
}
.faq-wrap summary{
  cursor:pointer;
  font-weight:700;
  outline:none;
}
.faq-wrap summary::-webkit-details-marker{ display:none; }
.faq-wrap details > div{
  margin-top:8px; color:#9ab0da;
}
.faq-wrap ul{ margin:0; padding-left:18px; }

/* ===== HowTo + Steps ===== */
.howto { margin: 48px auto; max-width: 1000px; }
.howto h2 { text-align:center; font-weight:800; font-size:clamp(22px, 3vw, 32px); margin: 0 0 20px; }

.step-list { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.step {
  display:grid;
  grid-template-columns: 40px 36px 1fr;
  align-items:center;
  gap:12px;
  background: linear-gradient(180deg, rgba(16,26,55,.8), rgba(10,18,40,.8));
  border: 1px solid #1b2547;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.badge{
  display:inline-grid; place-items:center;
  width:32px; height:32px; border-radius:50%;
  background: radial-gradient(100% 100% at 70% 30%, #3b82f6 0%, #2563eb 60%, #0ea5e9 100%);
  box-shadow: 0 0 0 3px rgba(30,58,138,.35), 0 8px 20px rgba(15,23,42,.35);
  color:#fff; font-weight:700;
}
.emoji{ font-size:22px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.25)); }
.step-body{ line-height:1.55; }
.mono{ font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.chip{
  display:inline-block; padding:.2rem .6rem; border-radius:999px;
  border:1px solid #253866; background:#0f1730; color:#b6c5ea; margin-left:.35rem;
}

/* ===== Tips ===== */
.tips{
  margin-top:18px; padding:16px;
  border-radius:14px;
  border:1px solid #223466;
  background: linear-gradient(180deg, rgba(11,23,53,.85), rgba(8,18,40,.85));
}
.tips h3{ margin:0 0 8px; font-weight:800; color:#dbe7ff; }
.tips ul{ margin:8px 0 0 18px; padding:0; }
.tips li{ margin:6px 0; color:#c8d6ff; }

/* ===== FAQ ===== */
.faq{ margin-top:28px; }
.faq h2{ text-align:center; margin: 0 0 12px; }
.faq details{
  border:1px solid #1c2c59; background:#0c142c;
  border-radius:12px; padding:10px 14px; margin-top:10px;
}
.faq summary{ cursor:pointer; font-weight:700; color:#cfe3ff; }
.faq p, .faq li{ color:#b8c8ef; }
.faq ul{ margin:8px 0 0 20px; }

/* Responsive: en móviles, pasos a una columna limpia */
@media (max-width: 680px){
  .step{
    grid-template-columns: 32px 28px 1fr;
    gap:10px; padding:12px;
  }
  .badge{ width:28px; height:28px; font-size:13px; }
  .emoji{ font-size:20px; }
}

/* Galería dentro del paso */
.step-gallery {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.step-gallery img {
  flex: 1;
  max-width: 30%; /* tres imágenes lado a lado */
  border-radius: 10px;
  border: 1px solid #1b2547;
  background: #0f1730;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
  object-fit: cover;
}

/* Responsive: en pantallas pequeñas se apilan */
@media (max-width: 680px) {
  .step-gallery img {
    max-width: 100%;
  }
}

/* Galería de pasos */
.step-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-item {
  background: #101932;
  border: 1px solid #1e2f55;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,.35);
}

.gallery-item img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform .3s ease;
}
.gallery-item img:hover {
  transform: scale(1.05);
}

.gallery-item p {
  margin-top: 8px;
  font-size: 14px;
  color: #cdd8f5;
}

/* Lightbox */
.lb {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.lb.show { display: flex; }

.lb img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 15px 50px rgba(0,0,0,.6);
}

.lb-close {
  position: absolute;
  top: 20px; right: 20px;
  background: #111c3d;
  border: 1px solid #2c3e70;
  color: #fff;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 18px;
  cursor: pointer;
}

.step-card img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  cursor: zoom-in;
  transition: transform .3s ease;
}

