/* ═══════════════════════════════════════════════════════════
   Introduccion – Ultra-Premium Addictive Visual System
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ── */
.ax-root {
  --ax-bg: #05070e;
  --ax-glass: rgba(12, 15, 30, .72);
  --ax-glass-border: rgba(255, 255, 255, .07);
  --ax-text: #eef2ff;
  --ax-text-dim: rgba(255, 255, 255, .5);
  --ax-text-muted: rgba(255, 255, 255, .25);
  --ax-accent: #7c3aed;
  --ax-glow: rgba(124, 58, 237, .45);
  --ax-success: #34d399;
  --ax-danger: #f87171;
  --ax-r: 20px;
  --ax-r-sm: 12px;
  --ax-ease: cubic-bezier(.4, 0, .2, 1);
  --ax-spring: cubic-bezier(.175, .885, .32, 1.275);
}

/* ── Root – override .content from OS ── */
.ax-root {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  background: var(--ax-bg) !important;
  color: var(--ax-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Neural Canvas Background ── */
#ax-bg-canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: 0;
  display: block !important;
}

/* ── Ambient Orbs (real divs, not ::before/after) ── */
.ax-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: axOrb 14s ease-in-out infinite alternate;
}

.ax-ambient-orb--purple {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 58, 237, .18), transparent 70%);
  top: -150px;
  right: -100px;
}

.ax-ambient-orb--blue {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(59, 130, 246, .12), transparent 70%);
  bottom: -140px;
  left: -80px;
  animation-delay: -7s;
}

@keyframes axOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(40px, 25px) scale(1.2);
  }
}

/* ═══ SHELL ═══ */
.ax-root .ax-shell {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, .2) transparent;
}

.ax-shell::-webkit-scrollbar {
  width: 6px;
}

.ax-shell::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, .25);
  border-radius: 10px;
}

.ax-dashboard {
  max-width: 980px;
  margin: 0 auto;
  padding: 44px 48px 60px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ═══ HEADER ═══ */
.ax-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.ax-logo-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ax-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(124, 58, 237, .35);
  transition: transform .4s var(--ax-spring);
}

.ax-logo-img:hover {
  transform: scale(1.1) rotate(-4deg);
}

.ax-logo-text {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ax-logo-sub {
  font-size: 11px;
  color: var(--ax-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 3px 0 0;
}

/* ── Stats Row ── */
.ax-hero-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  flex: 1;
  max-width: 580px;
}

.ax-stat-box {
  background: var(--ax-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--ax-glass-border);
  border-radius: var(--ax-r-sm);
  padding: 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  transition: all .3s var(--ax-spring);
  position: relative;
  overflow: hidden;
}

.ax-stat-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, .08), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.ax-stat-box:hover {
  transform: translateY(-5px) scale(1.03);
  border-color: rgba(124, 58, 237, .35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25), 0 0 24px rgba(124, 58, 237, .15);
}

.ax-stat-box:hover::before {
  opacity: 1;
}

.ax-stat-num {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

.ax-stat-label {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ax-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

/* ═══ ACTIONS BAR ═══ */
.ax-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .04);
  border-radius: 14px;
  padding: 10px 16px;
  backdrop-filter: blur(8px);
}

.ax-search-group {
  position: relative;
  min-width: 140px;
}

.ax-search-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ax-text-muted);
  font-size: 13px;
}

.ax-search-group input {
  width: 100%;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  padding: 10px 14px 10px 38px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all .3s;
}

.ax-search-group input:focus {
  border-color: var(--ax-accent);
  box-shadow: 0 0 0 3px var(--ax-glow);
  background: rgba(0, 0, 0, .35);
}

.ax-filter-select {
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  padding: 10px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all .3s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.4)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  min-width: 160px;
}

.ax-filter-select:hover {
  border-color: rgba(255, 255, 255, .12);
  background-color: rgba(0, 0, 0, .35);
}

.ax-filter-select:focus {
  border-color: var(--ax-accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .2);
  background-color: rgba(0, 0, 0, .35);
}

.ax-filter-select option {
  background: #0e1120;
  color: #fff;
}

.ax-bar-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, .08);
  flex-shrink: 0;
}

/* ═══ BUTTONS ═══ */
.ax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--ax-r-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s var(--ax-ease);
  font-family: inherit;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.ax-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), transparent);
  opacity: 0;
  transition: opacity .2s;
}

.ax-btn:hover::after {
  opacity: 1;
}

.ax-btn--primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  border-color: rgba(124, 58, 237, .3);
  box-shadow: 0 4px 20px var(--ax-glow);
}

.ax-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--ax-glow);
}

.ax-btn--primary:active {
  transform: translateY(0) scale(.97);
}

.ax-btn--ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--ax-text-dim);
  border-color: rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px);
}

.ax-btn--ghost:hover {
  background: rgba(255, 255, 255, .09);
  color: #fff;
  border-color: rgba(255, 255, 255, .15);
}

.ax-btn--danger {
  background: rgba(239, 68, 68, .06);
  color: var(--ax-danger);
  border-color: rgba(239, 68, 68, .15);
}

.ax-btn--danger:hover {
  background: rgba(239, 68, 68, .15);
  box-shadow: 0 4px 16px rgba(239, 68, 68, .15);
}

.ax-btn--sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* ═══ DECK CARDS ═══ */
.ax-decks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.ax-deck-card {
  background: var(--ax-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--ax-glass-border);
  border-radius: var(--ax-r);
  padding: 0;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all .35s var(--ax-spring);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: axCardIn .5s var(--ax-spring) forwards;
}

@keyframes axCardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.95);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Gradient top accent */
.ax-deck-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--deck-color, #7c3aed), color-mix(in srgb, var(--deck-color, #7c3aed), #fff 30%));
}

/* Shimmer on hover */
.ax-deck-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, .08), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
}

.ax-deck-card:hover::after {
  opacity: 1;
}

.ax-deck-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(255, 255, 255, .16);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, .3),
    0 0 24px rgba(124, 58, 237, .1);
}

.ax-deck-content {
  padding: 20px 18px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.ax-deck-cat {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--deck-color, var(--ax-accent));
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.ax-deck-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: auto;
  color: #fff;
}

.ax-deck-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding-top: 12px;
  margin-top: 6px;
}

.ax-deck-mini-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.ax-deck-mini-val {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.ax-deck-mini-label {
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, .35);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Progress footer ── */
.ax-deck-progress {
  padding: 0 18px 14px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}
.ax-deck-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.ax-deck-progress-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .3);
}
.ax-deck-progress-val {
  font-size: 11.5px;
  font-weight: 700;
}
.ax-deck-progress-status {
  font-weight: 400;
  opacity: .65;
  margin-left: 3px;
}
.ax-deck-progress-track {
  height: 5px;
  background: rgba(255, 255, 255, .07);
  border-radius: 10px;
  overflow: hidden;
}
.ax-deck-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width .5s ease;
}

/* ── Empty state ── */
.ax-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--ax-text-muted);
  font-size: 15px;
  font-weight: 600;
}

/* ═══ MODALS ═══ */
.ax-modal {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, .7);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: axFadeIn .25s var(--ax-ease);
}

@keyframes axFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.ax-modal-card {
  background: linear-gradient(145deg, #0e1120, #0a0d1a);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 28px;
  width: min(520px, 92%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(124, 58, 237, .08);
  animation: axModalIn .35s var(--ax-spring);
}

@keyframes axModalIn {
  from {
    transform: translateY(40px) scale(.92);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

.ax-editor-card {
  width: min(780px, 94%);
}

.ax-modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ax-modal-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ax-modal-close {
  background: none;
  border: none;
  color: var(--ax-text-muted);
  cursor: pointer;
  font-size: 20px;
  transition: all .2s;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ax-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.ax-modal-body {
  padding: 28px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ax-modal-footer {
  padding: 20px 32px 28px;
  border-top: 1px solid rgba(255, 255, 255, .05);
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ── Form Fields ── */
.ax-editor-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ax-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ax-field label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ax-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.ax-field input,
.ax-field select,
.ax-field textarea {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all .3s;
}

.ax-field input:focus,
.ax-field select:focus,
.ax-field textarea:focus {
  border-color: var(--ax-accent);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}

.ax-category-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Color Picker ── */
.ax-color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ax-color-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all .25s var(--ax-spring);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.ax-color-dot:hover {
  transform: scale(1.15);
}

.ax-color-dot.ax-selected {
  border-color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 20px var(--ax-glow);
}

/* ── Cards List (Editor) ── */
.ax-cards-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

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

.ax-cards-header h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0;
}

.ax-cards-header em {
  font-style: normal;
  color: var(--ax-accent);
  margin-left: 8px;
}

.ax-cards-list-container {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 14px;
  background: rgba(0, 0, 0, .15);
}

.ax-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  align-items: center;
  cursor: pointer;
  transition: background .2s;
}

.ax-card-row:hover {
  background: rgba(255, 255, 255, .03);
}

.ax-card-row:last-child {
  border-bottom: none;
}

.ax-card-row-q {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ax-card-row-a {
  font-size: 13px;
  color: var(--ax-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ax-row-delete {
  background: none;
  border: none;
  color: var(--ax-text-muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.ax-row-delete:hover {
  color: var(--ax-danger);
  background: rgba(239, 68, 68, .1);
}

/* ═══ CONTEXT MENU ═══ */
.ax-context-menu {
  position: absolute;
  z-index: 10000;
  background: linear-gradient(145deg, #181c2e, #12152a);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .6), 0 0 40px rgba(124, 58, 237, .08);
  animation: axFadeIn .12s;
  backdrop-filter: blur(20px);
}

.ax-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ax-text-dim);
  transition: all .15s;
}

.ax-menu-item i {
  width: 18px;
  text-align: center;
  font-size: 13px;
}

.ax-menu-item:hover {
  background: rgba(124, 58, 237, .12);
  color: #fff;
}

.ax-menu-danger:hover {
  background: rgba(239, 68, 68, .12);
  color: var(--ax-danger);
}

.ax-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, .05);
  margin: 4px 8px;
}

/* ═══ TOAST ═══ */
.ax-toast {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #181c30, #0e1120);
  border: 1px solid rgba(124, 58, 237, .4);
  border-radius: 14px;
  padding: 14px 28px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  z-index: 20000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(124, 58, 237, .12);
  animation: axModalIn .3s var(--ax-spring);
  backdrop-filter: blur(16px);
}

/* ═══ QUIZ OVERLAY ═══ */
.ax-quiz-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 12, .88);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  animation: axFadeIn .3s;
}

.ax-quiz-card {
  background: linear-gradient(145deg, #0e1120, #0a0d1a);
  border: 1px solid rgba(124, 58, 237, .25);
  border-radius: 32px;
  padding: 48px 44px;
  width: min(520px, 90%);
  text-align: center;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, .5),
    0 0 80px rgba(124, 58, 237, .08),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: axModalIn .4s var(--ax-spring);
}

.ax-quiz-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(124, 58, 237, .2), rgba(99, 102, 241, .1));
  border: 1px solid rgba(124, 58, 237, .25);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
}

.ax-quiz-prompt {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 28px;
}

.ax-quiz-input {
  width: 100%;
  resize: none;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(124, 58, 237, .2);
  border-radius: 16px;
  padding: 16px 20px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: all .3s;
}

.ax-quiz-input:focus {
  border-color: var(--ax-accent);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .15);
}

.ax-quiz-feedback {
  padding: 14px 20px;
  border-radius: 14px;
  margin: 16px 0;
  font-weight: 700;
  font-size: 15px;
}

.ax-quiz-feedback.ax-correct {
  background: rgba(52, 211, 153, .08);
  border: 1px solid rgba(52, 211, 153, .2);
  color: var(--ax-success);
}

.ax-quiz-feedback.ax-wrong {
  background: rgba(248, 113, 113, .08);
  border: 1px solid rgba(248, 113, 113, .2);
  color: var(--ax-danger);
}

.ax-quiz-feedback.ax-partial {
  background: rgba(251, 191, 36, .08);
  border: 1px solid rgba(251, 191, 36, .2);
  color: #fbbf24;
}

.ax-quiz-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.ax-quiz-score {
  margin-top: 24px;
  display: flex;
  gap: 20px;
  justify-content: center;
  color: var(--ax-text-dim);
  font-size: 14px;
  font-weight: 700;
}

/* Quiz mode badge */
.ax-quiz-mode-badge {
  display: inline-block;
  background: rgba(99, 102, 241, .12);
  border: 1px solid rgba(99, 102, 241, .2);
  color: #818cf8;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Mode picker in card editor */
.ax-quiz-mode-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ax-mode-btn {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  padding: 12px 8px;
  color: var(--ax-text-dim);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ax-mode-btn i {
  font-size: 18px;
  opacity: .5;
}

.ax-mode-btn:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
  color: #fff;
}

.ax-mode-btn.ax-active {
  background: linear-gradient(135deg, rgba(124, 58, 237, .2), rgba(99, 102, 241, .15));
  border-color: rgba(124, 58, 237, .4);
  color: #c4b5fd;
  box-shadow: 0 4px 16px rgba(124, 58, 237, .12);
}

.ax-mode-btn.ax-active i {
  opacity: 1;
  color: #a78bfa;
}

/* Option Inputs with Markers */
.ax-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.ax-option-mark,
.ax-tf-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2);
  background: transparent;
  color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all .2s;
  flex-shrink: 0;
}

.ax-option-mark:hover,
.ax-tf-mark:hover {
  border-color: var(--ax-accent);
}

.ax-mark-correct {
  background: var(--ax-accent);
  border-color: var(--ax-accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(124, 58, 237, .4);
}

.ax-option-input,
.ax-tf-input {
  flex: 1;
  background: rgba(0, 0, 0, .2);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.ax-option-input:focus,
.ax-tf-input:focus {
  border-color: var(--ax-accent);
}

/* Quiz choice buttons */
.ax-quiz-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.ax-quiz-choice-btn {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 16px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
}

.ax-quiz-choice-btn:hover:not(:disabled) {
  background: rgba(124, 58, 237, .15);
  border-color: rgba(124, 58, 237, .3);
  transform: scale(1.02);
}

.ax-quiz-choice-btn.ax-choice-correct {
  background: rgba(52, 211, 153, .15) !important;
  border-color: #34d399 !important;
  color: #34d399;
}

.ax-quiz-choice-btn.ax-choice-wrong {
  background: rgba(248, 113, 113, .15) !important;
  border-color: #f87171 !important;
  color: #f87171;
}

.ax-quiz-choice-btn:disabled {
  opacity: .6;
  cursor: default;
}

/* True/False */
.ax-quiz-tf-label {
  font-size: 18px;
  color: var(--ax-text-dim);
  font-weight: 600;
  margin: 8px 0 16px;
}

.ax-quiz-tf-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.ax-quiz-tf-btn {
  flex: 1;
  max-width: 180px;
  padding: 16px 24px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #c4b5fd;
}

.ax-quiz-tf-btn:hover:not(:disabled) {
  background: rgba(124, 58, 237, .15);
  border-color: rgba(124, 58, 237, .4);
  transform: scale(1.03);
  color: #fff;
}

.ax-tf-correct {
  background: rgba(52, 211, 153, .15) !important;
  box-shadow: 0 0 20px rgba(52, 211, 153, .25) !important;
  border-color: #34d399 !important;
  color: #34d399 !important;
}

.ax-tf-wrong {
  background: rgba(248, 113, 113, .15) !important;
  box-shadow: 0 0 20px rgba(248, 113, 113, .25) !important;
  border-color: #f87171 !important;
  opacity: .6;
  color: #f87171 !important;
}

/* Scramble */
.ax-scramble-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 8px 0 16px;
}

.ax-scramble-tile {
  width: 38px;
  height: 42px;
  background: linear-gradient(145deg, rgba(124, 58, 237, .18), rgba(99, 102, 241, .12));
  border: 1px solid rgba(124, 58, 237, .3);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
}

.ax-scramble-tile:hover:not(:disabled) {
  background: rgba(124, 58, 237, .3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, .2);
}

.ax-scramble-tile.ax-used {
  opacity: .2;
  transform: scale(.9);
  pointer-events: none;
}

.ax-scramble-answer {
  min-height: 44px;
  background: rgba(0, 0, 0, .2);
  border: 1px dashed rgba(124, 58, 237, .2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 18px;
  font-weight: 700;
  color: #c4b5fd;
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ax-scramble-placeholder {
  font-size: 13px;
  color: var(--ax-text-muted);
  font-weight: 600;
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════════════════════
   STATISTICS MODAL
   ═══════════════════════════════════════════════════════════ */
.ax-stats-card {
  max-width: 780px !important;
  width: 95%;
}

.ax-stats-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, .2) transparent;
  padding: 4px 2px;
}

.ax-stats-body::-webkit-scrollbar {
  width: 5px;
}

.ax-stats-body::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, .2);
  border-radius: 10px;
}

/* KPI Row */
.ax-stats-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.ax-stats-kpi {
  background: var(--ax-glass);
  border: 1px solid var(--ax-glass-border);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.ax-stats-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
}

.ax-stats-kpi--purple::before {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.ax-stats-kpi--orange::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.ax-stats-kpi--green::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.ax-stats-kpi--red::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.ax-stats-kpi--blue::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.ax-stats-kpi-icon {
  font-size: 16px;
  opacity: .5;
}

.ax-stats-kpi--purple .ax-stats-kpi-icon {
  color: #a78bfa;
}

.ax-stats-kpi--orange .ax-stats-kpi-icon {
  color: #fbbf24;
}

.ax-stats-kpi--green .ax-stats-kpi-icon {
  color: #34d399;
}

.ax-stats-kpi--red .ax-stats-kpi-icon {
  color: #f87171;
}

.ax-stats-kpi--blue .ax-stats-kpi-icon {
  color: #60a5fa;
}

.ax-stats-kpi-val {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}

.ax-stats-kpi-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ax-text-muted);
}

/* Charts Row */
.ax-stats-charts-row {
  display: flex;
  gap: 16px;
}

.ax-stats-chart-box {
  background: var(--ax-glass);
  border: 1px solid var(--ax-glass-border);
  border-radius: 14px;
  padding: 20px;
  flex: 1;
}

.ax-stats-chart-box--wide {
  flex: 2;
}

.ax-stats-chart-box h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ax-text-dim);
  margin: 0 0 14px;
}

/* Donut */
.ax-stats-donut-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.ax-stats-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
}

.ax-stats-donut-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}

.ax-donut-leg {
  font-size: 11px;
  color: var(--ax-text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Deck Table */
.ax-stats-table-box {
  background: var(--ax-glass);
  border: 1px solid var(--ax-glass-border);
  border-radius: 14px;
  padding: 20px;
}

.ax-stats-table-box h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ax-text-dim);
  margin: 0 0 12px;
}

.ax-stats-table-scroll {
  overflow-x: auto;
}

.ax-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ax-stats-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ax-text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.ax-stats-table td {
  padding: 10px;
  color: var(--ax-text-dim);
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  white-space: nowrap;
}

.ax-stats-table tr:hover td {
  background: rgba(255, 255, 255, .02);
}

/* Mini bar in table */
.ax-stats-bar-mini {
  display: inline-block;
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, .06);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 6px;
}

.ax-stats-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #6366f1);
  border-radius: 3px;
  transition: width .3s;
}

/* Extra Stats Row */
.ax-stats-extra-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.ax-stats-extra-item {
  background: var(--ax-glass);
  border: 1px solid var(--ax-glass-border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.ax-stats-extra-val {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}

.ax-stats-extra-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--ax-text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ═══════════════════════════════════════════
   3-COLUMN LAYOUT — AprendeX Redesign
   ═══════════════════════════════════════════ */

/* Override shell to be a flex container */
#win-introduccion .ax-root {
  background: #0c0e14 !important;
}

#win-introduccion .ax-shell {
  flex: 1;
  overflow: hidden;
  position: relative;
  z-index: 1;
  padding: 0;
}

#win-introduccion .ax-layout-3col {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* ── Left Panel ── */
#win-introduccion .ax-panel-left {
  width: 220px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 18px 14px;
  border-right: 1px solid rgba(255,255,255,.06);
  background: #0e1018;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,.2) transparent;
}

/* ── Center Panel ── */
#win-introduccion .ax-panel-center {
  flex: 1;
  overflow: hidden;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  background: #0c0e14;
}

#win-introduccion .ax-panel-center .ax-decks-section {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,.2) transparent;
}

/* ── Right Panel ── */
#win-introduccion .ax-panel-right {
  width: 280px;
  flex-shrink: 0;
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,.06);
  background: #0e1018;
  padding: 0;
  display: flex;
  flex-direction: column;
}
#win-introduccion .ax-creator-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

/* ── Stat Cards (left panel) ── */
#win-introduccion .ax-stat-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 13px;
  transition: background .15s, border-color .15s;
  cursor: default;
}
#win-introduccion .ax-stat-card:hover {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.1);
}
#win-introduccion .ax-stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
#win-introduccion .ax-stat-card-val {
  font-size: 19px;
  font-weight: 800;
  color: #f0f0ff;
  letter-spacing: -.02em;
  line-height: 1;
}
#win-introduccion .ax-stat-card-lbl {
  font-size: 10.5px;
  color: rgba(255,255,255,.32);
  font-weight: 500;
  margin-top: 3px;
}

/* ── Creator Panel (right) ── */
#win-introduccion .ax-creator-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px 14px 0;
  overflow: hidden;
}
#win-introduccion .ax-creator-desc-field {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#win-introduccion .ax-creator-footer {
  flex-shrink: 0;
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#win-introduccion .ax-creator-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#win-introduccion .ax-creator-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.38);
}
#win-introduccion .ax-creator-input {
  width: 100%;
  padding: 8px 11px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  color: #f0f0ff;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
#win-introduccion .ax-creator-input:focus { border-color: rgba(124,58,237,.5); background: rgba(124,58,237,.06); }
#win-introduccion select.ax-creator-input { background-color: rgba(10,10,20,.9); cursor: pointer; }
#win-introduccion .ax-creator-textarea {
  resize: none;
  flex: 1;
  min-height: 0;
  line-height: 1.5;
}
#win-introduccion .ax-creator-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#win-introduccion .ax-creator-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  padding: 2px 0;
}
#win-introduccion .ax-creator-check:hover { color: rgba(255,255,255,.85); }
#win-introduccion .ax-creator-check input[type="checkbox"] { accent-color: #7c3aed; cursor: pointer; width: 14px; height: 14px; }

/* ── Deck Grid override for center panel ── */
#win-introduccion .ax-decks-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding: 2px;
}

/* ── Drag & Drop ── */
#win-introduccion .ax-deck-card[draggable="true"] { cursor: grab; }
#win-introduccion .ax-deck-card[draggable="true"]:active { cursor: grabbing; }
#win-introduccion .ax-deck-card.ax-drag-over {
  border-color: rgba(124,58,237,.7) !important;
  background: rgba(124,58,237,.1) !important;
  transform: scale(1.03);
  transition: transform .15s, border-color .15s;
}
#win-introduccion .ax-deck-card.ax-dragging {
  opacity: .4;
  transform: scale(.97);
}

/* ── Actions bar override ── */
#win-introduccion .ax-panel-center .ax-actions-bar {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  gap: 8px;
}

/* ── AI status spinner ── */
#win-introduccion #ax-ai-status {
  line-height: 1.5;
}
#win-introduccion .ax-ai-generating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(167,139,250,.7);
  font-size: 12px;
  padding: 8px 0;
}

/* ── Progress bar for AI generation ── */
#win-introduccion .ax-ai-progress {
  height: 3px;
  background: rgba(255,255,255,.07);
  border-radius: 10px;
  overflow: hidden;
  margin: 4px 0;
}
#win-introduccion .ax-ai-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #6366f1, #7c3aed);
  background-size: 200% 100%;
  animation: axProgressSlide 1.5s linear infinite;
  border-radius: 10px;
  width: 60%;
}
@keyframes axProgressSlide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Cloud sync badge on deck cards ── */
.ax-cloud-sync-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(248, 113, 113, .2);
  border: 1px solid rgba(248, 113, 113, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .25s ease;
}
.ax-cloud-sync-btn i {
  color: #f87171;
  pointer-events: none;
}
.ax-cloud-sync-btn:hover {
  transform: scale(1.15);
  background: rgba(248, 113, 113, .35);
  box-shadow: 0 0 10px rgba(248, 113, 113, .3);
}
