:root {
  --bg: #f3f4f6;
  --fg: #1f2937;
  --card-bg: #ffffff;
  --sidebar-bg: #111827;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --border-soft: #e5e7eb;
  --shadow-soft: 0 4px 12px rgba(0,0,0,.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020617;
    --fg: #e5e7eb;
    --card-bg: #020617;
    --sidebar-bg: #020617;
    --accent: #60a5fa;
    --accent-soft: #1d283a;
    --border-soft: #1f2937;
    --shadow-soft: 0 4px 16px rgba(0,0,0,.7);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--sidebar-bg);
  color: #f9fafb;
  padding: 1.5rem;
  box-shadow: 2px 0 10px rgba(0,0,0,.3);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar h2 {
  margin: 0;
  font-size: 1.3rem;
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-btn {
  border: 1px solid #4b5563;
  background: transparent;
  color: #e5e7eb;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
}

.lang-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.sidebar nav {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar nav a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.sidebar nav a:hover {
  background: #374151;
}

/* Contenido */
.content {
  margin-left: 260px;
  padding: 2rem;
  max-width: 960px;
}

h1 {
  margin-top: 0;
  font-size: 2rem;
}

.descripcion {
  font-size: 1.05rem;
  color: #4b5563;
}

/* Secciones */
section {
  background: var(--card-bg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

pre {
  background: #111827;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
}

/* Interactivos */
.interactive-block {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  border: 1px dashed var(--border-soft);
}

/* Botones */
.btn-primary,
.btn-secondary {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #f6f7f8;
}

.btn-primary:hover {
  background: #1249e0;
}

.btn-secondary {
  background: transparent;
  color:  #100a10;
  border: 1px solid var(--border-soft);
}

.btn-secondary:hover {
  background: #1d4ed8;
  color: #fdfbfb;
  border: 2px solid #50ea14;

}

/* Footer */
footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Cookies */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 260px;
  right: 0;
  background: #e5eaf4;
  color: #000604ff;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  z-index: 9999;
}

.cookie-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 10, 10, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.cookie-modal[aria-hidden="false"] {
  display: flex;
}

.cookie-modal-content {
  background: var(--card-bg);
  color: var(--fg);
  padding: 1.5rem;
  border-radius: 0.75rem;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-soft);
}

.cookie-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.cookie-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 800px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: column;
  }
  .content {
    margin-left: 0;
  }
  .cookie-banner {
    left: 0;
  }
}