/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VARIABLES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --red:        #e53935;
  --red-dark:   #c62828;
  --red-light:  #ffebee;
  --bg:         #f5f5f5;
  --white:      #ffffff;
  --text:       #1a1a1a;
  --muted:      #757575;
  --border:     #e0e0e0;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
  --shadow-md:  0 4px 20px rgba(0,0,0,.10);
  --radius:     12px;
  --radius-sm:  8px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BASE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  margin: 0; padding: 0;
  scroll-behavior: smooth;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAVBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-icon {
  width: 36px; height: 36px;
  background: var(--red);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.1rem;
}
.brand-icon-sm {
  width: 26px; height: 26px;
  font-size: .85rem;
  border-radius: 6px;
}
.brand-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -.3px;
}

.navbar .nav-link {
  color: var(--text) !important;
  font-size: .92rem;
  font-weight: 500;
  padding: 6px 14px !important;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.navbar .nav-link:hover { background: var(--bg); color: var(--red) !important; }

.nav-link-cta {
  background: var(--red) !important;
  color: white !important;
  border-radius: 8px !important;
}
.nav-link-cta:hover { background: var(--red-dark) !important; color: white !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#hero {
  padding: 64px 0 80px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MAIN CARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.main-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 40px;
  border: 1px solid var(--border);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STEPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.step-block {
  margin-bottom: 28px;
}
.step-block:last-child { margin-bottom: 0; }

.step-label {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-num {
  background: var(--red);
  color: white;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.step-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: .8rem;
  color: #aaa;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DROP ZONE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  position: relative;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--red);
  background: var(--red-light);
}
.drop-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.drop-content {
  text-align: center;
  padding: 24px;
  pointer-events: none;
}
.drop-icon {
  font-size: 2.2rem;
  color: var(--red);
  display: block;
  margin-bottom: 8px;
}
.drop-text {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.drop-subtext {
  font-size: .88rem;
  color: var(--muted);
  margin-top: 4px;
}
.drop-link {
  color: var(--red);
  font-weight: 600;
}
.drop-formats {
  font-size: .75rem;
  color: #bbb;
  margin-top: 8px;
}

/* Preview de archivo seleccionado */
.drop-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  width: 100%;
}
.drop-icon-sm {
  font-size: 1.8rem;
  color: var(--red);
  flex-shrink: 0;
}
.preview-name {
  font-weight: 600;
  font-size: .95rem;
  word-break: break-all;
}
.preview-size {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 2px;
}
.btn-remove-file {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
  padding: 6px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.btn-remove-file:hover { color: var(--red); background: var(--red-light); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MÉTODO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.method-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.method-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
}
.method-card:hover { border-color: var(--red); background: #fafafa; }
.method-card.selected { border-color: var(--red); background: var(--red-light); }
.method-icon {
  font-size: 1.5rem;
  color: var(--red);
  display: block;
  margin-bottom: 6px;
}
.method-name { font-weight: 700; font-size: .95rem; }
.method-desc { font-size: .78rem; color: var(--muted); margin-top: 2px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TAGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: white;
  cursor: text;
  min-height: 46px;
  transition: border-color .2s;
}
.tags-wrapper:focus-within { border-color: var(--red); }

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  background: var(--red);
  color: white;
  border-radius: 20px;
  padding: 3px 10px 3px 12px;
  font-size: .82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tag-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  padding: 0;
  font-size: .85rem;
  line-height: 1;
  display: flex;
  align-items: center;
}
.tag-remove:hover { color: white; }

.tags-input {
  border: none;
  outline: none;
  font-size: .92rem;
  flex: 1;
  min-width: 140px;
  padding: 2px 0;
  background: transparent;
  color: var(--text);
}

.tags-presets {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.presets-label {
  font-size: .78rem;
  color: var(--muted);
}
.preset-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .78rem;
  padding: 3px 12px;
  cursor: pointer;
  color: var(--muted);
  transition: border-color .15s, color .15s, background .15s;
  font-weight: 500;
}
.preset-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   OPCIONES AVANZADAS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.advanced-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: .85rem;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: color .15s;
}
.advanced-toggle:hover { color: var(--red); }
.toggle-arrow { font-size: .75rem; transition: transform .2s; }
.advanced-toggle[aria-expanded="true"] .toggle-arrow { transform: rotate(180deg); }

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.adv-field label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.adv-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: .9rem;
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color .2s;
}
.adv-input:focus { border-color: var(--red); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BOTÓN PRINCIPAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.submit-block {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.btn-censor {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, opacity .2s, transform .1s;
  width: 100%;
  justify-content: center;
}
.btn-censor:hover:not(:disabled) { background: var(--red-dark); }
.btn-censor:active:not(:disabled) { transform: scale(.98); }
.btn-censor:disabled { opacity: .45; cursor: not-allowed; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BARRA DE PROGRESO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#statusBlock {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.status-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.status-bar-track {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
}
.status-bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 10px;
  width: 0%;
  transition: width .4s ease;
}
.status-pct {
  font-size: .82rem;
  font-weight: 700;
  color: var(--red);
  min-width: 36px;
  text-align: right;
}
.status-msg {
  font-size: .85rem;
  color: var(--muted);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESULTADO Y ERROR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.result-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #e8f5e9;
  border: 1.5px solid #a5d6a7;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-top: 20px;
}
.result-icon { font-size: 1.8rem; color: #2e7d32; flex-shrink: 0; }
.result-title { font-weight: 700; font-size: 1rem; color: #1b5e20; }
.result-sub { font-size: .82rem; color: #388e3c; margin-top: 2px; }

.btn-download {
  margin-left: auto;
  background: #2e7d32;
  color: white;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}
.btn-download:hover { background: #1b5e20; color: white; }

.error-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffebee;
  border: 1.5px solid #ef9a9a;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 20px;
  font-size: .88rem;
  color: #c62828;
}
.error-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECCIONES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-alt  { background: var(--bg);    padding: 72px 0; }
.section-white{ background: var(--white); padding: 72px 0; }

.section-heading {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.3px;
  margin-bottom: 0;
  display: inline-block;
  border-bottom: 3px solid var(--red);
  padding-bottom: 6px;
}

/* Cómo funciona */
.how-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  height: 100%;
  position: relative;
}
.how-num {
  font-size: 3rem;
  font-weight: 900;
  color: #f5f5f5;
  position: absolute;
  top: 12px; right: 20px;
  line-height: 1;
  user-select: none;
}
.how-icon {
  font-size: 1.8rem;
  color: var(--red);
  display: block;
  margin-bottom: 12px;
}
.how-card h5 { font-weight: 700; margin-bottom: 8px; }
.how-card p  { font-size: .9rem; color: var(--muted); margin: 0; }

/* Planes */
.plan-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  position: relative;
}
.plan-pro {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(229,57,53,.08);
}
.plan-badge {
  background: var(--red);
  color: white;
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.plan-name  { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }
.plan-price { font-size: 2.4rem; font-weight: 900; margin-bottom: 20px; }
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}
.plan-features li {
  font-size: .9rem;
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-features li i { color: var(--red); font-size: 1rem; flex-shrink: 0; }
.plan-features li.disabled { color: #bbb; }
.plan-features li.disabled i { color: #ddd; }

.btn-plan {
  display: block;
  padding: 11px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  border: 2px solid var(--red);
  color: var(--red);
  transition: background .15s, color .15s;
}
.btn-plan:hover { background: var(--red); color: white; }
.btn-plan-pro  { background: var(--red); color: white !important; }
.btn-plan-pro:hover { background: var(--red-dark); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CUENTA / AUTH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.auth-tabs {
  display: flex;
  border-bottom: none;
}
.auth-tab {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.auth-tab:first-child { border-radius: var(--radius) var(--radius-sm) 0 0; border-right: none; }
.auth-tab:last-child  { border-radius: var(--radius-sm) var(--radius) 0 0; }
.auth-tab.active { background: white; color: var(--text); border-bottom: 2px solid white; }

.main-card .form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  padding: 9px 12px;
}
.main-card .form-control:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229,57,53,.1);
}
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: 5px; }
.form-hint  { font-size: .76rem; color: var(--muted); margin-top: 4px; }

.auth-msg {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .85rem;
  margin-top: 16px;
}
.auth-msg.ok    { background: #e8f5e9; color: #2e7d32; }
.auth-msg.error { background: #ffebee; color: #c62828; }

.btn-text-link {
  background: none; border: none;
  color: var(--muted); font-size: .82rem;
  cursor: pointer; text-decoration: underline;
  padding: 0;
}
.btn-text-link:hover { color: var(--red); }

.logged-in-header {
  display: flex; align-items: center; gap: 14px;
}
.user-avatar { font-size: 2.4rem; color: var(--red); line-height: 1; }
.user-label  { font-size: .75rem; color: var(--muted); }
.user-email  { font-weight: 700; font-size: .95rem; }

.btn-logout {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: border-color .15s, color .15s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .92rem;
}
.footer-links {
  display: flex; gap: 20px; margin-left: auto;
}
.footer-links a {
  font-size: .82rem; color: var(--muted); text-decoration: none;
}
.footer-links a:hover { color: var(--red); }
.footer-copy {
  font-size: .78rem; color: #bbb; width: 100%;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
  .main-card { padding: 24px 20px; }
  .hero-title { font-size: 2rem; }
  .method-options { grid-template-columns: 1fr 1fr; }
  .advanced-grid { grid-template-columns: 1fr 1fr; }
  .footer-links { margin-left: 0; }
}
@media (max-width: 480px) {
  .method-options { grid-template-columns: 1fr; }
  .advanced-grid  { grid-template-columns: 1fr; }
  .result-box     { flex-wrap: wrap; }
  .btn-download   { margin-left: 0; width: 100%; justify-content: center; }
}
