/* cheatsheet.css — Estilos para la página de Referencia Rápida */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 60px;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, #a5b4fc, #c084fc);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.page-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 50px;
}

/* ── Tabs ── */
.section-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 25px;
  border: 1px solid var(--glass-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: "Outfit", sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.cheat-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.cheat-card:hover {
  transform: translateY(-5px);
}

.cheat-card h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  color: var(--accent-hover);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cheat-card .desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* ── Code snippets ── */
.code-snippet {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: #c084fc;
  overflow-x: auto;
  border-left: 3px solid var(--accent-primary);
}

.code-snippet .tag    { color: #f97316; }
.code-snippet .attr   { color: #a5b4fc; }
.code-snippet .val    { color: #10b981; }
.code-snippet .prop   { color: #60a5fa; }
.code-snippet .method { color: #fbbf24; }
.code-snippet .comment{ color: #64748b; }

.tag-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-hover);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* ── Light mode overrides ── */
body.light-mode .code-snippet         { background: #f8fafc; color: #334155; border-color: #e2e8f0; }
body.light-mode .code-snippet .tag    { color: #c2410c; }
body.light-mode .code-snippet .attr   { color: #4338ca; }
body.light-mode .code-snippet .val    { color: #047857; }
body.light-mode .code-snippet .prop   { color: #1d4ed8; }
body.light-mode .code-snippet .method { color: #b45309; }
body.light-mode .code-snippet .comment{ color: #64748b; }
body.light-mode .tag-badge            { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
