/* ═══════════════════════════════════════════════════
   site.css — Stylesheet toàn cục cho LMS.Ovncr

   Cấu trúc:
   1. CSS Variables   — màu sắc, font, kích thước layout
   2. Reset           — box-sizing, base styles
   3. Typography      — font system (Inter cho UI, Roboto cho body, Roboto Mono cho code)
   4. Layout          — sidebar, header, main-wrapper
   5. Components      — card-custom, table-custom, badge-custom, buttons, forms
   6. Auth pages      — .auth-card, .auth-page (dark-themed login/register)
   7. Sidebar states  — collapsed sidebar, tooltip, Material Design Stitch overrides
   8. Question Builder — .qb-type-card, .answer-row, .qb-difficulty-btn, .tf-btn

   Quy ước đặt tên:
   - Selector tự định nghĩa: *-custom hoặc tên kebab-case
   - Bootstrap classes được ghi đè với specificity thấp nhất có thể
   - Font families bảo vệ icon fonts (Font Awesome) khỏi bị ghi đè
═══════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════
   1. CSS VARIABLES — Thiết kế token
   Thay đổi màu sắc/kích thước toàn bộ app tại đây.
═══════════════════════════════════════════════════ */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --sidebar-width: 260px;
  --header-height: 64px;
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Typography System ── */
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-body: 'Roboto', system-ui, sans-serif;
  --font-code: 'Roboto Mono', 'Courier New', monospace;

  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --leading-tight: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;
}

/* ═══════════════════════════════════════════════════
   2. RESET — Global box-sizing
═══════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════
   3. TYPOGRAPHY — Phân cấp font theo vai trò UI
   - Inter:       heading, button, label, nav (sharp, authoritative)
   - Roboto:      body text, table, form input (readable)
   - Roboto Mono: code, IP, flag, terminal (monospace cho cybersec)
═══════════════════════════════════════════════════ */

/* ── Headings → Inter (authority + precision) ── */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

h1,
.h1 {
  font-size: var(--text-3xl);
}

h2,
.h2 {
  font-size: var(--text-2xl);
}

h3,
.h3 {
  font-size: var(--text-xl);
}

h4,
.h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

h5,
.h5 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

h6,
.h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

/* ── Navigation → Inter ── */
.navbar,
.navbar *,
.nav-link,
.sidebar,
.sidebar * {
  font-family: var(--font-ui);
  font-weight: var(--weight-medium);
}

/* ── Buttons → Inter (sharp, authoritative) ── */
.btn,
button,
[type="button"],
[type="submit"] {
  font-family: var(--font-ui);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
}

/* ── Form labels → Inter; inputs → Roboto ── */
label,
.form-label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
}

.form-control,
.form-select,
textarea,
input {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

/* ── Tables ── */
table th {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

table td {
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

/* ── Badges ── */
.badge,
.tag {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
}

/* ── Code / Mono — CRITICAL for cybersecurity LMS ── */
code,
pre,
kbd,
samp,
.scenario-flag,
.ip-address,
.port-number,
.terminal,
.console-output,
.font-code {
  font-family: var(--font-code) !important;
  font-size: var(--text-sm);
}

/* ── Cards ── */
.card-title {
  font-family: var(--font-ui);
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
}

.card-text,
.card-body p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

/* ── Utility classes ── */
.font-ui {
  font-family: var(--font-ui) !important;
}

.font-body {
  font-family: var(--font-body) !important;
}

.text-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

/* ── Protect Icon Fonts ── */
.fas,
.far,
.fal,
.fa-solid,
.fa-regular,
.fa-light {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
}

.fab,
.fa-brands {
  font-family: "Font Awesome 5 Brands" !important;
  font-weight: 400 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* FIX-01: Landing page (no-sidebar = chưa login hoặc trang đặc biệt)
   phải reset body để dark background (#030712) không bị đè bởi --bg-main */
body.no-sidebar {
  display: block;
  /* tắt flex — tránh layout conflict với .landing-wrapper */
  background-color: transparent;
  /* landing-wrapper tự đặt màu nền */
  color: inherit;
}

/* Base Transitions */
a,
button,
.card-custom,
.form-control,
.sidebar-menu a {
  transition: var(--transition-base);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* ═══════════════════════════════════════════════════
   4. LAYOUT — Sidebar + Header + Content area
   Sidebar cố định bên trái (fixed), main-wrapper dịch phải.
   Header sticky dùng backdrop-filter blur để tạo hiệu ứng kính mờ.
═══════════════════════════════════════════════════ */

/* Layout */
.wrapper {
  display: flex;
  width: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050; /* High index to float above content on mobile */
  display: flex;
  flex-direction: column;
  transform: translateX(-100%); /* Slide out off-screen by default */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

html.sidebar-open .sidebar {
  transform: translateX(0); /* Slide in drawer on mobile */
}

/* Sidebar Backdrop on mobile viewports */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

html.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.sidebar-menu {
  list-style: none;
  padding: 1.25rem 0;
  margin: 0;
}

.sidebar-menu li {
  padding: 0.2rem 1rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 14px;
  position: relative;
}

.sidebar-menu a i,
.sidebar-menu a svg {
  margin-right: 0.85rem;
  width: 19px;
  height: 19px;
  transition: transform 0.3s ease;
}

.sidebar-menu a:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  transform: translateX(4px);
}

.sidebar-menu a:hover i,
.sidebar-menu a:hover svg {
  transform: scale(1.1);
}

.sidebar-menu a.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-menu a.active::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 20%;
  bottom: 20%;
  width: 4px;
  background-color: var(--primary);
  border-radius: 0 4px 4px 0;
}

.main-wrapper {
  flex: 1;
  margin-left: 0 !important; /* Mobile-first: no margin push */
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-header {
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 999;
}

.content-area {
  padding: 1rem; /* Responsive padding default */
  flex: 1;
}

@media (min-width: 768px) {
  .content-area {
    padding: 1.5rem;
  }
}

@media (min-width: 992px) {
  .sidebar {
    transform: translateX(0) !important; /* Always visible on desktop */
    z-index: 1000;
  }
  
  .main-wrapper {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width));
  }

  .content-area {
    padding: 2rem;
  }
  
  /* Collapsed states only apply on desktop */
  html.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
  }
  
  html.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed-width) !important;
    width: calc(100% - var(--sidebar-collapsed-width));
  }
}

/* ═══════════════════════════════════════════════════
   5. COMPONENTS — Card, Table, Badge, Buttons, Forms
═══════════════════════════════════════════════════ */

/* Page Components */
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card-custom {
  background-color: var(--bg-surface);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-custom:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.card-header-custom {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body-custom {
  padding: 1.5rem;
}

/* Forms */
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  padding: 0.625rem 0.875rem;
  font-size: 14px;
  background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* Buttons */
.btn {
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  font-size: 14px;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary);
  border: none;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-outline-secondary {
  color: var(--text-main);
  border: 1px solid var(--border-color);
  background-color: white;
}

.btn-outline-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

/* Responsive Table Wrapper */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

/* Table */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-custom th {
  background-color: #f8fafc;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.table-custom td {
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.table-custom tbody tr {
  transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
  background-color: #f1f5f9;
}

/* Badges */
.badge-custom {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════
   6. AUTH PAGES — Trang đăng nhập / đăng ký
   Dark-themed với nền tối (#030712), input semi-transparent.
   body.no-sidebar ẩn sidebar + header để trang auth toàn màn hình.
═══════════════════════════════════════════════════ */

/* Auth overrides */
.no-sidebar .sidebar {
  display: none;
}

body.no-sidebar .main-wrapper {
  margin-left: 0 !important;
}

.no-sidebar .top-header {
  display: none;
}

/* ═══════════════════════════════════════════════════
   7. SIDEBAR STATES
   7a. Collapsed: ẩn label text, chỉ hiển thị icon 52x52px.
   7b. Tooltip: hiển thị tên menu khi hover icon (JS-driven, appended to body).
   7c. Stitch overrides: Material Design token override từ _Layout.cshtml.
═══════════════════════════════════════════════════ */

/* Sidebar Collapsed State */
:root {
  --sidebar-collapsed-width: 88px;
}

html.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

html.sidebar-collapsed .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

html.sidebar-collapsed .sidebar-header {
  justify-content: center !important;
  padding: 0 !important;
}

html.sidebar-collapsed .sidebar-header>a {
  display: none !important;
}

html.sidebar-collapsed .sidebar-header .toggle-btn {
  margin: 0 auto;
}

/* Icon container: khung bo tròn 48x48px giống mẫu PREP */
html.sidebar-collapsed .sidebar-menu li {
  padding: 0.2rem 0 !important;
  display: flex;
  justify-content: center;
}

html.sidebar-collapsed .sidebar-menu a {
  justify-content: center;
  padding: 0 !important;
  width: 52px;
  height: 52px;
  border-radius: 14px !important;
  display: flex;
  align-items: center;
  transform: none !important;
}

html.sidebar-collapsed .sidebar-menu a:hover {
  transform: none !important;
  background-color: var(--primary-light) !important;
  color: var(--primary) !important;
}

html.sidebar-collapsed .sidebar-menu a.active {
  background-color: var(--primary-light) !important;
  color: var(--primary) !important;
}

html.sidebar-collapsed .sidebar-menu a i,
html.sidebar-collapsed .sidebar-menu a svg {
  margin-right: 0 !important;
  width: 26px !important;
  height: 26px !important;
  flex-shrink: 0;
}

html.sidebar-collapsed .sidebar-menu a .menu-text,
html.sidebar-collapsed .menu-heading {
  display: none !important;
}


/* ── Sidebar Tooltip (JS-driven, appended to body để tránh bị clip) ── */
#sidebar-tooltip {
  position: fixed;
  background-color: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-ui);
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.18s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  letter-spacing: 0.01em;
}

#sidebar-tooltip.visible {
  opacity: 1;
}

/* ── Auth page layout ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  padding: 32px 28px;
  /* compact but breathable */
}

/* Reduce spacing between form elements */
.auth-card .mb-3 {
  margin-bottom: 12px !important;
}

.auth-card .mb-4 {
  margin-bottom: 16px !important;
}

/* Logo area — tighter */
.auth-card .auth-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
}

.auth-card .auth-title {
  font-size: 20px;
  margin-bottom: 4px;
}

.auth-card .auth-subtitle {
  font-size: 12px;
  margin-bottom: 20px;
}

/* Button — compact */
.auth-card .btn-login,
.auth-card .btn-register {
  padding: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* Footer link */
.auth-card .auth-footer {
  font-size: 12px;
  margin-top: 16px;
  text-align: center;
}

.login-card .form-control,
.register-card .form-control,
.auth-card .form-control,
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
  background-color: rgba(15, 23, 42, 0.6) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card .form-control:focus {
  background-color: rgba(15, 23, 42, 0.9) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
  outline: none;
}

.auth-card .form-control::placeholder {
  color: #64748b !important;
}

/* Input group icon fix */
.auth-card .input-group-text {
  background-color: #1a2535 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  color: #94a3b8 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card .input-group:focus-within .input-group-text {
  background-color: #1e293b !important;
  border-color: var(--primary);
  color: var(--primary) !important;
}

.auth-card .input-group:focus-within .form-control,
.auth-card .input-group:focus-within .btn-outline-secondary {
  border-color: var(--primary) !important;
}

/* Password toggle icon */
.auth-card .input-group .btn-outline-secondary {
  background-color: #1a2535 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  color: #94a3b8 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card .input-group .btn-outline-secondary:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

.auth-card .input-group:focus-within .btn-outline-secondary {
  background-color: #1e293b !important;
}

/* Fix browser autofill (yellow/white background) in dark mode */
.auth-card .form-control:-webkit-autofill,
.auth-card .form-control:-webkit-autofill:hover,
.auth-card .form-control:-webkit-autofill:focus,
.auth-card .form-control:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #1a2535 inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #f8fafc;
}

@media (max-width: 480px) {
  .auth-card {
    max-width: 100%;
    border-radius: 12px;
    padding: 24px 16px;
  }
}

/* ── Sidebar Stitch Overrides (L-1 FIX: moved from _Layout.cshtml inline <style>) ── */
.sidebar {
  background-color: var(--stitch-surface-container-lowest) !important;
  border-right: 1px solid var(--stitch-surface-container-low) !important;
  font-family: var(--font-body);
}

.sidebar-menu {
  padding: 0.5rem 0 !important;
}

.sidebar-menu li {
  padding: 0.125rem 1rem !important;
}

.sidebar-menu a {
  border-radius: var(--radius-pill) !important;
  padding: 0.5rem 1rem !important;
  color: var(--stitch-on-surface-variant) !important;
  font-weight: 500 !important;
  transition: all 0.25s ease !important;
}

.sidebar-menu a:hover {
  background-color: var(--stitch-surface-container-low) !important;
  color: var(--stitch-primary) !important;
  transform: translateX(3px) !important;
}

.sidebar-menu a.active {
  background-color: var(--stitch-primary-fixed) !important;
  color: var(--stitch-primary-container) !important;
  font-weight: 600 !important;
}

.sidebar-menu a.active::before {
  display: none !important;
}

.menu-heading {
  color: var(--stitch-on-surface-variant) !important;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════
   STEP-BY-STEP QUESTION BUILDER
═══════════════════════════════════════════════════ */

/* Type Selector Cards */
.qb-type-card {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  text-align: center;
  background: #fff;
  transition: all .2s ease;
  user-select: none;
  height: 100%;
}
.qb-type-card:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59,130,246,.15);
}
.qb-type-card.selected {
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 6px 20px rgba(37,99,235,.2);
}
.qb-type-icon { font-size: 2rem; margin-bottom: .5rem; }
.qb-type-label { font-weight: 700; font-size: 14px; color: #1e293b; margin-bottom: .25rem; }
.qb-type-desc  { font-size: 11.5px; color: #64748b; }

/* Answer Rows */
.answer-row {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .625rem;
  border-radius: 10px;
  margin-bottom: .5rem;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  transition: all .2s;
}
.answer-row.correct {
  border-color: #22c55e;
  background: #f0fdf4;
}
.answer-label {
  min-width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: #f1f5f9; color: #475569;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
  transition: all .2s;
}
.answer-row.correct .answer-label {
  background: #dcfce7; color: #16a34a;
}

/* Difficulty Buttons */
.qb-difficulty-btn {
  padding: .35rem .9rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: #475569;
  transition: all .18s;
}
.qb-difficulty-btn:hover { border-color: #94a3b8; background: #f1f5f9; }
.qb-difficulty-btn.active {
  border-color: #2563eb; background: #dbeafe; color: #1d4ed8; font-weight: 700;
}

/* True/False Big Buttons */
.tf-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  color: #374151;
}
.tf-btn:hover { border-color: #94a3b8; background: #f8fafc; transform: translateY(-2px); }
.tf-btn.selected-true  { border-color: #22c55e; background: #dcfce7; color: #15803d; }
.tf-btn.selected-false { border-color: #ef4444; background: #fee2e2; color: #b91c1c; }