:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  box-sizing: border-box;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.allty {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}

a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

/* Prevent context menu on touch devices during drag */
[data-reference-card-index] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Ensure draggable cards don't trigger text selection or context menu */
[data-reference-card-index]:active {
  -webkit-touch-callout: none !important;
}
/* Minority Report Theme - Centralized Styles */

:root {
  /* Color Palette */
  --mr-bg-dark: radial-gradient(circle at 75% 80%, rgba(94, 234, 212, 0.4), rgba(2, 0, 36, 0.95));
  --mr-bg-card: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  --mr-bg-card-hover: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));

  /* Neon Colors */
  --mr-blue: #00a2ff;
  --mr-blue-glow: rgba(0, 162, 255, 0.8);
  --mr-blue-border: rgba(0, 162, 255, 0.4);

  --mr-purple: #a78bfa;
  --mr-purple-glow: rgba(139, 92, 246, 0.8);
  --mr-purple-border: rgba(139, 92, 246, 0.4);

  --mr-green: #4ade80;
  --mr-green-glow: rgba(34, 197, 94, 0.8);
  --mr-green-border: rgba(34, 197, 94, 0.4);

  --mr-red: #ef4444;
  --mr-red-glow: rgba(239, 68, 68, 0.8);
  --mr-red-border: rgba(239, 68, 68, 0.4);

  --mr-yellow: #fbbf24;
  --mr-yellow-glow: rgba(234, 179, 8, 0.8);
  --mr-yellow-border: rgba(234, 179, 8, 0.4);

  /* Text Colors */
  --mr-text-primary: #f1f5f9;
  --mr-text-secondary: #94a3b8;
  --mr-text-muted: #64748b;

  /* Border Radius */
  --mr-radius-sm: 6px;
  --mr-radius-md: 12px;
  --mr-radius-lg: 16px;
}

/* Light mode overrides — ensures text never disappears on light backgrounds */
.chakra-ui-light {
  --mr-bg-dark: radial-gradient(circle at bottom left, rgba(71, 85, 105, 0.6) 0%, rgba(148, 163, 184, 0.4) 30%, rgba(226, 232, 240, 0.3) 70%);
  --mr-bg-card: radial-gradient(circle at bottom left, rgba(71, 85, 105, 0.15), rgba(148, 163, 184, 0.2));
  --mr-bg-card-hover: radial-gradient(circle at bottom left, rgba(71, 85, 105, 0.25), rgba(148, 163, 184, 0.3));
  --mr-text-primary: #1a202c;
  --mr-text-secondary: #2d3748;
  --mr-text-muted: #4a5568;
  --mr-blue-border: rgba(71, 85, 105, 0.3);
  --mr-purple-border: rgba(71, 85, 105, 0.3);
  --mr-green-border: rgba(71, 85, 105, 0.3);
  --mr-red-border: rgba(71, 85, 105, 0.3);
  --mr-yellow-border: rgba(71, 85, 105, 0.3);
}

/* Base Card Style */
.mr-card {
  position: relative;
  background: var(--mr-bg-card);
  border: 1px solid var(--mr-blue-border);
  border-radius: var(--mr-radius-md);
  transition: border-color 120ms ease;
  overflow: hidden;
  user-select: none;
}

.chakra-ui-dark .mr-card {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 40px var(--mr-blue-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chakra-ui-light .mr-card {
  box-shadow:
    0 2px 8px rgba(100, 116, 139, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mr-card:hover {
  background: var(--mr-bg-card);
  transform: none;
}

.chakra-ui-dark .mr-card:hover {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.8),
    0 0 40px var(--mr-blue-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.chakra-ui-light .mr-card:hover {
  box-shadow:
    0 4px 12px rgba(100, 116, 139, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Color Variants */
.mr-card-blue {
  border-color: var(--mr-blue-border);
}

.chakra-ui-dark .mr-card-blue {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 40px var(--mr-blue-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chakra-ui-light .mr-card-blue {
  box-shadow:
    0 2px 8px rgba(100, 116, 139, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mr-card-purple {
  border-color: var(--mr-purple-border);
}

.chakra-ui-dark .mr-card-purple {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 40px var(--mr-purple-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chakra-ui-light .mr-card-purple {
  box-shadow:
    0 2px 8px rgba(100, 116, 139, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mr-card-green {
  border-color: var(--mr-green-border);
}

.chakra-ui-dark .mr-card-green {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 40px var(--mr-green-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chakra-ui-light .mr-card-green {
  box-shadow:
    0 2px 8px rgba(100, 116, 139, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mr-card-red {
  border-color: var(--mr-red-border);
}

.chakra-ui-dark .mr-card-red {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 40px var(--mr-red-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chakra-ui-light .mr-card-red {
  box-shadow:
    0 2px 8px rgba(100, 116, 139, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mr-card-yellow {
  border-color: var(--mr-yellow-border);
}

.chakra-ui-dark .mr-card-yellow {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 40px var(--mr-yellow-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chakra-ui-light .mr-card-yellow {
  box-shadow:
    0 2px 8px rgba(100, 116, 139, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* One inexpensive, paint-stable elevation for every card variant. Large
   blurred glows and changing shadows force full repaints during pointer sweeps. */
.chakra-ui-dark .mr-card,
.chakra-ui-dark .mr-card-blue,
.chakra-ui-dark .mr-card-purple,
.chakra-ui-dark .mr-card-green,
.chakra-ui-dark .mr-card-red,
.chakra-ui-dark .mr-card-yellow,
.chakra-ui-dark .mr-card:hover {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chakra-ui-light .mr-card,
.chakra-ui-light .mr-card-blue,
.chakra-ui-light .mr-card-purple,
.chakra-ui-light .mr-card-green,
.chakra-ui-light .mr-card-red,
.chakra-ui-light .mr-card-yellow,
.chakra-ui-light .mr-card:hover {
  box-shadow:
    0 2px 6px rgba(100, 116, 139, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

/* Edge Glow Bar - 3D Fade Effect */
.mr-glow-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.mr-glow-bar-blue {
  background: linear-gradient(90deg, rgba(0, 162, 255, 0.4) 0%, rgba(0, 162, 255, 0) 100%);
}

.mr-glow-bar-purple {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.4) 0%, rgba(139, 92, 246, 0) 100%);
}

.mr-glow-bar-green {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.4) 0%, rgba(34, 197, 94, 0) 100%);
}

.mr-glow-bar-red {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.4) 0%, rgba(239, 68, 68, 0) 100%);
}

.mr-glow-bar-yellow {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.4) 0%, rgba(234, 179, 8, 0) 100%);
}

/* Scanlines Overlay */
.mr-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 162, 255, 0.03) 2px,
    rgba(0, 162, 255, 0.03) 4px
  );
  pointer-events: none;
  border-radius: var(--mr-radius-md);
  z-index: 2;
}

.mr-card > .mr-scanlines {
  display: none;
}

/* Let Chromium skip layout and paint for task/search cards outside the
   viewport while retaining their expected scroll geometry. */
.task-grid-item {
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: 250px 405px;
}

/* Grid Background */
.mr-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 162, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 162, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 40s linear infinite;
  pointer-events: none;
  z-index: 0;
  perspective: 1000px;
  transform: rotateX(60deg);
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 50px 50px; }
}

/* Typography */
.mr-heading {
  font-weight: 200;
  letter-spacing: 8px;
  color: var(--mr-blue);
  text-shadow: 0 0 20px var(--mr-blue-glow);
  text-transform: uppercase;
}

.mr-text-primary {
  font-weight: 300;
  color: var(--mr-text-primary);
  line-height: 1.5;
  letter-spacing: 0.3px;
}

.mr-text-secondary {
  font-weight: 300;
  color: var(--mr-text-secondary);
  letter-spacing: 0.5px;
}

.mr-text-muted {
  font-weight: 300;
  color: var(--mr-text-muted);
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

/* Badge/Tag Style */
.mr-badge {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-block;
}

.mr-badge-blue {
  background: rgba(0, 162, 255, 0.2);
  border: 1px solid var(--mr-blue-border);
  color: var(--mr-blue);
  text-shadow: 0 0 8px var(--mr-blue-glow);
}

.mr-badge-purple {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--mr-purple-border);
  color: var(--mr-purple);
  text-shadow: 0 0 8px var(--mr-purple-glow);
}

.mr-badge-green {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid var(--mr-green-border);
  color: var(--mr-green);
  text-shadow: 0 0 8px var(--mr-green-glow);
}

.mr-badge-red {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--mr-red-border);
  color: var(--mr-red);
  text-shadow: 0 0 8px var(--mr-red-glow);
}

.mr-badge-yellow {
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid var(--mr-yellow-border);
  color: var(--mr-yellow);
  text-shadow: 0 0 8px var(--mr-yellow-glow);
}

/* Button Style */
.mr-button {
  position: relative !important;
  padding: 10px 24px !important;
  background: rgba(0, 162, 255, 0.1) !important;
  border: 1px solid var(--mr-blue-border) !important;
  border-radius: var(--mr-radius-sm) !important;
  color: var(--mr-blue) !important;
  font-weight: 500 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(10px) !important;
  overflow: hidden !important;
}

.mr-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 162, 255, 0.5) 0%, rgba(0, 162, 255, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

.mr-button:hover {
  background: rgba(0, 162, 255, 0.2) !important;
  box-shadow: 0 0 30px var(--mr-blue-border) !important;
  transform: translateY(-2px) !important;
}

.mr-button:active {
  transform: translateY(0) !important;
}

/* Status Indicator */
.mr-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.mr-status-active {
  background: var(--mr-green);
  box-shadow: 0 0 8px var(--mr-green);
  animation: statusPulse 2s ease-in-out infinite;
}

.mr-status-inactive {
  background: var(--mr-text-muted);
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* Modal/Overlay Style */
.chakra-ui-dark .mr-modal {
  background: linear-gradient(135deg, rgb(15, 23, 42), rgb(30, 41, 59)) !important;
  border: 2px solid var(--mr-blue-border) !important;
  border-radius: var(--mr-radius-lg) !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.8),
    0 0 60px var(--mr-blue-border) !important;
  color: var(--mr-text-primary) !important;
  z-index: 9999 !important;
}

/* Disable hover effects on cards inside modals to prevent performance issues */
.chakra-modal__content .mr-card {
  transition: none !important;
}

.chakra-modal__content .mr-card:hover {
  transform: none !important;
  background: var(--mr-bg-card) !important;
}

.chakra-ui-dark .chakra-modal__content .mr-card:hover {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 40px var(--mr-blue-border),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.chakra-ui-light .chakra-modal__content .mr-card:hover {
  box-shadow:
    0 2px 8px rgba(100, 116, 139, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* Tasks is a dense grid. Avoid full-surface blur and hover layer promotion:
   those repaints compete directly with browser screen-share encoding. */
.tasks-page .mr-card,
.chakra-ui-dark .tasks-page .mr-card,
.chakra-ui-light .tasks-page .mr-card {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: border-color 120ms ease, background-color 120ms ease;
  contain: layout paint style;
}

.tasks-page .mr-card:hover,
.chakra-ui-dark .tasks-page .mr-card:hover,
.chakra-ui-light .tasks-page .mr-card:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.tasks-page .mr-scanlines {
  display: none;
}

/* Optimize modal scrolling performance */
.chakra-modal__body {
  will-change: scroll-position;
  -webkit-overflow-scrolling: touch;
}

/* Reduce repaints on scroll */
.chakra-modal__content * {
  will-change: auto;
}

.chakra-ui-light .mr-modal {
  background: linear-gradient(135deg, rgb(255, 255, 255), rgb(241, 245, 249)) !important;
  border: 2px solid rgba(71, 85, 105, 0.3) !important;
  border-radius: var(--mr-radius-lg) !important;
  box-shadow:
    0 4px 16px rgba(100, 116, 139, 0.2),
    0 2px 8px rgba(71, 85, 105, 0.15) !important;
  color: var(--mr-text-primary) !important;
  z-index: 9999 !important;
}

.chakra-ui-dark .mr-modal-header {
  background: linear-gradient(90deg, var(--mr-blue-border), transparent) !important;
  border-bottom: 1px solid var(--mr-blue-border) !important;
  padding: 20px 24px !important;
  font-size: 1.2rem !important;
  font-weight: 300 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--mr-blue) !important;
  text-shadow: 0 0 10px var(--mr-blue-glow) !important;
}

.chakra-ui-light .mr-modal-header {
  background: linear-gradient(90deg, rgba(71, 85, 105, 0.15), transparent) !important;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3) !important;
  padding: 20px 24px !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: #475569 !important;
  text-shadow: none !important;
}

/* Input Style */
.chakra-ui-dark .mr-input {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid var(--mr-blue-border) !important;
  border-radius: var(--mr-radius-sm) !important;
  padding: 10px 16px !important;
  color: var(--mr-text-primary) !important;
  font-weight: 300 !important;
  letter-spacing: 0.5px !important;
  transition: all 0.3s ease !important;
}

.chakra-ui-light .mr-input {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.3) !important;
  border-radius: var(--mr-radius-sm) !important;
  padding: 10px 16px !important;
  color: var(--mr-text-primary) !important;
  font-weight: 400 !important;
  letter-spacing: 0.5px !important;
  transition: all 0.3s ease !important;
}

.chakra-ui-dark .mr-input:focus {
  outline: none !important;
  border-color: var(--mr-blue) !important;
  box-shadow: 0 0 20px var(--mr-blue-border) !important;
  background: rgba(15, 23, 42, 0.8) !important;
}

.chakra-ui-light .mr-input:focus {
  outline: none !important;
  border-color: #475569 !important;
  box-shadow: 0 0 8px rgba(71, 85, 105, 0.3) !important;
  background: rgba(255, 255, 255, 1) !important;
}

.mr-input::placeholder {
  color: var(--mr-text-muted) !important;
}

/* Metrics Display */
.mr-metric {
  text-align: center;
  padding: 12px;
  background: rgba(0, 162, 255, 0.05);
  border-radius: var(--mr-radius-sm);
  border: 1px solid rgba(0, 162, 255, 0.1);
}

.mr-metric-value {
  font-size: 1.6rem;
  font-weight: 200;
  color: var(--mr-blue);
  text-shadow: 0 0 10px var(--mr-blue-glow);
  margin-bottom: 4px;
}

.mr-metric-label {
  font-size: 0.65rem;
  color: var(--mr-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 300;
}

/* Divider */
.mr-divider {
  height: 1px;
  background: var(--mr-blue-border);
  margin: 20px 0;
  box-shadow: 0 0 10px var(--mr-blue-border);
}

/* -------------------------------------------------------------------------- */
/* True / False game — unified Minority Report surface system                 */
/* -------------------------------------------------------------------------- */

.true-false-shell {
  --tf-accent: 0, 162, 255;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  color: var(--mr-text-primary);
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 162, 255, 0.12), transparent 32rem),
    radial-gradient(circle at 88% 92%, rgba(139, 92, 246, 0.1), transparent 36rem),
    linear-gradient(145deg, rgba(2, 8, 23, 0.98), rgba(8, 18, 38, 0.96));
}

.true-false-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(0, 162, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 162, 255, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.tf-surface {
  --tf-accent: 0, 162, 255;
  position: relative;
  overflow: hidden;
  color: var(--mr-text-primary);
  background:
    linear-gradient(135deg, rgba(20, 31, 54, 0.88), rgba(7, 15, 32, 0.78)),
    rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(var(--tf-accent), 0.48);
  border-radius: 16px;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.46),
    0 5px 12px rgba(0, 0, 0, 0.36),
    0 0 28px rgba(var(--tf-accent), 0.18),
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px) saturate(135%);
}

.tf-surface::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 28px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(var(--tf-accent), 0.58) 0%,
    rgba(var(--tf-accent), 0.18) 38%,
    transparent 100%
  );
  box-shadow:
    inset 2px 0 2px rgba(255, 255, 255, 0.18),
    5px 0 14px rgba(var(--tf-accent), 0.12);
}

.tf-surface::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0.32), rgba(var(--tf-accent),0.2), transparent 72%);
}

.tf-surface-blue { --tf-accent: 0, 162, 255; }
.tf-surface-purple { --tf-accent: 167, 139, 250; }
.tf-surface-green { --tf-accent: 74, 222, 128; }
.tf-surface-red { --tf-accent: 239, 68, 68; }
.tf-surface-yellow { --tf-accent: 251, 191, 36; }

.tf-content {
  position: relative;
  z-index: 1;
}

.tf-heading {
  color: rgb(var(--tf-accent));
  font-family: Futura, "Century Gothic", sans-serif;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(var(--tf-accent), 0.58);
}

.tf-kicker {
  color: rgba(var(--tf-accent), 0.92);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.tf-copy {
  color: var(--mr-text-primary);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.tf-button {
  --tf-accent: 0, 162, 255;
  position: relative !important;
  min-height: 44px !important;
  overflow: hidden !important;
  color: rgb(var(--tf-accent)) !important;
  background: linear-gradient(145deg, rgba(var(--tf-accent), 0.22), rgba(8, 15, 31, 0.62)) !important;
  border: 1px solid rgba(var(--tf-accent), 0.58) !important;
  border-radius: 10px !important;
  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.42),
    0 0 16px rgba(var(--tf-accent), 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.13),
    inset 0 -2px 0 rgba(0, 0, 0, 0.34) !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease !important;
}

.tf-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--tf-accent), 0.68), transparent);
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.18);
}

.tf-button:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  border-color: rgba(var(--tf-accent), 0.88) !important;
  background: linear-gradient(145deg, rgba(var(--tf-accent), 0.34), rgba(8, 15, 31, 0.7)) !important;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.52),
    0 0 26px rgba(var(--tf-accent), 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3) !important;
}

.tf-button:active:not(:disabled),
.tf-button.is-selected {
  transform: translateY(1px) !important;
  background: linear-gradient(145deg, rgba(var(--tf-accent), 0.48), rgba(var(--tf-accent), 0.18)) !important;
  border-color: rgba(var(--tf-accent), 0.96) !important;
  box-shadow:
    inset 0 3px 7px rgba(0, 0, 0, 0.52),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    0 0 28px rgba(var(--tf-accent), 0.4) !important;
}

.tf-button:disabled {
  cursor: not-allowed !important;
  opacity: 0.52 !important;
  filter: saturate(0.72);
}

.tf-button-blue { --tf-accent: 0, 162, 255; }
.tf-button-purple { --tf-accent: 167, 139, 250; }
.tf-button-green { --tf-accent: 74, 222, 128; }
.tf-button-red { --tf-accent: 239, 68, 68; }
.tf-button-yellow { --tf-accent: 251, 191, 36; }

.tf-badge {
  --tf-accent: 0, 162, 255;
  display: inline-flex !important;
  align-items: center;
  min-height: 27px;
  padding: 5px 11px !important;
  color: rgb(var(--tf-accent)) !important;
  background: linear-gradient(145deg, rgba(var(--tf-accent), 0.25), rgba(5, 12, 26, 0.58)) !important;
  border: 1px solid rgba(var(--tf-accent), 0.5) !important;
  border-radius: 8px !important;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.32),
    0 0 12px rgba(var(--tf-accent),0.18),
    inset 0 1px 0 rgba(255,255,255,0.12) !important;
  font-size: 0.67rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.tf-badge-blue { --tf-accent: 0, 162, 255; }
.tf-badge-purple { --tf-accent: 167, 139, 250; }
.tf-badge-green { --tf-accent: 74, 222, 128; }
.tf-badge-red { --tf-accent: 239, 68, 68; }
.tf-badge-yellow { --tf-accent: 251, 191, 36; }

.tf-inset {
  position: relative;
  background: rgba(3, 9, 20, 0.5);
  border: 1px solid rgba(var(--tf-accent), 0.22);
  border-radius: 12px;
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chakra-ui-light .true-false-shell {
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 162, 255, 0.12), transparent 30rem),
    linear-gradient(145deg, #eef6fb, #dbe8f2);
}

.chakra-ui-light .tf-surface {
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(226,232,240,0.84));
  box-shadow:
    0 12px 26px rgba(71, 85, 105, 0.2),
    0 0 20px rgba(var(--tf-accent), 0.1),
    inset 0 2px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(71,85,105,0.18);
}

.chakra-ui-light .tf-button {
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(var(--tf-accent),0.12)) !important;
}

.chakra-ui-light .tf-inset {
  background: rgba(255,255,255,0.5);
}

/* Container with Grid Background */
.mr-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--mr-bg-dark);
  background-attachment: fixed;
  background-position: center;
  overflow: visible; /* Changed from hidden to allow scrolling */
}

.mr-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 162, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 162, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 40s linear infinite;
  pointer-events: none;
  z-index: 0;
  perspective: 1000px;
  transform: rotateX(60deg);
}

/* Content wrapper that sits above grid */
.mr-content {
  position: relative;
  z-index: 1;
}

/* Hover Effects */
.mr-hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mr-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.8),
    0 0 60px var(--mr-blue-border);
}

/* Selected State */
.mr-selected {
  border-color: var(--mr-blue) !important;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.8),
    0 0 60px var(--mr-blue-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Loading Spinner */
.mr-spinner {
  border: 3px solid var(--mr-blue-border);
  border-top-color: var(--mr-blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px var(--mr-blue-border);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Targeted scroll fix - only touch events */
* {
  -webkit-overflow-scrolling: touch;
}
