/* ============================================================
   PIXELBASE — Estilos globales (dark UI)
   ============================================================ */

:root {
  --bg: #121212;
  --surface: #1a1a1a;
  --surface-2: #202020;
  --surface-3: #262626;
  --border: #2e2e2e;
  --border-soft: #232323;
  --text: #f1f3f5;
  --text-2: #b6bcc6;
  --text-3: #7a8290;
  --accent: #f4b740;
  --accent-hover: #ffc94d;
  --accent-soft: rgba(244, 183, 64, 0.12);
  --success: #35c98a;
  --danger: #ff5c68;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

html, body { width: 100%; min-height: 100%; }

body {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.2px;
}
.logo:hover { text-decoration: none; }

.logo-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  display: flex; align-items: center; justify-content: center;
  color: #1a1200; font-weight: 800; font-size: 15px;
}

.lang-switch {
  display: flex; gap: 6px; font-size: 13px;
}
.lang-switch a {
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--text-2);
  border: 1px solid transparent;
}
.lang-switch a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.lang-switch a.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(244,183,64,.3); }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ---------- Tipografía ---------- */
h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

h2 { font-size: 22px; font-weight: 700; margin: 40px 0 14px; letter-spacing: -0.3px; }

.lead {
  font-size: 17px;
  color: var(--text-2);
  max-width: 720px;
  margin-bottom: 32px;
}

.muted { color: var(--text-3); font-size: 14px; }

/* ---------- Card / Panel ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.panel-tight { padding: 16px; }

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed #3a414c;
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: 0.15s ease;
  background: var(--surface-2);
}
.dropzone:hover { border-color: var(--accent); background: #22242a; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; font-size: 16px; margin-bottom: 6px; }
.dropzone .hint { color: var(--text-3); font-size: 13px; }
.dropzone input[type="file"] { display: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: 0.15s ease;
  font-family: inherit;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #1a1200;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: #2c2c2c; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

/* ---------- Grid de resultados ---------- */
.results { display: grid; gap: 16px; }
.result-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.result-card img {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #000;
  flex-shrink: 0;
}
.result-body { flex: 1; min-width: 0; }
.result-name { font-weight: 650; font-size: 14px; margin-bottom: 2px; overflow-wrap: anywhere; }
.result-meta { font-size: 12px; color: var(--text-3); }
.result-actions { display: flex; gap: 6px; flex-shrink: 0; }
.result-actions .btn { padding: 7px 12px; font-size: 12px; }

/* ---------- Selector de formato ---------- */
.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.controls-row label { font-size: 13px; color: var(--text-2); font-weight: 500; }
select, .input {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
}
select:focus, .input:focus, textarea:focus { outline: none; border-color: var(--accent); }

textarea {
  width: 100%;
  min-height: 140px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font: 13px/1.5 Consolas, "Courier New", monospace;
  resize: vertical;
}

/* ---------- Estado vacío ---------- */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- Status ---------- */
.status {
  font-size: 13px;
  min-height: 20px;
  margin-top: 10px;
  color: var(--success);
}
.status.error { color: var(--danger); }

/* ---------- Hub de herramientas (index) ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: block;
  color: var(--text);
  transition: 0.18s ease;
}
.tool-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
  text-decoration: none;
}
.tool-card .icon { font-size: 28px; margin-bottom: 10px; display: block; }
.tool-card h3 { font-size: 16px; margin-bottom: 4px; }
.tool-card p { font-size: 13px; color: var(--text-3); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}
.site-footer a { color: var(--text-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--surface-3);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  z-index: 999;
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(53,201,138,.4); color: var(--success); }
.toast.error { border-color: rgba(255,92,104,.4); color: var(--danger); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  main { padding: 24px 14px 60px; }
  .panel { padding: 16px; }
  .result-card { flex-direction: column; align-items: stretch; }
  .result-card img { width: 100%; height: 160px; }
  .result-actions { justify-content: stretch; }
  .result-actions .btn { flex: 1; }
  .site-header .inner { flex-wrap: wrap; gap: 10px; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb span { color: var(--text-3); }

/* ---------- FAQ ---------- */
.faq {
  margin-top: 56px;
}
.faq h2 { margin-bottom: 20px; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq details[open] {
  border-color: rgba(244, 183, 64, 0.35);
}
.faq summary {
  padding: 16px 20px;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  padding: 0 20px 18px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}