/* ═══════════════════════════════════════════════════
   PROFE PLATFORM — Design System (quiz_1 inspired)
   Fonts: Baloo 2 (display) + Nunito (body)
═══════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@700;800&family=Nunito:wght@600;700;800;900&display=swap');

/* ── Design Tokens ────────────────────────────────── */
:root {
  /* ── Colors — paleta premium desaturada ── */
  --green: #22a079;
  --gdk: #11825e;
  --gbg: #e1f5ec;
  --blue: #4f83e2;
  --bdk: #3164c0;
  --bbg: #e7effb;
  --yell: #f2a033;
  --ydk: #ca7f1b;
  --ybg: #fdf5e7;
  --red: #e75a5a;
  --rdk: #c33737;
  --rbg: #faeaea;
  --purp: #8b6be8;
  --pdk: #6b4cc5;
  --pbg: #f0ecfa;
  --orange: #f28a41;

  /* Surface */
  --c-bg: #f0f4ff;
  --c-surface: #ffffff;
  --c-surface2: #f4f6fc;
  --c-surface3: #edf0f8;
  --c-border: #dde3f5;
  --c-text: #2e2f40;
  --c-muted: #7b80a0;

  /* Accent aliases (kept for compatibility with existing views) */
  --c-accent: var(--purp);
  --c-accent2: var(--green);
  --c-danger: var(--red);
  --c-warn: var(--yell);
  --c-success: var(--green);
  --c-premium: var(--yell);

  /* Shadows con color */
  --shadow: 0 4px 24px rgba(100, 110, 200, .12);
  --shadow-sm: 0 2px 8px rgba(100, 110, 200, .08);
  --shadow2: 0 8px 48px rgba(100, 110, 200, .2);
  --shadow-green: 0 8px 24px rgba(16, 185, 129, .3);
  --shadow-blue: 0 8px 24px rgba(59, 130, 246, .3);
  --shadow-purp: 0 8px 24px rgba(139, 92, 246, .3);
  --shadow-yell: 0 8px 24px rgba(245, 158, 11, .3);

  /* Typography */
  --ff: 'Baloo 2', cursive;
  --fb: 'Nunito', sans-serif;
  --font: var(--fb);
  --font-mono: 'JetBrains Mono', monospace;

  /* Shape */
  --radius: 14px;
  --radius-lg: 20px;
  --r: var(--radius);

  /* Motion */
  --transition: .15s ease;
  --tr: .18s cubic-bezier(.4, 0, .2, 1);
}

/* ── Dark Mode ──────────────────────────────────── */
[data-theme="dark"] {
  --c-bg: #13141c;
  --c-surface: #1e1f2e;
  --c-surface2: #2a2b3d;
  --c-surface3: #383a52;
  --c-border: #383a52;
  --c-text: #e2e8f0;
  --c-muted: #94a3b8;

  /* Premium colors with slight dark overlays */
  --gbg: rgba(34, 160, 121, 0.2);
  --bbg: rgba(79, 131, 226, 0.2);
  --ybg: rgba(242, 160, 51, 0.2);
  --rbg: rgba(231, 90, 90, 0.2);
  --pbg: rgba(139, 107, 232, 0.2);
}

/* ── Reset ────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth
}

body {
  font-family: var(--fb);
  background: var(--c-bg);
  background-image: radial-gradient(ellipse at 70% -10%, rgba(139, 92, 246, .08) 0%, transparent 55%),
    radial-gradient(ellipse at -10% 60%, rgba(16, 185, 129, .06) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background .3s, color .3s;
}

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: opacity var(--tr)
}

a:hover {
  opacity: .8
}

img {
  max-width: 100%
}

button {
  font-family: var(--fb)
}

/* ══════════════════════════════════════════════
   SIDEBAR LAYOUT
══════════════════════════════════════════════ */
/* ── Sidebar Layout (Desktop) ─────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  /* Use dynamic viewport height for mobile browsers */
  width: 250px;
  background: var(--c-surface);
  border-right: 2px solid var(--c-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  z-index: 50;
  transition: transform .3s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0 .5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--ff);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--c-text);
  text-decoration: none;
}

.brand i {
  color: var(--c-accent);
  font-size: 1.8rem;
}

.brand-dot {
  color: var(--green);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.nav-subtitle {
  font-size: .75rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--c-muted);
  margin: 1rem 0 .4rem .5rem;
  letter-spacing: .08em;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .85rem;
  color: var(--c-text);
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  transition: all .2s;
}

.nav-link i {
  font-size: 1.25rem;
  color: var(--c-muted);
  transition: color .2s;
}

.nav-link:hover {
  background: var(--pbg);
  color: var(--c-accent);
}

.nav-link:hover i {
  color: var(--c-accent);
}

.nav-link.active {
  background: rgba(156, 123, 232, 0.15);
  /* purp con alpha */
  color: var(--c-accent);
  border-left: 4px solid var(--c-accent);
}

.nav-link.active i {
  color: var(--c-accent);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 2px solid var(--c-border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.theme-toggle-sb {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: none;
  border: none;
  color: var(--c-muted);
  font-weight: 700;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: .5rem;
  transition: color .2s;
}

.theme-toggle-sb:hover {
  color: var(--c-text);
}

.btn-sidebar-logout {
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: .5rem;
  color: var(--c-danger);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: background .2s;
  border-radius: 8px;
}

.btn-sidebar-logout:hover {
  background: var(--rbg);
}

/* ── Content Layout ───────────────────────────────── */
.main-wrapper {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── Mobile Tweaks ────────────────────────────────── */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--c-text);
  box-shadow: var(--shadow-sm);
  touch-action: manipulation;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow2);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .main-content {
    padding: 2rem 1rem;
    padding-top: 4rem;
    /* espacio para el burger */
  }
}

/* ══════════════════════════════════════════════
   NAVBAR — Duolingo clean top bar
══════════════════════════════════════════════ */
/* This section is removed as per instructions */

/* Nav CTA buttons — 3D Duolingo style */
.btn-primary,
.btn-outline,
.btn-premium,
.btn-join,
.btn-logout,
.nav-btn-green,
.nav-btn-blue {
  padding: .5rem 1.1rem;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--tr);
  border: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.btn-primary {
  background: var(--purp);
  color: #fff;
  box-shadow: 0 4px 0 var(--pdk)
}

.btn-primary:hover {
  box-shadow: 0 6px 0 var(--pdk);
  transform: translateY(-2px);
  opacity: 1
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--c-border);
  color: var(--c-text);
}

.btn-outline:hover {
  border-color: var(--purp);
  color: var(--purp);
  opacity: 1
}

.btn-premium {
  background: linear-gradient(135deg, var(--yell), #f97316);
  color: #111;
  box-shadow: 0 4px 0 var(--ydk)
}

.btn-premium:hover {
  box-shadow: 0 6px 0 var(--ydk);
  transform: translateY(-2px);
  opacity: 1
}

.btn-join {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 0 var(--gdk)
}

.btn-join:hover {
  box-shadow: 0 6px 0 var(--gdk);
  transform: translateY(-2px);
  opacity: 1
}

.btn-logout {
  background: none;
  color: var(--c-muted);
  font-size: .85rem;
  padding: .4rem .7rem
}

.btn-logout:hover {
  color: var(--red);
  opacity: 1
}

.nav-user {
  display: flex;
  align-items: center;
  gap: .5rem
}

.user-name {
  font-size: .82rem;
  color: var(--c-muted);
  font-weight: 700
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 2px solid var(--c-border);
  border-radius: 9px;
  padding: .35rem .55rem;
  cursor: pointer;
  color: var(--c-muted);
  font-size: 1rem;
  line-height: 1;
  transition: all var(--tr);
}

.theme-toggle:hover {
  border-color: var(--purp);
  color: var(--purp)
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--c-text);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
}

.inline {
  display: inline
}

/* ══════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════ */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 2rem;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem
}

.container-sm {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1.5rem
}

.container-md {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem
}

/* ══════════════════════════════════════════════
   BUTTONS (full set — compatible with btn-accent etc.)
══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: var(--fb);
  font-size: .95rem;
  font-weight: 800;
  line-height: 1;
  user-select: none;
  transition: transform var(--tr), box-shadow var(--tr), background var(--tr);
}

.btn:hover {
  transform: translateY(-2px)
}

.btn:active {
  transform: translateY(1px)
}

.btn-accent,
.btn.btn-accent {
  background: var(--purp);
  color: #fff;
  box-shadow: 0 4px 0 var(--pdk);
}

.btn-accent:hover {
  box-shadow: 0 7px 0 var(--pdk);
  opacity: 1
}

.btn-secondary,
.btn.btn-secondary {
  background: var(--c-surface2);
  color: var(--c-text);
  border: 2px solid var(--c-border);
}

.btn-secondary:hover {
  border-color: var(--purp);
  opacity: 1
}

.btn-success,
.btn.btn-success,
.btn.green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 0 var(--gdk);
}

.btn-success:hover,
.btn.green:hover {
  box-shadow: 0 7px 0 var(--gdk);
  opacity: 1
}

.btn-danger,
.btn.btn-danger,
.btn.red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 0 var(--rdk);
}

.btn-danger:hover,
.btn.red:hover {
  box-shadow: 0 7px 0 var(--rdk);
  opacity: 1
}

.btn.blue {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 0 var(--bdk);
}

.btn.blue:hover {
  box-shadow: 0 7px 0 var(--bdk);
  opacity: 1
}

.btn.yell {
  background: var(--yell);
  color: #333;
  box-shadow: 0 4px 0 var(--ydk);
}

.btn.yell:hover {
  box-shadow: 0 7px 0 var(--ydk);
  opacity: 1
}

.btn.ghost,
.btn-ghost {
  background: none;
  border: 2px solid var(--c-border);
  color: var(--c-muted);
}

.btn.ghost:hover,
.btn-ghost:hover {
  border-color: var(--purp);
  color: var(--purp);
  opacity: 1
}

.btn-lg,
.btn.large {
  padding: 1rem 2.2rem;
  font-size: 1.1rem;
  border-radius: 14px
}

.btn-sm,
.btn.btn-sm {
  padding: .35rem .8rem;
  font-size: .8rem;
  border-radius: 8px
}

.btn-block,
.btn.btn-block,
.btn.full {
  width: 100%
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important
}

/* ══════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════ */
.card {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--tr), transform var(--tr), box-shadow var(--tr);
}

.card:hover {
  border-color: var(--purp);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem
}

.card-title {
  font-family: var(--ff);
  font-size: 1.15rem;
  font-weight: 800
}

/* ══════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1rem
}

label {
  font-size: .82rem;
  font-weight: 800;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .08em
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
  background: var(--c-surface2);
  border: 2px solid var(--c-border);
  color: var(--c-text);
  border-radius: 12px;
  padding: .7rem 1rem;
  font-family: var(--fb);
  font-size: .95rem;
  font-weight: 700;
  outline: none;
  transition: border-color var(--tr);
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--purp)
}

select {
  cursor: pointer
}

textarea {
  resize: vertical;
  min-height: 120px
}

/* ══════════════════════════════════════════════
   PILLS (topic / time selectors)
══════════════════════════════════════════════ */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.pill {
  padding: 8px 18px;
  border-radius: 50px;
  border: 2px solid var(--c-border);
  background: var(--c-surface2);
  color: var(--c-muted);
  font-weight: 800;
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--tr);
}

.pill:hover {
  border-color: var(--purp);
  color: var(--purp)
}

.pill.active {
  background: var(--green);
  border-color: var(--gdk);
  color: #fff
}

.pill.active-blue {
  background: var(--blue);
  border-color: var(--bdk);
  color: #fff
}

.pill.active-purp {
  background: var(--purp);
  border-color: var(--pdk);
  color: #fff
}

/* ══════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none
}

.modal-box {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: 22px;
  padding: 2rem 2.25rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow2);
  animation: modalUp .3s cubic-bezier(.34, 1.56, .64, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem
}

.modal-title {
  font-family: var(--ff);
  font-size: 1.5rem;
  font-weight: 800
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--c-muted);
  padding: .25rem .5rem;
  border-radius: 8px;
  transition: color var(--tr);
}

.modal-close:hover {
  color: var(--red)
}

/* ══════════════════════════════════════════════
   STATS GRID
══════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem
}

.stat-card {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: transform var(--tr), box-shadow var(--tr);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(139, 92, 246, .18);
  border-color: var(--purp)
}

.stat-value {
  font-family: var(--ff);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--purp)
}

.stat-label {
  font-size: .82rem;
  color: var(--c-muted);
  font-weight: 700
}

.stat-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--c-border);
  overflow: hidden;
  margin-top: .25rem
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: 3px;
  transition: width .6s ease
}

/* ══════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 2px solid var(--c-border)
}

table {
  width: 100%;
  border-collapse: collapse
}

th,
td {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .9rem
}

th {
  background: var(--c-surface2);
  color: var(--c-muted);
  font-weight: 800;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

tr {
  border-bottom: 1px solid var(--c-border);
  transition: background var(--tr)
}

tr:last-child {
  border-bottom: none
}

tr:hover {
  background: var(--c-surface2)
}

/* ══════════════════════════════════════════════
   ALERTS / BADGES
══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge-green {
  background: var(--gbg);
  color: var(--gdk)
}

.badge-blue {
  background: var(--bbg);
  color: var(--bdk)
}

.badge-yellow {
  background: var(--ybg);
  color: var(--ydk)
}

.badge-red {
  background: var(--rbg);
  color: var(--rdk)
}

.badge-purple {
  background: var(--pbg);
  color: var(--pdk)
}

.alert {
  padding: .85rem 1.1rem;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 1rem
}

.alert-danger {
  background: var(--rbg);
  border: 2px solid var(--red);
  color: var(--rdk)
}

.alert-success {
  background: var(--gbg);
  border: 2px solid var(--green);
  color: var(--gdk)
}

.alert-warn {
  background: var(--ybg);
  border: 2px solid var(--yell);
  color: var(--ydk)
}

.alert-info {
  background: var(--bbg);
  border: 2px solid var(--blue);
  color: var(--bdk)
}

/* ══════════════════════════════════════════════
   HOME PAGE
══════════════════════════════════════════════ */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--pbg);
  color: var(--pdk);
  border: 2px solid var(--purp);
  border-radius: 50px;
  padding: .4rem 1.1rem;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.25rem;
  animation: slideDown .4s ease;
}

.hero-title {
  font-family: var(--ff);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--c-text);
  margin-bottom: 1.1rem;
  animation: up .5s cubic-bezier(.34, 1.56, .64, 1) .1s both;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--c-muted);
  font-weight: 700;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 2rem;
  animation: up .5s cubic-bezier(.34, 1.56, .64, 1) .2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: up .5s cubic-bezier(.34, 1.56, .64, 1) .3s both;
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
  padding: 1rem 0 3rem;
}

.feature-card {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr);
  animation: up .5s ease both;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--purp);
  box-shadow: var(--shadow2)
}

.feature-card:nth-child(1) {
  animation-delay: .05s
}

.feature-card:nth-child(2) {
  animation-delay: .10s
}

.feature-card:nth-child(3) {
  animation-delay: .15s
}

.feature-card:nth-child(4) {
  animation-delay: .20s
}

.feature-icon {
  font-size: 2.5rem
}

.feature-title {
  font-family: var(--ff);
  font-size: 1.15rem;
  font-weight: 800
}

.feature-desc {
  font-size: .88rem;
  color: var(--c-muted);
  font-weight: 700;
  line-height: 1.55
}

/* ══════════════════════════════════════════════
   DASHBOARD (profe logged in)
══════════════════════════════════════════════ */
.dashboard-header {
  margin-bottom: 2rem
}

.dashboard-header h1 {
  font-family: var(--ff);
  font-size: 2.2rem;
  font-weight: 800;
}

.dashboard-header p {
  color: var(--c-muted);
  font-size: .95rem;
  margin-top: .25rem
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.action-card {
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--c-text);
  border: 2px solid transparent;
  transition: transform var(--tr), box-shadow var(--tr);
}

.action-card:hover {
  transform: translateY(-3px);
  opacity: 1
}

.action-card .ac-icon {
  font-size: 2.2rem
}

.action-card .ac-title {
  font-family: var(--ff);
  font-size: 1.05rem;
  font-weight: 800
}

.action-card .ac-sub {
  font-size: .8rem;
  opacity: .75;
  font-weight: 700
}

.ac-purp {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 6px 0 #6d28d9, 0 10px 24px rgba(139, 92, 246, .35)
}

.ac-purp:hover {
  box-shadow: 0 10px 0 #6d28d9, 0 16px 36px rgba(139, 92, 246, .45) !important
}

.ac-green {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 6px 0 #047857, 0 10px 24px rgba(16, 185, 129, .35)
}

.ac-green:hover {
  box-shadow: 0 10px 0 #047857, 0 16px 36px rgba(16, 185, 129, .45) !important
}

.ac-blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 6px 0 #1d4ed8, 0 10px 24px rgba(59, 130, 246, .35)
}

.ac-blue:hover {
  box-shadow: 0 10px 0 #1d4ed8, 0 16px 36px rgba(59, 130, 246, .45) !important
}

.ac-yell {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1100;
  box-shadow: 0 6px 0 #b45309, 0 10px 24px rgba(245, 158, 11, .35)
}

.ac-yell:hover {
  box-shadow: 0 10px 0 #b45309, 0 16px 36px rgba(245, 158, 11, .45) !important
}

/* Section title divider */
.section-title {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-muted);
  margin: 1.75rem 0 .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border)
}

/* ══════════════════════════════════════════════
   EVALUACIONES LIST ITEMS
══════════════════════════════════════════════ */
.eval-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  transition: border-color var(--tr), transform var(--tr);
}

.eval-row:hover {
  border-color: var(--purp);
  transform: translateX(3px)
}

.eval-icon {
  font-size: 1.5rem
}

.eval-name {
  flex: 1;
  font-weight: 800;
  font-size: .95rem
}

.eval-meta {
  font-size: .78rem;
  color: var(--c-muted);
  font-weight: 700
}

/* ══════════════════════════════════════════════
   QUIZ HOST / QUESTIONS
══════════════════════════════════════════════ */
.q-card {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.q-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--purp));
}

.q-topic {
  display: inline-block;
  background: var(--c-surface2);
  border: 2px solid var(--c-border);
  border-radius: 50px;
  padding: 4px 16px;
  font-size: .72rem;
  font-weight: 800;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.25rem;
}

.q-text {
  font-family: var(--ff);
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  font-weight: 800;
  line-height: 1.3
}

.opts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: 1.25rem
}

.opt {
  background: var(--c-surface);
  border: 2.5px solid var(--c-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  font-family: var(--fb);
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: .65rem;
  transition: all .18s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 3px 0 var(--c-border);
}

.opt:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--bbg);
  transform: translateY(-3px);
  box-shadow: 0 6px 0 var(--bdk)
}

.opt:disabled {
  cursor: default
}

.opt.correct {
  background: var(--gbg);
  border-color: var(--green);
  box-shadow: 0 3px 0 var(--gdk);
  animation: correct .4s ease
}

.opt.wrong {
  background: var(--rbg);
  border-color: var(--red);
  box-shadow: 0 3px 0 var(--rdk);
  animation: shake .35s ease
}

.opt-lbl {
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--c-surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff);
  font-size: .9rem;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}

.opt.correct .opt-lbl {
  background: var(--green);
  color: #fff
}

.opt.wrong .opt-lbl {
  background: var(--red);
  color: #fff
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer {
  border-top: 2px solid var(--c-border);
  margin-top: auto
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .82rem;
  color: var(--c-muted);
  font-weight: 700;
}

.footer-inner a {
  color: var(--c-muted)
}

.footer-inner a:hover {
  color: var(--purp);
  opacity: 1
}

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.97)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes modalUp {
  from {
    opacity: 0;
    transform: scale(.9)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(-8px)
  }

  75% {
    transform: translateX(8px)
  }
}

@keyframes correct {
  0% {
    transform: scale(1)
  }

  40% {
    transform: scale(1.04)
  }

  100% {
    transform: scale(1)
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateX(-14px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(.3) rotate(-8deg)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 600px) {

  .nav-toggle {
    display: block
  }

  .hero {
    padding: 3rem 1rem 2rem
  }

  .features {
    grid-template-columns: 1fr
  }

  .opts-grid {
    grid-template-columns: 1fr
  }
}

/* ══════════════════════════════════════════════
   UTILITY
══════════════════════════════════════════════ */
.text-center {
  text-align: center
}

.text-muted {
  color: var(--c-muted)
}

.mt-1 {
  margin-top: .5rem
}

.mt-2 {
  margin-top: 1rem
}

.mt-3 {
  margin-top: 1.5rem
}

.mb-1 {
  margin-bottom: .5rem
}

.mb-2 {
  margin-bottom: 1rem
}

.mb-3 {
  margin-bottom: 1.5rem
}

.gap-1 {
  gap: .5rem
}

.flex {
  display: flex;
  align-items: center;
  flex-wrap: wrap
}

.flex-1 {
  flex: 1
}

.hidden {
  display: none !important
}