* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #e67e22;
  --tint-1: #fdf2e9;
  --tint-2: #fae5d3;
  --tint-3: #eb984e;
  --shade-1: #cf711f;
  --shade-2: #45260a;
  --grey-1: #888;
  --grey-2: #767676;
  --grey-3: #6f6f6f;
  --grey-4: #555;
  --grey-5: #333;
  color-scheme: light only;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background-color: var(--tint-1);
  color: var(--grey-5);
  line-height: 1.6;
}

/* Header  */
header {
  position: sticky;
  top: 1rem;
  z-index: 1000;
  padding: 0 2rem;
  pointer-events: none;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  pointer-events: all;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Logo */
.logo {
  color: var(--grey-5);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.logo-icon {
  width: 180px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-icon a {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .logo {
    font-size: 1rem;
  }

  .logo-icon {
    width: 140px;
    height: 28px;
  }
}

/* Toggle Switch - Transparent Design */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toggle-wrapper {
  position: relative;
  width: 180px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 6px);
  height: calc(100% - 6px);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 17px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.toggle-wrapper.content-active .toggle-slider {
  left: calc(50% + 3px);
}

.toggle-labels {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.toggle-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  color: rgba(0, 0, 0, 0.5);
}

.toggle-wrapper:not(.content-active) .toggle-label.query {
  color: var(--grey-5);
}

.toggle-wrapper.content-active .toggle-label.content {
  color: var(--grey-5);
}

/* Hamburger Menu Button */
.hamburger-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
  flex-shrink: 0;
}

.hamburger-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.hamburger-btn.active {
  background: rgba(255, 255, 255, 0.5);
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background: var(--grey-5);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Navigation Menu */
.nav-menu {
  position: fixed;
  top: 8rem;
  right: 2rem;
  width: 300px;
  max-height: calc(100vh - 9rem);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(320px);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  overflow-y: auto;
}

.nav-menu.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.nav-menu h3 {
  color: var(--grey-5);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--tint-2);
}

.nav-menu ul {
  list-style: none;
}

.nav-menu li {
  margin-bottom: 0.5rem;
}

.nav-menu a {
  display: block;
  color: var(--grey-4);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-menu a:hover {
  background: var(--tint-1);
  color: var(--primary);
}

/* Responsive Header */
@media (max-width: 768px) {
  header {
    padding: 0 0.5rem;
  }

  .header-content {
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
  }

  .logo {
    font-size: 1rem;
    flex-shrink: 0;
    gap: 0.5rem;
  }

  .logo-icon {
    width: 140px !important;
    height: 28px !important;
    min-width: 140px;
  }

  .toggle-wrapper {
    width: 130px;
    height: 36px;
    flex-shrink: 1;
    min-width: 100px;
  }

  .toggle-label {
    font-size: 0.75rem;
  }

  .hamburger-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .nav-menu {
    right: 0.5rem;
    width: calc(100vw - 1rem);
    max-width: 300px;
  }
}

/* Main Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Transition Overlay */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--tint-1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 998;
}

.transition-overlay.active {
  opacity: 1;
}

/* Section Styles */
section {
  transition: opacity 0.3s ease;
}

section.hidden {
  display: none;
}

section.fading {
  opacity: 0;
}

/* Query Section Styles */
#querySection {
  min-height: calc(100vh - 8rem);
}

.quiz-title {
  text-align: center;
  margin-bottom: 1rem;
}

.quiz-title h1 {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 768px) {
  .quiz-title h1 {
    font-size: 1.5rem;
  }
}

/* Progress Bar Container */
.progress-bar-wrapper {
  width: 100%;
  height: 24px;
  background: var(--tint-2);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--tint-3));
  border-radius: 12px;
  transition: width 0.5s ease;
  position: relative;
  min-width: 24px;
}

.progress-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

.progress-percentage-inside {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--grey-5);
  z-index: 2;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 768px) {
  .progress-bar-wrapper {
    height: 20px;
    margin-bottom: 1rem;
  }

  .progress-percentage-inside {
    font-size: 0.75rem;
  }
}

/* Data Management Controls */
.data-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.data-btn {
  padding: 0.5rem 1rem;
  background: white;
  border: 2px solid var(--tint-2);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--grey-4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.data-btn:hover {
  background: var(--tint-3);
  color: white;
  border-color: var(--tint-3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.2);
}

.data-btn:active {
  transform: translateY(0);
}

.data-btn svg {
  width: 16px;
  height: 16px;
}

.file-input {
  display: none;
}

/* Question Card */
.question-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.license-attribution {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tint-2);
  font-size: 0.8rem;
  color: var(--grey-3);
  line-height: 1.6;
}

.license-attribution a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.license-attribution a:hover {
  text-decoration: underline;
  color: var(--shade-1);
}

@media (max-width: 768px) {
  .license-attribution {
    font-size: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

.question-card.review-question {
  border: 3px solid var(--tint-3);
  box-shadow: 0 4px 20px rgba(230, 126, 34, 0.2);
  animation: reviewPulse 3s ease-in-out infinite;
}

@keyframes reviewPulse {
  0%,
  100% {
    background-color: white;
  }
  50% {
    background-color: #fef5ee;
  }
}

.review-badge {
  display: none;
  background: linear-gradient(135deg, var(--primary), var(--tint-3));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
  animation: slideInDown 0.4s ease;
}

.question-card.review-question .review-badge {
  display: block;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--tint-2);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.question-type-badge {
  padding: 0.4rem 0.8rem;
  background: var(--tint-2);
  color: var(--primary);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.streak-badge {
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
  animation: streakPulse 0.5s ease;
}

.streak-badge.show {
  display: inline-block;
}

@keyframes streakPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.question-number {
  color: var(--grey-3);
  font-size: 0.9rem;
  font-weight: 500;
}

.question-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--grey-5);
  line-height: 1.5;
}

/* Question Image */
.question-image-container {
  width: 100%;
  max-width: 400px;
  height: 250px;
  margin: 0 auto 1rem;
  background: var(--tint-1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid var(--tint-2);
  contain: layout style paint;
}

.question-image-container:hover {
  border-color: var(--primary);
  transform: scale(1.02);
  will-change: transform;
}

.question-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Image Lightbox */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
}

.image-lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  touch-action: pinch-zoom;
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: white;
  color: var(--grey-5);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .question-image-container {
    max-width: 100%;
    height: 200px;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .image-lightbox {
    padding: 1rem;
  }
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.answer-option {
  padding: 1rem 1.5rem;
  background: var(--tint-1);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  color: var(--grey-5);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.answer-option:hover {
  border-color: var(--primary);
  background: var(--tint-2);
  transform: translateX(4px);
}

.answer-option.selected {
  border-color: var(--primary);
  background: var(--tint-2);
}

.answer-option.correct {
  border-color: #27ae60;
  background: #d5f4e6;
  color: #27ae60;
}

.answer-option.incorrect {
  border-color: #e74c3c;
  background: #fadbd8;
  color: #e74c3c;
}

.answer-option.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.answer-option.correct .option-letter {
  background: #27ae60;
  color: white;
}

.answer-option.incorrect .option-letter {
  background: #e74c3c;
  color: white;
}

/* Text Input for Questions */
.text-input-wrapper {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.text-input {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--tint-2);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.text-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Feedback Message */
.feedback-message {
  padding: 1rem;
  border-radius: 12px;
  font-weight: 500;
  text-align: center;
  display: none;
  animation: slideDown 0.3s ease;
  margin-top: 1rem;
}

.feedback-message.show {
  display: block;
}

.feedback-message.correct {
  background: #d5f4e6;
  color: #27ae60;
}

.feedback-message.incorrect {
  background: #fadbd8;
  color: #e74c3c;
}

.correct-answer-display {
  margin-top: 0.5rem;
  font-weight: 600;
  color: #27ae60;
}

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

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--shade-1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.btn-primary:disabled {
  background: var(--grey-2);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--tint-2);
  color: var(--grey-5);
}

.btn-secondary:hover {
  background: var(--tint-3);
  color: white;
}

/* Statistics */
.statistics {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

.statistics h3 {
  font-size: 1rem;
  color: var(--grey-5);
  margin-bottom: 1rem;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.stat-item {
  text-align: center;
  padding: 0.75rem;
  background: var(--tint-1);
  border-radius: 12px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--grey-3);
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Content Section Placeholder */
.gap-fill-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--grey-5);
  margin-bottom: 2rem;
}

.gap {
  display: inline-block;
  min-width: 100px;
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  margin: 0 0.2rem;
  border: 2px solid var(--tint-2);
  border-radius: 8px;
  background: var(--tint-1);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  color: var(--grey-4);
  vertical-align: middle;
  line-height: 1.4;
}

.gap.selected {
  border-color: var(--primary);
  background: var(--tint-2);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

.gap.filled {
  background: white;
  color: var(--grey-5);
  border-color: var(--grey-3);
}

.gap.correct {
  background: #d5f4e6;
  border-color: #27ae60;
  color: #27ae60;
}

.gap.incorrect {
  background: #fadbd8;
  border-color: #e74c3c;
  color: #e74c3c;
}

.gap.disabled {
  cursor: not-allowed;
}

.gap-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.gap-option {
  padding: 0.8rem 1rem;
  background: white;
  border: 2px solid var(--tint-2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-weight: 500;
  color: var(--grey-5);
  user-select: none;
}

/* Desktop only: make options draggable */
@media (min-width: 769px) {
  .gap-option {
    cursor: grab;
  }

  .gap-option:active {
    cursor: grabbing;
  }

  .gap-option.dragging {
    opacity: 0.5;
  }
}

.gap-option:hover {
  border-color: var(--primary);
  background: var(--tint-1);
  transform: translateY(-2px);
}

.gap-option.selected {
  border-color: var(--primary);
  background: var(--tint-2);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

.gap-option.used {
  opacity: 0.3;
  pointer-events: none;
  text-decoration: line-through;
}

.gap-option.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .gap-fill-text {
    font-size: 1rem;
  }

  .gap {
    min-width: 80px;
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
  }

  .gap-options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
  }

  .gap-option {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* Sorting Plugin Styles */
.sort-instructions {
  text-align: center;
  padding: 1rem;
  background: var(--tint-1);
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--grey-4);
  font-weight: 500;
}

.sort-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.sort-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: white;
  border: 2px solid var(--tint-2);
  border-radius: 12px;
  cursor: move;
  transition: all 0.2s ease;
  font-size: 1.1rem;
  color: var(--grey-5);
  font-weight: 500;
  position: relative;
  user-select: none;
}

.sort-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sort-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.sort-item.drag-over {
  border-color: var(--primary);
  background: var(--tint-1);
}

.sort-item.correct {
  background: #d5f4e6;
  border-color: #27ae60;
  color: #27ae60;
}

.sort-item.correct .drag-handle {
  background: linear-gradient(
    135deg,
    #27ae60 25%,
    transparent 25%,
    transparent 50%,
    #27ae60 50%,
    #27ae60 75%,
    transparent 75%,
    transparent
  );
  background-size: 8px 8px;
}

.sort-item.incorrect {
  background: #fadbd8;
  border-color: #e74c3c;
  color: #e74c3c;
}

.sort-item.incorrect .drag-handle {
  background: linear-gradient(
    135deg,
    #e74c3c 25%,
    transparent 25%,
    transparent 50%,
    #e74c3c 50%,
    #e74c3c 75%,
    transparent 75%,
    transparent
  );
  background-size: 8px 8px;
}

.sort-item.disabled {
  cursor: not-allowed;
}

/* Drag handle for mobile */
.drag-handle {
  display: none;
  width: 40px;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  background: linear-gradient(
    135deg,
    var(--tint-2) 25%,
    transparent 25%,
    transparent 50%,
    var(--tint-2) 50%,
    var(--tint-2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 8px 8px;
  border-radius: 0 10px 10px 0;
  cursor: grab;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
}

@media (max-width: 768px) {
  .sort-item {
    cursor: default;
    padding-right: 50px;
  }

  .drag-handle {
    display: block;
  }

  .sort-instructions {
    font-size: 0.9rem;
  }

  .sort-item {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }
}

/* Content Section Placeholder */
.coming-soon-container {
  min-height: calc(100vh - 8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.coming-soon-content {
  text-align: center;
  max-width: 600px;
  background: white;
  padding: 4rem 3rem;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.coming-soon-icon {
  color: var(--primary);
  margin-bottom: 2rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.coming-soon-content h1 {
  font-size: 2.5rem;
  color: var(--grey-5);
  margin-bottom: 1rem;
  font-weight: 700;
}

.coming-soon-content p {
  font-size: 1.2rem;
  color: var(--grey-4);
  margin-bottom: 1rem;
}

.coming-soon-subtitle {
  font-size: 1rem !important;
  color: var(--grey-3) !important;
  margin-bottom: 2rem !important;
}

.coming-soon-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--tint-1);
  border-radius: 12px;
  color: var(--grey-5);
  font-weight: 500;
}

.feature-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .coming-soon-content {
    padding: 3rem 2rem;
  }

  .coming-soon-content h1 {
    font-size: 2rem;
  }

  .coming-soon-content p {
    font-size: 1rem;
  }

  .coming-soon-icon svg {
    width: 80px;
    height: 80px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .question-card,
  .statistics,
  .placeholder-box {
    padding: 1rem;
  }

  .question-text {
    font-size: 1rem;
  }

  .answer-option {
    padding: 0.75rem 1rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Welcome Screen */
.welcome-screen {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.resume-screen {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.resume-screen h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.resume-screen p {
  color: var(--grey-4);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.resume-stats {
  background: var(--tint-1);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.resume-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.resume-stat {
  text-align: center;
}

.resume-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.resume-stat-label {
  font-size: 0.85rem;
  color: var(--grey-3);
  margin-top: 0.25rem;
}

.resume-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.welcome-screen h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.welcome-screen p {
  color: var(--grey-4);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.question-count {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1rem 0;
}

.welcome-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.selection-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.selection-group label {
  font-size: 0.95rem;
  color: var(--grey-4);
  font-weight: 500;
  text-align: left;
}

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--tint-2);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--grey-5);
  background: white;
  cursor: pointer;
  appearance: none;
  transition: all 0.2s ease;
}

.select-wrapper select:hover {
  border-color: var(--tint-3);
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--primary);
}

.select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--grey-4);
  font-size: 0.8rem;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-large.primary {
  background: var(--primary);
  color: white;
}

.btn-large.primary:hover {
  background: var(--shade-1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.btn-large.secondary {
  background: var(--tint-2);
  color: var(--grey-5);
}

.btn-large.secondary:hover {
  background: var(--tint-3);
  color: white;
}

@media (max-width: 768px) {
  .welcome-screen {
    padding: 2rem 1.5rem;
  }

  .welcome-screen h2 {
    font-size: 1.5rem;
  }

  .welcome-screen p {
    font-size: 1rem;
  }

  .question-count {
    font-size: 2rem;
  }
}
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--grey-3);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--tint-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--grey-5);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
  max-width: 300px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: #27ae60;
}

.toast.error {
  background: #e74c3c;
}

/* Contribute Badge */
.contribute-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  margin: -1rem auto 2rem;
  max-width: fit-content;
  background-color: rgba(230, 126, 34, 0.08);
  border: 1px solid rgba(230, 126, 34, 0.2);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--grey-4);
  transition: all 0.3s ease;
}

.contribute-badge:hover {
  background-color: rgba(230, 126, 34, 0.12);
  border-color: rgba(230, 126, 34, 0.3);
}

.contribute-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.contribute-badge span {
  color: var(--grey-4);
  font-weight: 500;
}

.contribute-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.contribute-link:hover {
  background-color: rgba(230, 126, 34, 0.15);
  text-decoration: underline;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .contribute-badge {
    font-size: 0.85rem;
    padding: 0.7rem 1rem;
    gap: 0.5rem;
    margin: -0.5rem auto 1.5rem;
  }

  .contribute-icon {
    width: 14px;
    height: 14px;
  }

  .contribute-badge span {
    display: none;
  }

  .contribute-link {
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 480px) {
  .contribute-badge {
    font-size: 0.8rem;
    padding: 0.6rem 0.9rem;
  }
}

/* ============================================================================
   MULTIPLE TEXT INPUT PLUGIN - INLINE FEEDBACK V2
   Mit verbessertem Feedback-Box Design
   ============================================================================ */

/* Container */
.multiple-text-input-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Counter */
.input-counter {
  text-align: center;
  font-size: 0.95rem;
  color: var(--grey-1);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.input-counter span {
  color: var(--primary);
  font-weight: 600;
}

/* Input Wrapper */
.multiple-inputs-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.input-group {
  position: relative;
}

/* Input Fields */
.multi-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--tint-2);
  border-radius: 8px;
  background-color: #fff;
  color: var(--grey-5);
  transition: all 0.2s ease;
}

.multi-input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--tint-1);
}

.multi-input:disabled {
  background-color: #f5f5f5;
  color: var(--grey-1);
  cursor: not-allowed;
}

/* Feedback-Farben nach Prüfung */
.multi-input.correct-match {
  border-color: #27ae60;
  background-color: #e8f8f0;
  font-weight: 500;
}

.multi-input.wrong-match {
  border-color: #e74c3c;
  background-color: #fce8e6;
}

.multi-input.empty-input {
  border-color: #f39c12;
  background-color: #fef5e7;
}

/* Button Container */
.multi-input-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.multi-input-buttons .btn {
  min-width: 140px;
}

/* ============================================================================
   INLINE FEEDBACK - VERBESSERTES DESIGN
   ============================================================================ */

.inline-feedback {
  margin-top: 2rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, #fdf2e9 0%, #ffffff 100%);
  border-radius: 16px;
  border: 2px solid var(--primary);
  box-shadow:
    0 4px 12px rgba(230, 126, 34, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.05);
  animation: slideDown 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Subtiler Akzent-Streifen oben */
.inline-feedback::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--tint-3) 100%);
}

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

.feedback-summary {
  margin-bottom: 1rem;
}

.feedback-summary h4 {
  color: var(--grey-5);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.match-summary {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-summary::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Missing Answers Inline */
.missing-answers-inline {
  background-color: #fff;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--tint-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.missing-answers-inline h4 {
  color: var(--grey-4);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.missing-answers-inline ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.missing-answers-inline li {
  padding: 0.625rem 0;
  color: var(--grey-5);
  font-size: 1rem;
  border-bottom: 1px solid var(--tint-2);
  display: flex;
  align-items: center;
}

.missing-answers-inline li:last-child {
  border-bottom: none;
}

.missing-answers-inline li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Correct Answers List Inline */
.correct-answers-list-inline {
  list-style: none;
  padding: 1.25rem;
  margin: 1rem 0 1.5rem 0;
  background-color: #fff;
  border-radius: 12px;
  border: 1px solid var(--tint-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.correct-answers-list-inline li {
  padding: 0.75rem;
  color: var(--grey-5);
  font-size: 1rem;
  border-bottom: 1px solid var(--tint-2);
  display: flex;
  align-items: center;
}

.correct-answers-list-inline li:last-child {
  border-bottom: none;
}

.correct-answers-list-inline li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: #27ae60;
  color: white;
  border-radius: 50%;
  margin-right: 0.75rem;
  font-size: 0.75rem;
  font-weight: bold;
  flex-shrink: 0;
}

/* Feedback Question */
.feedback-question {
  color: var(--grey-4);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  text-align: center;
  font-weight: 500;
}

/* Feedback Buttons */
.feedback-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.feedback-buttons .btn {
  min-width: 140px;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Selected State für Buttons */
.feedback-btn.selected {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feedback-btn.btn-primary.selected {
  background-color: var(--shade-1);
  border-color: var(--shade-1);
}

.feedback-btn.btn-secondary.selected {
  background-color: var(--grey-4);
  border-color: var(--grey-4);
  color: white;
}

.feedback-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================================
   MOBILE OPTIMIERUNGEN
   ============================================================================ */

@media (max-width: 768px) {
  .inline-feedback {
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 12px;
  }

  .feedback-summary h4 {
    font-size: 1rem;
  }

  .match-summary {
    font-size: 1.05rem;
  }

  .multi-input {
    font-size: 16px; /* Verhindert iOS Zoom */
  }

  .multi-input-buttons {
    flex-direction: column;
  }

  .multi-input-buttons .btn {
    width: 100%;
    min-width: unset;
  }

  .feedback-buttons {
    flex-direction: column;
  }

  .feedback-buttons .btn {
    width: 100%;
    min-width: unset;
  }

  .missing-answers-inline {
    padding: 1rem;
  }

  .correct-answers-list-inline {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .multiple-inputs-wrapper {
    gap: 0.75rem;
  }

  .multi-input {
    padding: 0.75rem;
  }

  .inline-feedback {
    padding: 1.25rem;
    margin-top: 1.25rem;
  }

  .match-summary {
    font-size: 1rem;
  }

  .feedback-question {
    font-size: 1rem;
  }
}

/* =====================================================
   FLASHCARD PLUGIN STYLES (Abgleich)
   ===================================================== */

.flashcard-mode {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.flashcard-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

.flashcard-answer-box {
  background-color: #fff;
  border: 2px solid var(--tint-2);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.flashcard-answer-box.show {
  opacity: 1;
  transform: translateY(0);
}

.flashcard-answer-label {
  font-weight: 600;
  color: var(--grey-4);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flashcard-answer-text {
  font-size: 1.1rem;
  color: var(--grey-5);
  line-height: 1.6;
  white-space: pre-wrap;
}

.flashcard-reveal-btn {
  width: 100%;
  max-width: 400px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.flashcard-reveal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.flashcard-buttons {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 600px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.flashcard-buttons.show {
  opacity: 1;
  transform: translateY(0);
}

.btn-flashcard-wrong,
.btn-flashcard-correct {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-flashcard-wrong {
  background-color: #fff;
  color: var(--grey-4);
  border: 2px solid var(--tint-2);
}

.btn-flashcard-wrong:hover {
  background-color: var(--tint-1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-flashcard-correct {
  background-color: var(--primary);
  color: #fff;
}

.btn-flashcard-correct:hover {
  background-color: var(--shade-1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

@media (max-width: 768px) {
  .flashcard-answer-box {
    padding: 1.5rem;
  }

  .flashcard-buttons {
    flex-direction: column;
  }

  .btn-flashcard-wrong,
  .btn-flashcard-correct {
    width: 100%;
  }
}

/* =====================================================
   MATCHING PLUGIN STYLES (Zuordnen)
   ===================================================== */

.matching-mode {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.matching-container {
  width: 100%;
}

.matching-instruction {
  text-align: center;
  color: var(--grey-4);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background-color: var(--tint-1);
  border-radius: 8px;
  border: 1px solid var(--tint-2);
}

.matching-pairs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%;
}

.matching-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Spalten-Titel - nur auf Mobil sichtbar */
.matching-column-title {
  display: none;
}

.matching-item {
  background-color: #fff;
  border: 2px solid var(--tint-2);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  user-select: none;
  font-size: 0.95rem;
  color: var(--grey-5);
  text-align: center;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matching-item:hover:not(.matched) {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.15);
}

.matching-item.selected {
  background-color: var(--tint-1);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.2);
}

.matching-item.matched {
  background-color: #d4edda;
  border-color: #28a745;
  color: #155724;
  cursor: default;
  font-weight: 600;
}

.matching-item.wrong-match {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* =====================================================
   MOBILE OPTIMIERUNGEN FÜR MATCHING
   ===================================================== */

@media (max-width: 768px) {
  .matching-pairs-container {
    grid-template-columns: 1fr;
    gap: 0;
    scroll-behavior: smooth;
  }

  /* Spalten-Titel auf Mobil sichtbar machen */
  .matching-column-title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--grey-5);
    text-align: center;
    padding: 1rem 0 0.5rem 0;
    background-color: var(--tint-1);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 3px solid var(--primary);
    margin-bottom: 0.75rem;
  }

  .matching-column {
    padding: 1rem;
    background-color: var(--tint-1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    scroll-margin-top: 20px;
  }

  /* Visuelle Trennung zwischen linker und rechter Spalte */
  .matching-column-left {
    border: 3px solid var(--primary);
  }

  .matching-column-right {
    border: 3px solid var(--shade-1);
    order: 2;
  }

  /* Verstärkte Trennung durch zusätzlichen Abstand */
  .matching-column-left::after {
    content: "";
    display: block;
    height: 2rem;
  }

  .matching-item {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }

  .matching-instruction {
    font-size: 0.875rem;
    position: sticky;
    top: 0;
    z-index: 11;
    background-color: var(--tint-1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 480px) {
  .matching-item {
    padding: 0.75rem 0.875rem;
    font-size: 0.85rem;
  }

  .matching-column-title {
    font-size: 0.95rem;
  }
}

/* ============================================
   Focus-Visible: Keyboard Navigation
   ============================================ */
.answer-option:focus-visible,
.matching-item:focus-visible,
.gap-option:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.2);
}

.gap:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .transition-overlay {
    transition: none !important;
  }

  .feedback-message {
    animation: none !important;
  }
}
