.page-content {
  display: block;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 10px;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 95%;
  width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 20px);
}

.header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 30px;
  text-align: center;
  position: relative;
}

.back-home-btn {
  position: absolute;
  top: 20px;
  left: 30px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.back-home-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-home-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Enhanced styling for better integration */
.back-home-btn {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-home-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.back-home-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 300;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.controls {
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  text-align: center;
}

.general-notes-container {
  background: #ffffff;
  border-top: none;
  padding: 15px 20px;
  position: relative;
}

/* ══════════════════════════════════════════
   Admin Password Modal
══════════════════════════════════════════ */
.admin-pass-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 32px 30px 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: adminPassIn 0.22s cubic-bezier(.4,0,.2,1);
}
@keyframes adminPassIn {
  from { opacity: 0; transform: scale(0.92) translateY(-10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
@keyframes neonGreenBlink {
  0%, 100% {
    box-shadow: 0 4px 18px rgba(34,197,94,0.55), 0 0 12px rgba(34,197,94,0.35);
    opacity: 1;
  }
  50% {
    box-shadow: 0 6px 32px rgba(34,197,94,0.9), 0 0 28px rgba(74,222,128,0.75), 0 0 50px rgba(34,197,94,0.4);
    opacity: 0.82;
  }
}
.btn-neon-blink {
  animation: neonGreenBlink 1s ease-in-out infinite;
}
.admin-pass-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.admin-pass-lock {
  font-size: 1.5rem;
}
.admin-pass-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #2d3748;
}
.admin-pass-subtitle {
  color: #718096;
  font-size: 0.88rem;
  margin: 0 0 18px;
}
.admin-pass-input-wrap {
  display: flex;
  align-items: center;
  border: 2px solid #667eea;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.admin-pass-input-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}
.admin-pass-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 11px 14px;
  font-size: 1rem;
  color: #2d3748;
  background: transparent;
  font-family: inherit;
}
.admin-pass-eye {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 12px;
  font-size: 1.1rem;
  line-height: 1;
  transition: opacity 0.2s;
}
.admin-pass-eye:hover { opacity: 0.7; }
.admin-pass-error {
  color: #e53e3e;
  font-size: 0.83rem;
  min-height: 20px;
  margin: 8px 0 4px;
}
.admin-pass-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #4a5568;
  cursor: pointer;
  margin-bottom: 22px;
  user-select: none;
}
.admin-pass-remember input[type="checkbox"] {
  accent-color: #667eea;
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.admin-pass-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.admin-pass-cancel {
  background: #edf2f7;
  color: #4a5568;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.admin-pass-cancel:hover { background: #e2e8f0; }
.admin-pass-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(102,126,234,0.35);
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
}
.admin-pass-submit:hover  { opacity: 0.9; transform: translateY(-1px); }
.admin-pass-submit:active { transform: translateY(0); }

/* Admin Capsule Toggle Button */
.admin-capsule-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 18px;
  border: none;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.admin-capsule-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transition: all 0.5s ease;
  transform: translateX(-100%);
}

.admin-capsule-btn:hover::before {
  transform: translateX(100%);
}

.admin-capsule-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.45);
}

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

.admin-capsule-btn.active {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 3px 12px rgba(118, 75, 162, 0.4);
}

.admin-capsule-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-capsule-row .admin-capsule-btn {
  margin-bottom: 0;
}

.admin-logout-btn {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border: 1px solid rgba(231, 76, 60, 0.45);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #c0392b;
  background: rgba(231, 76, 60, 0.08);
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.12);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.admin-logout-btn.is-visible {
  display: inline-flex;
}

.admin-logout-btn:hover {
  background: rgba(231, 76, 60, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

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

/* Admin Panel Slide Animation */
.admin-prompt-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
  margin-bottom: 0;
}

.admin-prompt-panel.open {
  max-height: 2000px;
  opacity: 1;
  margin-bottom: 12px;
}

/* Admin dropdown: stacked sections with clear borders */
.admin-prompt-panel .word-input-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-prompt-panel .admin-prompt-subsection {
  margin: 0;
  padding: 14px 16px;
  border: 2px solid rgba(100, 116, 139, 0.5);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.98);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.05),
    0 4px 16px rgba(15, 23, 42, 0.08);
}

.admin-prompt-panel .admin-prompt-subsection--en {
  border-color: rgba(102, 126, 234, 0.75);
  box-shadow:
    0 0 0 1px rgba(102, 126, 234, 0.18),
    0 4px 16px rgba(102, 126, 234, 0.12);
}

.admin-prompt-panel .admin-prompt-subsection--ar {
  border-color: rgba(217, 119, 6, 0.72);
  box-shadow:
    0 0 0 1px rgba(217, 119, 6, 0.16),
    0 4px 16px rgba(217, 119, 6, 0.1);
}

.admin-prompt-panel .admin-prompt-subsection--img {
  border-color: rgba(5, 150, 105, 0.72);
  box-shadow:
    0 0 0 1px rgba(5, 150, 105, 0.16),
    0 4px 16px rgba(5, 150, 105, 0.1);
}

.admin-prompt-panel .admin-prompt-subsection--course {
  border-color: rgba(99, 102, 241, 0.75);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.18),
    0 4px 16px rgba(99, 102, 241, 0.12);
}

.admin-prompt-panel .admin-prompt-subsection--notes {
  border-color: rgba(74, 85, 104, 0.55);
  box-shadow:
    0 0 0 1px rgba(74, 85, 104, 0.12),
    0 4px 16px rgba(74, 85, 104, 0.08);
}

.admin-prompt-panel .admin-section-refresh-btn {
  padding: 10px 14px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 8px rgba(14, 165, 233, 0.35);
}

.admin-prompt-panel .admin-section-refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(14, 165, 233, 0.45);
}

.general-notes-textarea {
  width: 100%;
  height: 50px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 10px 15px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #495057;
  background: #f8f9fa;
  resize: vertical;
  min-height: 40px;
  max-height: 500px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.general-notes-textarea:focus {
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.general-notes-textarea::placeholder {
  color: #6c757d;
  font-style: italic;
}

.general-notes-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.general-notes-copy-btn,
.general-notes-clear-btn,
.general-notes-lock-btn,
.general-notes-resize-btn,
.go-to-unfilled-btn,
.ai-prompt-generator-btn {
  border: none;
  padding: 8px 16px;
  border-radius: 15px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  font-weight: 500;
}

.general-notes-copy-btn {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.3);
}

.general-notes-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.general-notes-copy-btn.copied {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  animation: copySuccess 0.6s ease;
}

.general-notes-clear-btn {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(253, 121, 168, 0.3);
}

.general-notes-clear-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
}

.general-notes-clear-btn.cleared {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  animation: copySuccess 0.6s ease;
}

.general-notes-lock-btn {
  background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(255, 167, 38, 0.3);
}

.general-notes-lock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 167, 38, 0.4);
}

.general-notes-lock-btn.locked {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.general-notes-lock-btn.locked:hover {
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.general-notes-textarea:disabled {
  background: #f1f1f1;
  color: #666;
  cursor: not-allowed;
  border-color: #ccc;
}

.general-notes-resize-btn {
  background: linear-gradient(135deg, #00cec9 0%, #00b894 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(0, 206, 201, 0.3);
}

.general-notes-resize-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 206, 201, 0.4);
}

.general-notes-resize-btn.reset {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  animation: copySuccess 0.6s ease;
}

.go-to-unfilled-btn {
  background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(162, 155, 254, 0.3);
}

.go-to-unfilled-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(162, 155, 254, 0.4);
}

.go-to-unfilled-btn.found {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  animation: copySuccess 0.6s ease;
}

.go-to-unfilled-btn.all-filled {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  animation: copySuccess 0.6s ease;
}

.ai-prompt-generator-btn {
  background: linear-gradient(135deg, #6c5ce7 0%, #74b9ff 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.3);
}

.ai-prompt-generator-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.search-container input:focus {
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.search-refresh-btn,
.data-export-btn,
.data-import-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jump-to-question-input {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
  width: 40px;
  height: 40px;
  text-align: center;
  outline: none;
}

.jump-to-question-input::-webkit-outer-spin-button,
.jump-to-question-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.jump-to-question-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.jump-to-question-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-weight: bold;
}

.jump-to-question-input:focus {
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
  transform: translateY(-1px);
}
.jump-to-question-input:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Individual Jump Input Styles for Question Containers */
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.individual-jump-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.unfilled-navigation {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 3px;
}

.unfilled-nav-btn {
  background: linear-gradient(135deg, #00cec9 0%, #55efc4 100%);
  color: white;
  border: none;
  width: 22px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 206, 201, 0.3);
  opacity: 0.8;
}

.unfilled-nav-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(0, 206, 201, 0.5);
}

.unfilled-nav-btn:active {
  transform: scale(0.95);
}

.unfilled-nav-btn.prev-unfilled {
  background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.3);
}
.unfilled-nav-btn.prev-unfilled:hover {
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.5);
}

.bookmark-navigation-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 3px;
}

.bookmark-nav-btn {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
  border: none;
  width: 22px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(253, 121, 168, 0.3);
  opacity: 0.8;
}

.bookmark-nav-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(253, 121, 168, 0.5);
}

.bookmark-nav-btn:active {
  transform: scale(0.95);
}

.bookmark-nav-btn.prev-bookmark {
  background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
  box-shadow: 0 2px 6px rgba(255, 118, 117, 0.3);
}

.bookmark-nav-btn.prev-bookmark:hover {
  box-shadow: 0 3px 10px rgba(255, 118, 117, 0.5);
}

/* Bulk Navigation Arrows (10 items) */
.bulk-navigation-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 3px;
}

.bulk-nav-btn {
  background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
  color: white;
  border: none;
  width: 22px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(253, 203, 110, 0.3);
  opacity: 0.8;
}

.bulk-nav-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(253, 203, 110, 0.5);
}

.bulk-nav-btn:active {
  transform: scale(0.95);
}

.bulk-nav-btn.bulk-nav-up {
  background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
  box-shadow: 0 2px 6px rgba(85, 239, 196, 0.3);
}

.bulk-nav-btn.bulk-nav-up:hover {
  box-shadow: 0 3px 10px rgba(85, 239, 196, 0.5);
}

/* Bulk Navigation Arrows (20 items) */
.bulk-navigation-arrows-20 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 3px;
}

.bulk-nav-btn-20 {
  background: linear-gradient(135deg, #e84393 0%, #fd79a8 100%);
  color: white;
  border: none;
  width: 28px;
  height: 20px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(232, 67, 147, 0.3);
  opacity: 0.8;
}

.bulk-nav-btn-20:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(232, 67, 147, 0.5);
}

.bulk-nav-btn-20:active {
  transform: scale(0.95);
}

.bulk-nav-btn-20.bulk-nav-up-20 {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  box-shadow: 0 2px 6px rgba(116, 185, 255, 0.3);
}

.bulk-nav-btn-20.bulk-nav-up-20:hover {
  box-shadow: 0 3px 10px rgba(116, 185, 255, 0.5);
}

/* Navigation feedback animations */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.jump-label {
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.individual-jump-container:hover .jump-label {
  opacity: 1;
}

.individual-jump-input {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
  width: 35px;
  height: 28px;
  text-align: center;
  outline: none;
}

.individual-jump-input::-webkit-outer-spin-button,
.individual-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.individual-jump-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.individual-jump-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
  font-size: 0.8rem;
}

.individual-jump-input:focus {
  box-shadow: 0 3px 12px rgba(116, 185, 255, 0.5);
  transform: translateY(-1px);
  background: linear-gradient(135deg, #81ecec 0%, #00cec9 100%);
}
.individual-jump-input:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(116, 185, 255, 0.4);
} /* Responsive design for individual jump input */
@media (max-width: 768px) {
  .question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .individual-jump-container {
    align-self: flex-end;
  }

  .individual-jump-input {
    width: 30px;
    height: 25px;
    font-size: 0.8rem;
    padding: 3px 6px;
  }

  .jump-label {
    font-size: 0.7rem;
  }
  .unfilled-nav-btn {
    width: 20px;
    height: 16px;
    font-size: 0.6rem;
  }

  .bookmark-nav-btn {
    width: 20px;
    height: 16px;
    font-size: 0.6rem;
  }

  .bulk-nav-btn {
    width: 20px;
    height: 16px;
    font-size: 0.6rem;
  }

  .bulk-nav-btn-20 {
    width: 24px;
    height: 18px;
    font-size: 0.5rem;
  }
}

.search-refresh-btn:hover,
.data-export-btn:hover,
.data-import-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-refresh-btn:active,
.data-export-btn:active,
.data-import-btn:active {
  transform: translateY(0);
}

.data-export-btn {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  box-shadow: 0 3px 10px rgba(0, 184, 148, 0.3);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.data-export-btn:hover {
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.data-import-btn {
  background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
  box-shadow: 0 3px 10px rgba(255, 167, 38, 0.3);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.data-import-btn:hover {
  box-shadow: 0 4px 15px rgba(255, 167, 38, 0.4);
}

.data-export-btn.exporting,
.data-import-btn.importing {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  animation: copySuccess 0.6s ease;
}

.search-results-info {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 10px 15px;
}

.search-highlight {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-color: #ffc107 !important;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1) !important;
}

/* Advanced Ghost Search Dropdown Styles */
.advanced-search-container {
  position: relative;
  flex: 1;
}

#searchInput {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: relative;
  border: 2px solid #667eea;
  border-radius: 8px;
  padding: 8px 40px 8px 15px;
  font-size: 1rem;
  color: #333;
  min-width: 200px;
  outline: none;
}

#searchInput:focus {
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.4), 0 0 40px rgba(102, 126, 234, 0.2);
  border-color: #4facfe;
  background: rgba(255, 255, 255, 1);
  transform: scale(1.02);
}

#searchInput:hover {
  border-color: #4facfe;
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.3);
}

.search-icon-container {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.search-icon {
  color: #667eea;
  transition: all 0.3s ease;
}

.search-icon.loading {
  animation: spin 1s linear infinite;
}

.search-icon.found {
  color: #28a745;
}

.search-icon.error {
  color: #dc3545;
}

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

/* Advanced Ghost Dropdown */
#searchDropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 350px;
  overflow: hidden;
  z-index: 1000;
  display: none;
}

#searchDropdown.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#searchDropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
}

.ghost-search-item {
  padding: 14px 18px;
  color: #333;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(4px);
}

.ghost-search-item:last-child {
  border-bottom: none;
}

.ghost-search-item:hover,
.ghost-search-item.highlighted {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(79, 172, 254, 0.08) 100%);
  color: #4facfe;
  transform: translateX(6px);
  box-shadow: inset 4px 0 0 rgba(79, 172, 254, 0.6);
}

.ghost-search-item.highlighted {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.18) 0%, rgba(79, 172, 254, 0.12) 100%);
  box-shadow: inset 4px 0 0 rgba(79, 172, 254, 0.8);
}

.ghost-search-item-word {
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ghost-search-item-indicator {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  color: #667eea;
  font-weight: 500;
}

.ghost-search-item:hover .ghost-search-item-indicator,
.ghost-search-item.highlighted .ghost-search-item-indicator {
  opacity: 1;
  background: rgba(79, 172, 254, 0.15);
  color: #4facfe;
}

.ghost-search-loading {
  padding: 20px;
  text-align: center;
  color: #667eea;
  font-size: 0.9rem;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ghost-search-no-results {
  padding: 20px;
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Keyboard Navigation Hints */
.ghost-search-hints {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.7rem;
  color: rgba(102, 126, 234, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#searchInput:focus + * .ghost-search-hints {
  opacity: 1;
}

/* Enhanced Scrollbar for Ghost Dropdown */
#searchDropdown {
  scroll-behavior: smooth;
}

#searchDropdown::-webkit-scrollbar {
  width: 6px;
}

#searchDropdown::-webkit-scrollbar-track {
  background: rgba(102, 126, 234, 0.1);
  border-radius: 3px;
}

#searchDropdown::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 3px;
}

#searchDropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

/* Enhanced Search Input Icon Animation */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.search-input-wrapper .fas {
  position: absolute;
  right: 12px;
  color: #667eea;
  transition: all 0.3s ease;
  z-index: 10;
  pointer-events: none;
}

.search-input-wrapper .fas.fa-spinner {
  animation: spin 1s linear infinite;
}

.search-input-wrapper .fas.fa-check {
  color: #28a745;
  animation: checkPulse 0.5s ease-in-out;
}

@keyframes checkPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Responsive Enhancements for Ghost Search */
@media (max-width: 768px) {
  #searchDropdown {
    max-height: 280px;
    border-radius: 8px;
  }
  
  .ghost-search-item {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  .ghost-search-item-indicator {
    font-size: 0.7rem;
    padding: 1px 6px;
  }
  
  .ghost-search-hints {
    display: none;
  }
}

.navigation-arrows {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
}

.nav-arrow {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
  opacity: 0.7;
}

.nav-arrow:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.nav-arrow:active {
  transform: scale(0.95);
}

.nav-arrow.up {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  box-shadow: 0 3px 10px rgba(0, 184, 148, 0.3);
}

.nav-arrow.up:hover {
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.5);
}

.nav-arrow.down {
  background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
  box-shadow: 0 3px 10px rgba(255, 167, 38, 0.3);
}

.nav-arrow.down:hover {
  box-shadow: 0 4px 15px rgba(255, 167, 38, 0.5);
}

.admin-back-to-panel-btn {
  margin-top: 4px;
  padding: 8px 10px;
  max-width: 72px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.admin-back-to-panel-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.question {
  position: relative;
  /* Helps scrollIntoView land visibly when returning from a full-course page */
  scroll-margin-top: 1.25rem;
}

.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  margin: 0 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.pagination-controls {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  flex-shrink: 0;
}

.pagination-controls.pagination-controls-top {
  margin-top: 0;
  margin-bottom: 0;
  border-top: none;
  border-bottom: 1px solid #e9ecef;
}

.page-info {
  font-weight: bold;
  color: #667eea;
  font-size: 1.1rem;
}

.bookmark-container {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  gap: 6px;
  margin-left: 12px;
}

.bookmark-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.bookmark-label {
  color: #667eea;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.clear-others-btn {
  background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.clear-others-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
  background: linear-gradient(135deg, #fb8c00 0%, #ef6c00 100%);
}

.question.bookmarked {
  border-color: #ffc107;
  background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
  box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
}
.bookmark-navigation {
  padding: 15px 20px;
  background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
  border: 2px solid #ffc107;
  border-radius: 12px;
  margin: 15px 0;
  text-align: center;
  box-shadow: 0 3px 15px rgba(255, 193, 7, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.bookmark-navigation > div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}

.bookmark-counter {
  color: #ff8f00;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  padding: 8px 15px;
  border-radius: 20px;
  border: 1px solid #ffc107;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.bookmark-nav-btn {
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(255, 193, 7, 0.3);
  white-space: nowrap;
  min-width: 140px;
}

.bookmark-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 193, 7, 0.4);
  background: linear-gradient(135deg, #ff8f00 0%, #f57c00 100%);
}

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

.bookmark-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
}

/* Responsive design for bookmark navigation */
@media (max-width: 768px) {
  .bookmark-navigation {
    padding: 12px 15px;
    gap: 10px;
  }

  .bookmark-navigation > div {
    flex-direction: column;
    gap: 10px;
  }

  .bookmark-counter {
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .bookmark-nav-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-width: 120px;
  }
}

/* This duplicate section removed - keeping the standardized version in question-actions */

/* AI Prompt Generator Modal Styles */
.ai-prompt-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

/* Individual AI Prompt Modal Styles */
.ai-prompt-modal-content {
  background-color: #ffffff;
  margin: 3% auto;
  padding: 0;
  border: none;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

.ai-prompt-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 25px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-prompt-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.ai-prompt-controls {
  padding: 20px 25px;
  background-color: #f8f9fa;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid #e9ecef;
}

.ai-control-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ai-control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.ai-control-btn.save-btn {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.ai-control-btn.refresh-btn {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.ai-control-btn.copy-btn {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.ai-control-btn.copied {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  transform: scale(1.05);
}

.ai-prompt-textarea {
  width: 100%;
  min-height: 400px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  background-color: #f8f9fa;
  resize: vertical;
  transition: all 0.3s ease;
}

.ai-prompt-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ai-prompt-question-ref {
  padding: 20px 25px;
  background-color: #fff3cd;
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 15px 15px;
  text-align: center;
}

.ai-prompt-question-ref strong {
  color: #856404;
  font-size: 1rem;
}

.ai-prompt-question-ref p {
  margin: 5px 0 0 0;
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
}

/* Main AI Prompt Generator Controls */
.main-prompt-controls {
  padding: 15px 20px;
  background-color: #f8f9fa;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 0;
}

.main-prompt-control-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.main-prompt-control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.main-prompt-control-btn.save-btn {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.main-prompt-control-btn.refresh-btn {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.main-prompt-control-btn.copy-btn {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.main-prompt-control-btn.copied {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  transform: scale(1.05);
}

.notes-summary-note {
  padding: 10px;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 5px;
  margin-top: 10px;
  text-align: center;
  font-size: 0.85rem;
  color: #856404;
}

/* Toggle Answers Button Styles */
.toggle-answers-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toggle-answers-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.toggle-answers-btn.answers-visible {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

.toggle-answers-btn.answers-visible:hover {
  box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

@media (max-width: 768px) {
  .ai-prompt-modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .ai-control-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .ai-prompt-controls {
    padding: 15px 20px;
  }

  .ai-prompt-modal-header {
    padding: 15px 20px;
  }

  .ai-prompt-modal-header h3 {
    font-size: 1rem;
  }

  .main-prompt-control-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .main-prompt-controls {
    padding: 10px 15px;
  }
}

.ai-prompt-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  margin: 2% auto;
  padding: 0;
  border: none;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalSlideIn 0.4s ease-out;
}

.ai-prompt-modal-header {
  background: linear-gradient(135deg, #6c5ce7 0%, #74b9ff 100%);
  color: white;
  padding: 25px 30px 20px;
  position: relative;
}

.ai-prompt-modal-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-prompt-modal-subtitle {
  margin: 8px 0 0 0;
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 400;
}

.ai-prompt-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ai-prompt-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.ai-prompt-modal-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
}

.prompt-section {
  background: white;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.prompt-section:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.prompt-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 15px;
}

.prompt-textarea {
  width: 100%;
  min-height: 200px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 15px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2d3436;
  background: #f8f9fa;
  resize: vertical;
  outline: none;
  transition: all 0.3s ease;
}

.prompt-textarea:focus {
  border-color: #6c5ce7;
  background: white;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.prompt-copy-btn {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
  margin-top: 15px;
}

.prompt-copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.prompt-copy-btn.copied {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  animation: copySuccess 0.6s ease;
}

.notes-summary {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid #dee2e6;
}

.notes-summary-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-item {
  background: white;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-left: 4px solid #6c5ce7;
  font-size: 0.9rem;
  color: #636e72;
}

.notes-item strong {
  color: #2d3436;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.question-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

/* Standardized action buttons with consistent height and border-radius */
.audio-btn,
.arabic-btn,
.meaning-btn,
.ai-prompt-btn,
.show-answer-btn,
.brief-explain-btn,
.copy-movie-prompt-btn {
  border: none;
  padding: 8px 16px;
  border-radius: 15px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 40px; /* Standardized height */
  min-height: 40px; /* Ensure minimum height */
  color: white;
  box-sizing: border-box;
}

.audio-btn {
  background: linear-gradient(135deg, #e17055 0%, #fd79a8 100%);
  box-shadow: 0 3px 10px rgba(225, 112, 85, 0.3);
}

.audio-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(225, 112, 85, 0.4);
}

.audio-btn.playing {
  background: linear-gradient(135deg, #fd79a8 0%, #e17055 100%);
  animation: smoothPulse 1.5s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(253, 121, 168, 0.4);
  transform: scale(0.98);
}

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

@keyframes smoothPulse {
  0% {
    transform: scale(0.98);
    box-shadow: 0 4px 20px rgba(253, 121, 168, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(253, 121, 168, 0.6);
  }
  100% {
    transform: scale(0.98);
    box-shadow: 0 4px 20px rgba(253, 121, 168, 0.4);
  }
}

.audio-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.3);
  transition: all 0.3s ease;
}

.arabic-btn {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  box-shadow: 0 3px 10px rgba(0, 184, 148, 0.3);
}

.arabic-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.meaning-btn {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  box-shadow: 0 3px 10px rgba(116, 185, 255, 0.3);
}

.meaning-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(116, 185, 255, 0.4);
}

.ai-prompt-btn {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.3);
  /* Removed margin-top: 10px for consistency */
}

.ai-prompt-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.show-answer-btn {
  background: linear-gradient(135deg, #2ecc71 0%, #1abc9c 50%, #27ae60 100%);
  box-shadow: 0 3px 12px rgba(46, 204, 113, 0.35);
}

.show-answer-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(46, 204, 113, 0.5);
  background: linear-gradient(135deg, #27ae60 0%, #1abc9c 50%, #2ecc71 100%);
}

.show-answer-btn.answer-active {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  box-shadow: 0 3px 12px rgba(231, 76, 60, 0.4);
}

.show-answer-btn.answer-active:hover {
  box-shadow: 0 5px 18px rgba(231, 76, 60, 0.5);
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.ai-prompt-btn.copied {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  animation: copySuccess 0.6s ease;
}

@keyframes copySuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* AI Prompt Generator Modal Styles */
.ai-prompt-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

/* Individual AI Prompt Modal Styles */
.ai-prompt-modal-content {
  background-color: #ffffff;
  margin: 3% auto;
  padding: 0;
  border: none;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

.ai-prompt-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 25px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-prompt-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.ai-prompt-controls {
  padding: 20px 25px;
  background-color: #f8f9fa;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid #e9ecef;
}

.ai-control-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ai-control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.ai-control-btn.save-btn {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.ai-control-btn.refresh-btn {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.ai-control-btn.copy-btn {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.ai-control-btn.copied {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  transform: scale(1.05);
}

.ai-prompt-textarea {
  width: 100%;
  min-height: 400px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  background-color: #f8f9fa;
  resize: vertical;
  transition: all 0.3s ease;
}

.ai-prompt-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ai-prompt-question-ref {
  padding: 20px 25px;
  background-color: #fff3cd;
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 15px 15px;
  text-align: center;
}

.ai-prompt-question-ref strong {
  color: #856404;
  font-size: 1rem;
}

.ai-prompt-question-ref p {
  margin: 5px 0 0 0;
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
}

/* Main AI Prompt Generator Controls */
.main-prompt-controls {
  padding: 15px 20px;
  background-color: #f8f9fa;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 0;
}

.main-prompt-control-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.main-prompt-control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.main-prompt-control-btn.save-btn {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.main-prompt-control-btn.refresh-btn {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.main-prompt-control-btn.copy-btn {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.main-prompt-control-btn.copied {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  transform: scale(1.05);
}

.notes-summary-note {
  padding: 10px;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 5px;
  margin-top: 10px;
  text-align: center;
  font-size: 0.85rem;
  color: #856404;
}

/* Toggle Answers Button Styles */
.toggle-answers-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toggle-answers-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.toggle-answers-btn.answers-visible {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

.toggle-answers-btn.answers-visible:hover {
  box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

@media (max-width: 768px) {
  .ai-prompt-modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .ai-control-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .ai-prompt-controls {
    padding: 15px 20px;
  }

  .ai-prompt-modal-header {
    padding: 15px 20px;
  }

  .ai-prompt-modal-header h3 {
    font-size: 1rem;
  }

  .main-prompt-control-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .main-prompt-controls {
    padding: 10px 15px;
  }
}

.ai-prompt-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  margin: 2% auto;
  padding: 0;
  border: none;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalSlideIn 0.4s ease-out;
}

.ai-prompt-modal-header {
  background: linear-gradient(135deg, #6c5ce7 0%, #74b9ff 100%);
  color: white;
  padding: 25px 30px 20px;
  position: relative;
}

.ai-prompt-modal-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-prompt-modal-subtitle {
  margin: 8px 0 0 0;
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 400;
}

.ai-prompt-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ai-prompt-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.ai-prompt-modal-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
}

.prompt-section {
  background: white;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.prompt-section:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.prompt-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 15px;
}

.prompt-textarea {
  width: 100%;
  min-height: 200px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 15px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2d3436;
  background: #f8f9fa;
  resize: vertical;
  outline: none;
  transition: all 0.3s ease;
}

.prompt-textarea:focus {
  border-color: #6c5ce7;
  background: white;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.prompt-copy-btn {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
  margin-top: 15px;
}

.prompt-copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.prompt-copy-btn.copied {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  animation: copySuccess 0.6s ease;
}

.notes-summary {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid #dee2e6;
}

.notes-summary-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-item {
  background: white;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-left: 4px solid #6c5ce7;
  font-size: 0.9rem;
  color: #636e72;
}

.notes-item strong {
  color: #2d3436;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.question-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.audio-btn {
  background: linear-gradient(135deg, #e17055 0%, #fd79a8 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(225, 112, 85, 0.3);
  display: flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  min-width: fit-content;
}

.audio-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(225, 112, 85, 0.4);
}

.audio-btn.playing {
  background: linear-gradient(135deg, #fd79a8 0%, #e17055 100%);
  animation: smoothPulse 1.5s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(253, 121, 168, 0.4);
  transform: scale(0.98);
}

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

@keyframes smoothPulse {
  0% {
    transform: scale(0.98);
    box-shadow: 0 4px 20px rgba(253, 121, 168, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(253, 121, 168, 0.6);
  }
  100% {
    transform: scale(0.98);
    box-shadow: 0 4px 20px rgba(253, 121, 168, 0.4);
  }
}

.audio-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.3);
  transition: all 0.3s ease;
}

.arabic-btn {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 184, 148, 0.3);
  display: flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  min-width: fit-content;
}

.arabic-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.meaning-btn {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 15px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(116, 185, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.meaning-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(116, 185, 255, 0.4);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 30px;
  border-radius: 20px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 15px;
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-btn,
.refresh-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 15px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.edit-btn:hover,
.refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.edit-btn.active {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  box-shadow: 0 3px 10px rgba(0, 184, 148, 0.3);
}

.refresh-btn {
  background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
  box-shadow: 0 3px 10px rgba(255, 167, 38, 0.3);
}

.refresh-btn:hover {
  box-shadow: 0 4px 15px rgba(255, 167, 38, 0.4);
}

.section-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.section-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #495057;
  font-weight: 600;
}

.context-header {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.context-header h4 {
  margin: 0;
  color: #667eea;
  font-size: 1rem;
}

/* AI Helper Buttons */
.ai-helper-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.ai-helper-btn:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s ease;
}

.ai-helper-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ai-helper-btn:hover:before {
  left: 100%;
}

.ai-helper-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Different gradients for each AI button */
.english-ai-btn {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.english-ai-btn:hover {
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.arabic-ai-btn {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  box-shadow: 0 2px 8px rgba(250, 112, 154, 0.3);
}

.arabic-ai-btn:hover {
  box-shadow: 0 4px 15px rgba(250, 112, 154, 0.4);
}

.context-ai-btn {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
  box-shadow: 0 2px 8px rgba(168, 237, 234, 0.3);
}

.context-ai-btn:hover {
  box-shadow: 0 4px 15px rgba(168, 237, 234, 0.4);
}

/* AI button loading state */
.ai-helper-btn.loading {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
  cursor: not-allowed;
  animation: aiPulse 1.5s infinite;
}

@keyframes aiPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* AI button success state */
.ai-helper-btn.success {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  animation: aiSuccess 0.6s ease;
}

@keyframes aiSuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive design for AI buttons */
@media (max-width: 768px) {
  .ai-helper-btn {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .context-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Tooltip for AI buttons */
.ai-helper-btn[title]:hover:after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

.ai-helper-btn[title]:hover:before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

/* Meaning Modal AI Helper Buttons */
.meaning-ai-helper-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0;
  padding: 15px;
  background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
  border-radius: 12px;
  border: 2px solid #dadce0;
}

/* Meaning Modal specific AI button styles */
.meaning-english-ai-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.meaning-english-ai-btn:hover {
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.meaning-arabic-ai-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.meaning-arabic-ai-btn:hover {
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.meaning-context-ai-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.meaning-context-ai-btn:hover {
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Responsive design for meaning modal AI buttons */
@media (max-width: 768px) {
  .meaning-ai-helper-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .meaning-ai-helper-buttons .ai-helper-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Individual Section AI Buttons */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 5px 0;
}

.section-header h3 {
  margin: 0;
  flex: 1;
}

.section-header .ai-helper-btn {
  padding: 4px 8px;
  font-size: 0.7rem;
  border-radius: 8px;
  margin-left: 10px;
}

/* Specific colors for each section AI button */
.definition-ai-btn {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.3);
}

.definition-ai-btn:hover {
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.4);
}

.synonyms-ai-btn {
  background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
  box-shadow: 0 2px 6px rgba(253, 121, 168, 0.3);
}

.synonyms-ai-btn:hover {
  box-shadow: 0 3px 10px rgba(253, 121, 168, 0.4);
}

.examples-ai-btn {
  background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
  box-shadow: 0 2px 6px rgba(0, 184, 148, 0.3);
}

.examples-ai-btn:hover {
  box-shadow: 0 3px 10px rgba(0, 184, 148, 0.4);
}

.etymology-ai-btn {
  background: linear-gradient(135deg, #e17055 0%, #fab1a0 100%);
  box-shadow: 0 2px 6px rgba(225, 112, 85, 0.3);
}

.etymology-ai-btn:hover {
  box-shadow: 0 3px 10px rgba(225, 112, 85, 0.4);
}

.professional-ai-btn {
  background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
  box-shadow: 0 2px 6px rgba(9, 132, 227, 0.3);
}

.professional-ai-btn:hover {
  box-shadow: 0 3px 10px rgba(9, 132, 227, 0.4);
}

/* Responsive design for section headers */
@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .section-header .ai-helper-btn {
    margin-left: 0;
    align-self: flex-end;
  }
}

.editable-content {
  min-height: 100px;
}

.context-example-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #f8f9fa;
}

.context-header {
  margin-bottom: 10px;
}

.context-header h4 {
  margin: 0;
  color: #667eea;
  font-size: 1rem;
}

.edit-controls {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border-top: 3px solid #667eea;
}

.edit-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  justify-content: center;
}

.save-btn,
.cancel-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 15px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.save-btn {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(0, 184, 148, 0.3);
}

.save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.cancel-btn {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(253, 121, 168, 0.3);
}

.cancel-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
}

.edit-tips {
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

.ai-tips {
  display: block;
  margin-top: 5px;
  color: #667eea;
  font-size: 0.75rem;
  font-weight: 500;
}

.paste-tips {
  display: block;
  margin-top: 5px;
  color: #00b894;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Editable content styles */
[contenteditable="true"] {
  background: #fff !important;
  border: 2px solid #667eea;
  border-radius: 8px;
  padding: 10px;
  margin: 5px 0;
  transition: all 0.3s ease;
  min-height: 40px;
  color: #333 !important;
  font-family: inherit !important;
  font-size: inherit !important;
}

[contenteditable="true"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  border-color: #4facfe;
  background: #fff !important;
}

[contenteditable="true"]:hover {
  border-color: #4facfe;
  background: #fff !important;
}

/* Force clean text styling inside editable content */
[contenteditable="true"] * {
  background: transparent !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Ensure pasted content appears clean */
[contenteditable="true"] span,
[contenteditable="true"] div,
[contenteditable="true"] p {
  background: transparent !important;
  color: inherit !important;
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
}

.modal-title {
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #333;
}

.translation-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.english-section {
  flex: 1;
}

.arabic-section {
  flex: 1;
  text-align: right;
  direction: rtl;
}

.word-display {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #667eea;
}

.arabic-word {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #00b894;
  font-family: "Arial Unicode MS", "Tahoma", sans-serif;
}

/* Arabic Translation Section in Meaning Modal */
.arabic-translation-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9f7f5 100%);
  border: 2px solid #00b894;
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
}

.arabic-translation-section .section-header h3 {
  color: #00b894;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 15px;
}

.arabic-content {
  text-align: right;
  direction: rtl;
}

.arabic-word-display {
  font-size: 1.8rem;
  font-weight: bold;
  color: #00b894;
  font-family: "Arial Unicode MS", "Tahoma", sans-serif;
  margin-bottom: 12px;
  text-align: center;
  padding: 8px;
  background: rgba(0, 184, 148, 0.1);
  border-radius: 8px;
}

.arabic-definition-display {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #2d3436;
  font-family: "Arial Unicode MS", "Tahoma", sans-serif;
  padding: 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border-right: 4px solid #00b894;
}

.definition {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 15px;
}

.context-example {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  margin-top: 15px;
}

.context-example h4 {
  color: #667eea;
  margin-bottom: 8px;
}

.dictionary-modal {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}

.dictionary-content {
  padding: 20px 0;
}

.word-header {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 25px;
  text-align: center;
}

.main-word {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.pronunciation {
  font-size: 1.2rem;
  opacity: 0.9;
  font-style: italic;
  margin-bottom: 5px;
}

.part-of-speech {
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 15px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 10px;
}

.definition-section,
.synonyms-section,
.examples-section,
.etymology-section,
.professional-usage {
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #74b9ff;
}

.definition-section h3,
.synonyms-section h3,
.examples-section h3,
.etymology-section h3,
.professional-usage h3 {
  color: #0984e3;
  margin-bottom: 15px;
  font-size: 1.2rem;
  font-weight: 600;
}

.main-definition {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

.synonyms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.synonym-item {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.synonym-item:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.examples-list {
  space-y: 15px;
}

.example-item {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid #74b9ff;
  margin-bottom: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.example-item .example-text {
  font-style: italic;
  color: #555;
  line-height: 1.5;
}

.example-item .example-context {
  font-size: 0.85rem;
  color: #0984e3;
  margin-top: 8px;
  font-weight: 500;
}

.etymology-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.usage-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}

.usage-highlight {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.confirmation-modal {
  max-width: 500px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 3px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.confirmation-modal::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  border-radius: 20px;
  z-index: -1;
}

.confirmation-header {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
  padding: 25px;
  border-radius: 17px 17px 0 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.confirmation-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.confirmation-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  display: block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.confirmation-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.confirmation-body {
  padding: 30px 25px;
  text-align: center;
}

.confirmation-message-en {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 10px;
  font-weight: 500;
}

.confirmation-message-ar {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 20px;
  font-family: "Arial Unicode MS", "Tahoma", sans-serif;
  direction: rtl;
}

.confirmation-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 15px;
  margin-top: 15px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

.warning-message-en,
.warning-message-ar {
  margin: 5px 0;
  font-size: 0.95rem;
  color: #856404;
  font-weight: 500;
}

.warning-message-ar {
  direction: rtl;
}

.confirmation-actions {
  padding: 0 25px 25px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.confirm-btn-cancel,
.confirm-btn-delete {
  flex: 1;
  max-width: 200px;
  padding: 15px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.confirm-btn-cancel {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.confirm-btn-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(116, 185, 255, 0.4);
}

.confirm-btn-delete {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(253, 121, 168, 0.3);
}

.confirm-btn-delete:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(253, 121, 168, 0.4);
  animation: shake 0.5s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateY(-2px) translateX(0);
  }
  25% {
    transform: translateY(-2px) translateX(-2px);
  }
  75% {
    transform: translateY(-2px) translateX(2px);
  }
}

.confirm-btn-cancel span:last-child,
.confirm-btn-delete span:last-child {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Success Modal Styles */
.success-modal .success-header {
  background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.success-modal .success-header::before {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
}

.success-modal::before {
  background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

.confirm-btn-success {
  flex: 1;
  max-width: 200px;
  padding: 15px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.confirm-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
  animation: successPulse 0.5s;
}

@keyframes successPulse {
  0%,
  100% {
    transform: translateY(-2px) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.05);
  }
}

.confirm-btn-success span:last-child {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Error Modal Styles */
.error-modal .error-header {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.error-modal .error-header::before {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
}

.error-modal::before {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.confirm-btn-error {
  flex: 1;
  max-width: 200px;
  padding: 15px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.confirm-btn-error:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
  animation: errorShake 0.5s;
}

@keyframes errorShake {
  0%,
  100% {
    transform: translateY(-2px) translateX(0);
  }
  25% {
    transform: translateY(-2px) translateX(-3px);
  }
  75% {
    transform: translateY(-2px) translateX(3px);
  }
}

.confirm-btn-error span:last-child {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Success and Error Details */
.success-details,
.error-details {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 15px;
  margin-top: 15px;
  animation: fadeInUp 0.5s ease;
}

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

.success-details-content,
.error-details-content {
  font-size: 0.95rem;
  color: #495057;
  line-height: 1.5;
}

/* Mobile responsiveness for new modals */
@media (max-width: 768px) {
  .success-modal,
  .error-modal {
    max-width: 95%;
    margin: 5% auto;
  }

  .confirmation-header {
    padding: 20px 15px;
  }

  .confirmation-title {
    font-size: 1.5rem;
  }

  .confirmation-icon {
    font-size: 2.5rem;
  }

  .confirmation-body {
    padding: 20px 15px;
  }

  .confirmation-message-en {
    font-size: 1.1rem;
  }

  .confirmation-message-ar {
    font-size: 1rem;
  }

  .confirmation-actions {
    padding: 0 15px 20px;
    flex-direction: column;
    gap: 10px;
  }

  .confirm-btn-success,
  .confirm-btn-error,
  .confirm-btn-cancel,
  .confirm-btn-delete {
    max-width: 100%;
    padding: 12px 16px;
  }
}

.quiz-container {
  padding: 20px 40px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.question {
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.question-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 25px;
  align-items: stretch;
  margin-top: 14px;
}

.question-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.question-main > .wip-visual,
.question-main > .bsc-visual-wrap {
  flex: 1 1 auto;
  min-height: 100px;
}

.question-main > .wip-visual.wip-visual--has-img,
.bsc-visual-wrap > .wip-visual.wip-visual--has-img {
  min-height: 340px;
}

.question-main > .question-header,
.question-main > .question-text,
.question-main > .input-container,
.question-main > .question-actions,
.question-main > .answer {
  flex-shrink: 0;
}

.notes-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 15px;
  position: relative;
  min-height: 120px;
}

.notes-container::before {
  content: "📝 Notes";
  position: absolute;
  top: -12px;
  left: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.notes-textarea {
  width: 100%;
  height: 100px;
  border: none;
  background: transparent;
  resize: vertical;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #495057;
  outline: none;
  padding: 8px 0;
  min-height: 80px;
}

.notes-textarea::placeholder {
  color: #6c757d;
  font-style: italic;
}

.notes-textarea:focus {
  color: #212529;
}

.question:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.question-number {
  color: #667eea;
  font-weight: bold;
  margin-bottom: 10px;
}

.question-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #333;
}

/* Inline answer blank styling */
.answer-blank {
  font-weight: bold;
  letter-spacing: 2px;
  color: #888;
  border-bottom: 2px dashed #aaa;
  padding: 0 4px;
  transition: all 0.4s ease;
}

.answer-blank.answer-revealed {
  color: #27ae60;
  font-weight: 700;
  letter-spacing: normal;
  border-bottom: 2px solid #27ae60;
  background: rgba(46, 204, 113, 0.1);
  border-radius: 4px;
  padding: 2px 8px;
  font-style: italic;
}

/* Input box when answer is filled via Show Answer */
.input-field.answer-filled {
  color: #27ae60;
  font-weight: 600;
  border-color: #27ae60;
  background: rgba(46, 204, 113, 0.08);
}

.input-field {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 1rem;
  width: 200px;
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-field.correct {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.input-field.incorrect {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.answer {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
  animation: slideIn 0.3s ease;
}

.answer.show {
  display: block;
}

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

.progress {
  background: transparent;
  height: 0;
  border-radius: 2px;
  margin: 0;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .container {
    max-width: 98%;
    width: auto;
    margin: 5px auto;
  }

  .header {
    padding: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .back-home-btn {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 15px;
    display: inline-block;
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  .quiz-container {
    padding: 15px;
    flex: 1;
    min-height: 0;
  }

  .question {
    padding: 15px;
  }

  .question-content {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .question-main > .wip-visual,
  .question-main > .bsc-visual-wrap {
    flex: 0 0 auto;
    min-height: 90px;
  }

  .question-main > .wip-visual.wip-visual--has-img,
  .bsc-visual-wrap > .wip-visual.wip-visual--has-img {
    min-height: 200px;
  }

  .question-main > .wip-visual.wip-visual--text-art,
  .bsc-visual-wrap > .wip-visual.wip-visual--text-art {
    min-height: 200px;
  }

  .wip-visual__mount {
    width: 44px;
    height: 44px;
  }

  .wip-visual__mount::before {
    top: 10px;
    left: 10px;
    width: 24px;
    height: 18px;
  }

  .wip-visual__word {
    font-size: 1.15rem;
  }

  .wip-visual__scene {
    padding: 16px 12px 14px;
  }

  .notes-container {
    min-height: 100px;
  }

  .notes-textarea {
    height: 80px;
    min-height: 60px;
  }

  .navigation-arrows {
    right: 5px;
    top: 20px;
    transform: none;
    position: absolute;
  }

  .nav-arrow {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    opacity: 0.8;
  }

  .input-field {
    width: 100%;
    max-width: 300px;
  }

  .controls {
    padding: 15px;
  }

  .general-notes-container {
    padding: 10px 15px;
  }

  .general-notes-textarea {
    height: 40px;
    min-height: 35px;
    max-height: 100px;
    font-size: 0.85rem;
  }

  .general-notes-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .general-notes-copy-btn,
  .general-notes-clear-btn,
  .general-notes-lock-btn,
  .general-notes-resize-btn,
  .go-to-unfilled-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .controls > div {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .controls > div > div {
    justify-content: center;
  }

  .search-container {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 5px !important;
  }

  .search-container input {
    min-width: auto !important;
    width: 100% !important;
  }

  .search-container label {
    text-align: center;
    white-space: normal !important;
  }

  .search-refresh-btn,
  .notes-export-btn,
  .notes-import-btn {
    align-self: center;
    width: 50px !important;
  }

  .pagination-controls {
    padding: 15px;
    flex-direction: column;
    gap: 10px;
  }

  .dictionary-modal {
    max-width: 95%;
    max-height: 90vh;
    margin: 5% auto;
  }

  .word-header {
    padding: 15px;
  }

  .main-word {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  .pronunciation {
    font-size: 1rem;
  }

  .definition-section,
  .synonyms-section,
  .examples-section,
  .etymology-section,
  .professional-usage {
    padding: 15px;
    margin-bottom: 15px;
  }

  .synonyms-list {
    flex-direction: column;
    gap: 8px;
  }

  .synonym-item {
    text-align: center;
    padding: 10px 15px;
  }

  .example-item {
    padding: 12px;
  }

  .confirmation-modal {
    max-width: 95%;
    margin: 5% auto;
  }

  .confirmation-header {
    padding: 20px 15px;
  }

  .confirmation-icon {
    font-size: 2.5rem;
  }

  .confirmation-title {
    font-size: 1.5rem;
  }

  .confirmation-body {
    padding: 20px 15px;
  }

  .confirmation-message-en {
    font-size: 1.1rem;
  }

  .confirmation-message-ar {
    font-size: 1rem;
  }

  .confirmation-actions {
    padding: 0 15px 20px;
    flex-direction: column;
    gap: 10px;
  }

  .confirm-btn-cancel,
  .confirm-btn-delete {
    max-width: none;
    padding: 12px 15px;
  }

  /* Responsive styles for standardized action buttons */
  .audio-btn,
  .arabic-btn,
  .meaning-btn,
  .ai-prompt-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
    height: 36px;
    min-height: 36px;
    border-radius: 12px;
  }

  .question-actions {
    gap: 8px;
    margin-top: 12px;
  }
}

@media (min-width: 1600px) {
  .container {
    max-width: 90%;
    width: 1600px;
  }
}

@media (min-width: 1920px) {
  .container {
    max-width: 85%;
    width: 1800px;
  }
}

/* Copy Answer Button Styles */
.input-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.input-field {
  flex: 1;
}

.copy-answer-btn {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.3);
  flex-shrink: 0;
}

.copy-answer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
  background: linear-gradient(135deg, #5f4fcf 0%, #9085e8 100%);
}

.copy-answer-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

/* Select Arabic Text Button */
.select-arabic-btn {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  line-height: 1;
  flex-shrink: 0;
}

.select-arabic-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.5);
  background: linear-gradient(135deg, #00a884 0%, #00beb4 100%);
}

.select-arabic-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0, 184, 148, 0.3);
}

/* Arabic phrase container */
.arabic-phrase-container {
  position: relative;
  margin-top: 10px;
}

.question-text-ar::selection {
  background: rgba(108, 92, 231, 0.3);
  color: #2c3e50;
}

.copy-image-prompt-btn {
  background: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(225, 112, 85, 0.3);
  flex-shrink: 0;
}

.copy-image-prompt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(225, 112, 85, 0.4);
  background: linear-gradient(135deg, #d63031 0%, #e17055 100%);
}

.copy-image-prompt-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(225, 112, 85, 0.3);
}

.copy-movie-prompt-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #a78bfa 100%);
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.25);
}

.copy-movie-prompt-btn:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #a78bfa 50%, #7c3aed 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.4), 0 0 15px rgba(167, 139, 250, 0.2);
}

.copy-movie-prompt-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 5px rgba(109, 40, 217, 0.2);
}

.copy-movie-prompt-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

/* Visual Example Delete Card Button */
.ve-delete-card-btn {
  display: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  letter-spacing: 0;
  line-height: 1;
  margin-left: 1px;
  vertical-align: middle;
  position: relative;
  overflow: hidden;
}

.ve-delete-card-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.4s ease;
}

.ve-delete-card-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  transform: scale(1.12) translateY(-1px);
  box-shadow: 0 5px 18px rgba(239, 68, 68, 0.65), 0 0 0 2px rgba(239,68,68,0.25);
}

.ve-delete-card-btn:hover::before {
  left: 100%;
}

.ve-delete-card-btn:active {
  transform: scale(0.93);
  box-shadow: 0 1px 5px rgba(239, 68, 68, 0.4);
}

.ve-delete-card-btn.ve-d-visible {
  display: inline-flex;
}

.height-control-input {
  width: 45px;
  height: 45px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.height-control-input:hover {
  border-color: #6c5ce7;
  background: linear-gradient(135deg, #ffffff 0%, #f1f3f4 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.2);
}

.height-control-input:focus {
  outline: none;
  border-color: #6c5ce7;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.height-control-input:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.reset-height-btn {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(253, 121, 168, 0.3);
  flex-shrink: 0;
}

.reset-height-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(253, 121, 168, 0.4);
  background: linear-gradient(135deg, #e84393 0%, #d63384 100%);
}

.reset-height-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(253, 121, 168, 0.3);
}

/* Input field styles for textarea */
.input-field {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #ddd;
  border-radius: 15px;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  outline: none;
  min-height: 45px;
  height: 45px;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  overflow-y: auto;
}

.input-field:focus {
  border-color: #4facfe;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.input-field:hover {
  border-color: #74b9ff;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.input-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 15px 0;
}

/* Answer Bulb Styles */
.answer-bulb {
  width: 45px;
  height: 45px;
  border: 2px solid #ddd;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: default;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.answer-bulb.bulb-correct {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  border-color: #00b894;
  box-shadow: 0 0 20px rgba(0, 184, 148, 0.6), 0 0 40px rgba(0, 184, 148, 0.4),
    0 0 60px rgba(0, 184, 148, 0.2);
  animation: bulbGlow 1.5s ease-in-out infinite alternate;
  transform: scale(1.05);
}

.answer-bulb.bulb-correct::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(0, 184, 148, 0.3) 0%,
    transparent 70%
  );
  animation: bulbPulse 2s ease-in-out infinite;
}

.answer-bulb.bulb-off {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  border-color: #6c757d;
  opacity: 0.6;
  transform: scale(0.95);
}

@keyframes bulbGlow {
  0% {
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.6), 0 0 40px rgba(0, 184, 148, 0.4),
      0 0 60px rgba(0, 184, 148, 0.2);
  }
  100% {
    box-shadow: 0 0 30px rgba(0, 184, 148, 0.8), 0 0 60px rgba(0, 184, 148, 0.6),
      0 0 90px rgba(0, 184, 148, 0.4);
  }
}

@keyframes bulbPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* Pronunciation Prompt Button Styles */
.pronunciation-prompt-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
  flex-shrink: 0;
}

.pronunciation-prompt-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
  background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
}

.pronunciation-prompt-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.pronunciation-prompt-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2),
    0 3px 10px rgba(255, 107, 107, 0.3);
}

/* Add pulse animation for pronunciation button */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive adjustments for copy buttons */
@media (max-width: 768px) {
  .copy-answer-btn,
  .copy-image-prompt-btn,
  .pronunciation-prompt-btn,
  .height-control-input,
  .reset-height-btn,
  .answer-bulb {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }

  .answer-bulb {
    font-size: 1.1rem;
  }

  .input-container {
    gap: 8px;
  }

  /* Select Arabic Button - Mobile */
  .select-arabic-btn {
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    font-size: 0.75rem !important;
  }

  .read-ar-phrase-btn {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.75rem !important;
  }

  .ar-phrase-actions {
    gap: 3px !important;
  }
}

/* ─── Read Arabic Phrase Button ─── */
.read-ar-phrase-btn {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.read-ar-phrase-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.5);
  background: linear-gradient(135deg, #5a4bd1 0%, #8b7cf6 100%);
}

.read-ar-phrase-btn:active {
  transform: scale(0.95);
}

.read-ar-phrase-btn.reading {
  background: linear-gradient(135deg, #e74c3c 0%, #fd7979 100%);
  box-shadow: 0 2px 10px rgba(231, 76, 60, 0.4);
  animation: arPhrasePulse 1.2s ease-in-out infinite;
}

@keyframes arPhrasePulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(231, 76, 60, 0.4); }
  50% { box-shadow: 0 2px 18px rgba(231, 76, 60, 0.7); }
}

/* ========================================
           ELEGANT TOOLTIPS FOR SHORTCUT BUTTONS
           ======================================== */

/* Elegant tooltip for audio button (Alt+Z) */
.audio-btn {
  position: relative;
}

.audio-btn::after {
  content: "Alt + Z";
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  pointer-events: none;
}

.audio-btn::before {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #2d3436;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.audio-btn:hover::after,
.audio-btn:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-3px);
}

.audio-btn:hover::after {
  animation: audioTooltipGlow 2s ease-in-out infinite;
}

@keyframes audioTooltipGlow {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 4px 20px rgba(225, 112, 85, 0.3),
      0 0 15px rgba(225, 112, 85, 0.2);
  }
}

/* Elegant tooltip for Arabic Translation button (Alt+X) */

/* Brief Explain Button Styles */
.brief-explain-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.brief-explain-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #f093fb 50%, #667eea 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4), 0 0 15px rgba(240, 147, 251, 0.2);
}

.brief-explain-btn.copied {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.brief-explain-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 5px rgba(102, 126, 234, 0.2);
}

.brief-explain-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.3);
}

/* AR Prompt Button */
.ar-prompt-btn {
  border: none;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  border-radius: 0 15px 15px 0;
  background: linear-gradient(135deg, #fddb92 0%, #d1a827 100%);
  color: #4a2e00;
  margin-left: -2px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 2px 8px rgba(209, 168, 39, 0.25);
}

.ar-prompt-btn:hover {
  background: linear-gradient(135deg, #f6d365 0%, #c49a10 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(209, 168, 39, 0.4);
}

.ar-prompt-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(209, 168, 39, 0.2);
}

/* Responsive design for brief explain button and visual example button */
@media (max-width: 768px) {
  .brief-explain-btn,
  .copy-movie-prompt-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    height: 36px;
    min-height: 36px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   💡 PROMPT EXAMPLE MODAL
   ═══════════════════════════════════════════════════════════════ */
.prompt-example-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.prompt-example-modal-overlay.active {
  opacity: 1;
}

.prompt-example-modal {
  background: linear-gradient(160deg, #0f0c29 0%, #1a1a3e 50%, #24243e 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(102, 126, 234, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.prompt-example-modal-overlay.active .prompt-example-modal {
  transform: scale(1) translateY(0);
}

/* Header */
.prompt-example-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(240, 147, 251, 0.15) 50%, rgba(118, 75, 162, 0.2) 100%);
  border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}

.prompt-example-modal-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prompt-example-modal-icon {
  font-size: 2rem;
  animation: promptIconFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(240, 147, 251, 0.4));
}

@keyframes promptIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

.prompt-example-modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #c4b5fd, #f093fb, #667eea);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: promptTitleShimmer 4s ease infinite;
}

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

.prompt-example-modal-word {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(240, 147, 251, 0.8);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.prompt-example-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.prompt-example-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  transform: rotate(90deg);
}

/* Body */
.prompt-example-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.prompt-example-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(240, 147, 251, 0.15));
  border: 1px solid rgba(102, 126, 234, 0.25);
  font-size: 0.78rem;
  font-weight: 600;
  color: #c4b5fd;
}

.prompt-example-modal-label {
  font-size: 0.88rem;
  color: rgba(196, 181, 253, 0.7);
  margin-bottom: 12px;
  line-height: 1.4;
}

.prompt-example-modal-label strong {
  color: #f093fb;
}

.prompt-example-modal-content {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(102, 126, 234, 0.2);
  border-radius: 14px;
  padding: 20px;
  font-family: 'Roboto Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(230, 220, 255, 0.9);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 300px;
  overflow-y: auto;
  position: relative;
  transition: border-color 0.3s ease;
}

.prompt-example-modal-content:hover {
  border-color: rgba(240, 147, 251, 0.35);
}

.prompt-word-highlight {
  color: #f0abfc;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.15), rgba(139, 92, 246, 0.15));
  padding: 1px 6px;
  border-radius: 5px;
  border-bottom: 2px solid rgba(240, 147, 251, 0.5);
  text-shadow: 0 0 8px rgba(240, 147, 251, 0.3);
}

.prompt-example-modal-content::-webkit-scrollbar {
  width: 5px;
}

.prompt-example-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.prompt-example-modal-content::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 10px;
}

.prompt-example-modal-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.08), rgba(102, 126, 234, 0.08));
  border-left: 3px solid #f093fb;
  border-radius: 0 10px 10px 0;
  font-size: 0.78rem;
  color: rgba(196, 181, 253, 0.6);
  line-height: 1.5;
}

.prompt-example-modal-hint strong {
  color: #f093fb;
}

/* Footer */
.prompt-example-modal-footer {
  display: flex;
  gap: 10px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(102, 126, 234, 0.12);
}

.prompt-example-read-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 50%, #d946ef 100%);
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.prompt-example-read-btn:hover {
  background-position: 100% 0%;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(217, 70, 239, 0.4), 0 0 15px rgba(6, 182, 212, 0.2);
}

.prompt-example-read-btn:active {
  transform: translateY(0);
}

.prompt-example-read-btn.reading {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 50%, #eab308 100%);
  background-size: 200% 200%;
  animation: readingPulse 1.5s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

@keyframes readingPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); background-position: 0% 50%; }
  50% { box-shadow: 0 4px 25px rgba(249, 115, 22, 0.5), 0 0 15px rgba(234, 179, 8, 0.2); background-position: 100% 50%; }
}

/* ── Arabic Read Mode — matches the Arabic translate button palette ── */
.prompt-example-read-btn.ar-read-mode {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 80%, #667eea 100%);
  background-size: 250% 250%;
  animation: arReadBtnFlow 4s ease infinite;
  box-shadow: 0 4px 18px rgba(102, 126, 234, 0.5), 0 0 12px rgba(240, 147, 251, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.prompt-example-read-btn.ar-read-mode::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0) 60%);
  background-size: 200% 100%;
  background-position: -100% 0;
  border-radius: inherit;
  transition: background-position 0.5s ease;
  pointer-events: none;
}

.prompt-example-read-btn.ar-read-mode:hover::after {
  background-position: 200% 0;
}

.prompt-example-read-btn.ar-read-mode:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 26px rgba(240, 147, 251, 0.6), 0 0 18px rgba(102, 126, 234, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

.prompt-example-read-btn.ar-read-mode.reading {
  background: linear-gradient(135deg, #9333ea 0%, #c026d3 40%, #f093fb 80%, #9333ea 100%);
  background-size: 250% 250%;
  animation: arReadingPulse 1.4s ease-in-out infinite;
  box-shadow: 0 4px 22px rgba(192, 38, 211, 0.55), 0 0 16px rgba(240, 147, 251, 0.4);
}

@keyframes arReadingPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(192, 38, 211, 0.4); background-position: 0% 50%; }
  50% { box-shadow: 0 6px 28px rgba(240, 147, 251, 0.65), 0 0 18px rgba(147, 51, 234, 0.35); background-position: 100% 50%; }
}

.prompt-example-copy-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.prompt-example-copy-btn:hover {
  background-position: 100% 0%;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(240, 147, 251, 0.4), 0 0 15px rgba(102, 126, 234, 0.2);
}

.prompt-example-copy-btn:active {
  transform: translateY(0);
}

.prompt-example-close-btn {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(196, 181, 253, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-example-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Translation Capsule Buttons ── */
.prompt-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.prompt-translate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.prompt-translate-status {
  font-size: 0.76rem;
  color: rgba(240, 147, 251, 0.85);
  white-space: nowrap;
  font-weight: 500;
}

.prompt-translate-ar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 80%, #667eea 100%);
  background-size: 250% 250%;
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.82rem;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: 0 3px 14px rgba(102, 126, 234, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  letter-spacing: 0.4px;
  animation: translateBtnFlow 4s ease infinite;
  position: relative;
  overflow: hidden;
}

.prompt-translate-ar-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0) 60%);
  background-size: 200% 100%;
  background-position: -100% 0;
  border-radius: inherit;
  transition: background-position 0.5s ease;
}

.prompt-translate-ar-btn:hover::before {
  background-position: 200% 0;
}

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

.prompt-translate-ar-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 7px 24px rgba(240, 147, 251, 0.6), 0 0 16px rgba(102, 126, 234, 0.3);
}

.prompt-translate-ar-btn:active {
  transform: translateY(0) scale(0.97);
}

.prompt-translate-ar-btn:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
  animation: none;
}

.prompt-translate-restore-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 20px;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 40%, #38bdf8 80%, #06b6d4 100%);
  background-size: 250% 250%;
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: 0 3px 14px rgba(6, 182, 212, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  letter-spacing: 0.4px;
  animation: restoreBtnFlow 4s ease infinite;
  position: relative;
  overflow: hidden;
}

.prompt-translate-restore-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0) 60%);
  background-size: 200% 100%;
  background-position: -100% 0;
  border-radius: inherit;
  transition: background-position 0.5s ease;
}

.prompt-translate-restore-btn:hover::before {
  background-position: 200% 0;
}

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

.prompt-translate-restore-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 7px 24px rgba(56, 189, 248, 0.6), 0 0 16px rgba(6, 182, 212, 0.3);
}

.prompt-translate-restore-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Responsive */
@media (max-width: 480px) {
  .prompt-badge-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .prompt-translate-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 768px) {
  .prompt-example-modal {
    max-width: 95%;
    border-radius: 16px;
  }
  .prompt-example-modal-header {
    padding: 16px 18px;
  }
  .prompt-example-modal-icon {
    font-size: 1.5rem;
  }
  .prompt-example-modal-title {
    font-size: 1rem;
  }
  .prompt-example-modal-body {
    padding: 18px;
  }
  .prompt-example-modal-content {
    font-size: 0.8rem;
    padding: 15px;
    max-height: 220px;
  }
  .prompt-example-modal-footer {
    padding: 14px 18px;
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════
   🖼️ VISUAL EXAMPLE MODAL
   ═══════════════════════════════════════════════════════════════ */
.visual-example-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.visual-example-modal-overlay.active {
  opacity: 1;
}

.visual-example-modal {
  background: linear-gradient(160deg, #1a0a2e 0%, #16213e 50%, #0f3460 100%);
  border: 2px solid rgba(124, 58, 237, 0.35);
  border-radius: 20px;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(124, 58, 237, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.visual-example-modal-overlay.active .visual-example-modal {
  transform: scale(1) translateY(0);
}

.visual-example-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(167, 139, 250, 0.15) 50%, rgba(109, 40, 217, 0.2) 100%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.visual-example-modal-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.visual-example-modal-icon {
  font-size: 2rem;
  animation: visualIconFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.5));
}

@keyframes visualIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-5deg); }
}

.visual-example-modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a78bfa, #c084fc, #7c3aed);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: visualTitleShimmer 4s ease infinite;
}

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

.visual-example-modal-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(167, 139, 250, 0.7);
  letter-spacing: 0.5px;
}

.visual-example-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.visual-example-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  transform: rotate(90deg);
}

.visual-example-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.visual-example-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(124, 58, 237, 0.3);
  font-size: 0.78rem;
  font-weight: 600;
  color: #c4b5fd;
  margin-bottom: 16px;
}

.visual-example-modal-label {
  font-size: 0.88rem;
  color: rgba(196, 181, 253, 0.7);
  margin-bottom: 12px;
  line-height: 1.5;
}

.visual-example-modal-label strong {
  color: #a78bfa;
}

.visual-example-modal-content {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(124, 58, 237, 0.2);
  border-radius: 14px;
  padding: 20px;
  font-family: 'Roboto Mono', 'Fira Code', monospace;
  font-size: 0.83rem;
  line-height: 1.7;
  color: rgba(220, 210, 255, 0.9);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 320px;
  overflow-y: auto;
  position: relative;
  transition: border-color 0.3s ease;
}

.visual-example-modal-content:hover {
  border-color: rgba(167, 139, 250, 0.4);
}

.visual-example-modal-content::-webkit-scrollbar {
  width: 5px;
}

.visual-example-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.visual-example-modal-content::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 10px;
}

.visual-example-modal-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(167, 139, 250, 0.08));
  border-left: 3px solid #a78bfa;
  border-radius: 0 10px 10px 0;
  font-size: 0.78rem;
  color: rgba(196, 181, 253, 0.65);
  line-height: 1.5;
}

.visual-example-modal-hint strong {
  color: #a78bfa;
}

.visual-example-modal-footer {
  display: flex;
  gap: 10px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(124, 58, 237, 0.15);
}

.visual-example-read-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #06b6d4 0%, #7c3aed 50%, #c084fc 100%);
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.visual-example-read-btn:hover {
  background-position: 100% 0%;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(192, 132, 252, 0.4), 0 0 15px rgba(6, 182, 212, 0.2);
}

.visual-example-read-btn:active {
  transform: translateY(0);
}

.visual-example-read-btn.reading {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 50%, #eab308 100%);
  background-size: 200% 200%;
  animation: readingPulse 1.5s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.visual-example-copy-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #a78bfa 100%);
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.visual-example-copy-btn:hover {
  background-position: 100% 0%;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(167, 139, 250, 0.4), 0 0 15px rgba(124, 58, 237, 0.2);
}

.visual-example-copy-btn:active {
  transform: translateY(0);
}

.visual-example-close-btn {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(196, 181, 253, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.visual-example-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Admin Section (below footer, admin-only) ────────────── */
.visual-example-admin-section {
  display: none; /* shown via JS only when admin is active */
  flex-direction: column;
  gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px dashed rgba(118, 75, 162, 0.35);
  background: rgba(118, 75, 162, 0.06);
  border-radius: 0 0 20px 20px;
}

.visual-example-admin-top {
  display: flex;
  align-items: center;
}

.visual-example-admin-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(196, 181, 253, 0.5);
  text-transform: uppercase;
}

.visual-example-admin-input {
  width: 100%;
  min-height: 72px;
  max-height: 160px;
  padding: 10px 14px;
  font-family: 'Fira Code', 'Roboto Mono', 'Consolas', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(118, 75, 162, 0.3);
  border-radius: 8px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}
.visual-example-admin-input:focus {
  border-color: rgba(118, 75, 162, 0.7);
}
.visual-example-admin-input::placeholder {
  color: rgba(196, 181, 253, 0.4);
}

.visual-example-admin-options {
  display: flex;
  align-items: center;
}

.visual-example-admin-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  color: rgba(196, 181, 253, 0.75);
  transition: color 0.2s;
}
.visual-example-admin-check-label:hover { color: rgba(196, 181, 253, 1); }

.visual-example-admin-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(118, 75, 162, 0.55);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
}
.visual-example-admin-checkbox:checked {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: #764ba2;
}
.visual-example-admin-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.visual-example-admin-check-label code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.75rem;
  color: #a5f3fc;
  font-family: 'Fira Code', 'Roboto Mono', monospace;
}

.visual-example-admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.visual-example-admin-hint {
  font-size: 0.72rem;
  color: rgba(196, 181, 253, 0.4);
  font-style: italic;
}

.visual-example-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
  transition: all 0.25s ease;
  margin-left: auto;
}
.visual-example-create-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.55);
}
.visual-example-create-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .visual-example-modal {
    max-width: 95%;
    border-radius: 16px;
  }
  .visual-example-modal-header {
    padding: 16px 18px;
  }
  .visual-example-modal-icon {
    font-size: 1.5rem;
  }
  .visual-example-modal-title {
    font-size: 1rem;
  }
  .visual-example-modal-body {
    padding: 18px;
  }
  .visual-example-modal-content {
    font-size: 0.78rem;
    padding: 15px;
    max-height: 240px;
  }
  .visual-example-modal-footer {
    padding: 14px 18px;
    flex-direction: column;
  }
}

.arabic-btn {
  position: relative;
}

.arabic-btn::after {
  content: "Alt + X";
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  pointer-events: none;
}

.arabic-btn::before {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #2d3436;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.arabic-btn:hover::after,
.arabic-btn:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-3px);
}

.arabic-btn:hover::after {
  animation: arabicTooltipGlow 2s ease-in-out infinite;
}

@keyframes arabicTooltipGlow {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 4px 20px rgba(0, 184, 148, 0.3),
      0 0 15px rgba(0, 184, 148, 0.2);
  }
}

/* ═══════════════════════════════════════════════════════════════
   🎓 TAKE A FULL COURSE BUTTON
   ═══════════════════════════════════════════════════════════════ */
.course-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  height: 52px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35), 0 0 0 0 rgba(118, 75, 162, 0);
  outline: none;
}

.course-btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5), 0 0 20px rgba(118, 75, 162, 0.25);
}

.course-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.course-btn-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 70%, #667eea 100%);
  background-size: 300% 300%;
  animation: courseGradientShift 4s ease infinite;
  z-index: 0;
}

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

.course-btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  z-index: 1;
  animation: courseShine 3s ease-in-out infinite;
}

@keyframes courseShine {
  0% { left: -100%; }
  50% { left: 150%; }
  100% { left: 150%; }
}

.course-btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0 20px;
  color: white;
  font-family: inherit;
}

.course-btn-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  animation: courseBounce 2s ease infinite;
}

@keyframes courseBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.course-btn-text {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-btn-text strong {
  color: #ffd700;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.course-btn-arrow {
  font-size: 1.3rem;
  font-weight: 700;
  transition: transform 0.3s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.course-btn:hover .course-btn-arrow {
  transform: translateX(5px);
  animation: courseArrowPulse 0.6s ease infinite;
}

@keyframes courseArrowPulse {
  0%, 100% { transform: translateX(5px); }
  50% { transform: translateX(10px); }
}

/* ═══════════════════════════════════════════════════════════════
   🎓 COURSE BUTTON ROW (Up · Full Course · Down)
   ═══════════════════════════════════════════════════════════════ */
.course-btn-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.course-btn-row .course-btn {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.course-btn-mini {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 72px;
  height: 52px;
  padding: 0 12px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
  outline: none;
}

.course-btn-mini:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5), 0 0 18px rgba(118, 75, 162, 0.25);
}

.course-btn-mini:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.course-btn-mini .course-btn-bg {
  opacity: 0.92;
}

.course-btn-mini-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.course-btn-mini .cbm-arrow {
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.course-btn-mini.up:hover .cbm-arrow { transform: translateY(-2px); }
.course-btn-mini.down:hover .cbm-arrow { transform: translateY(2px); }

.course-btn-number-slot {
  position: relative;
  flex: 0 0 66px;
  min-width: 58px;
  height: 52px;
  display: flex;
  align-items: stretch;
}

.course-btn-number-input {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  padding: 0 9px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(238, 242, 255, 0.86) 100%);
  color: #312e81;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 15px rgba(102, 126, 234, 0.18);
  transition: all 0.3s ease;
}

.course-btn-number-input::placeholder {
  color: rgba(49, 46, 129, 0.55);
}

.course-btn-number-input:hover,
.course-btn-number-input:focus {
  border-color: rgba(102, 126, 234, 0.7);
  background:
    linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 24px rgba(102, 126, 234, 0.28);
  transform: translateY(-2px);
}

/* Per-question: full course + image word search (same row) */
.course-btn-middle {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
  align-items: stretch;
}

.course-btn-middle > .course-btn {
  flex: 1 1 58%;
  min-width: 0;
}

.per-question-image-search {
  flex: 0 1 42%;
  min-width: 120px;
  max-width: 320px;
  position: relative;
  display: flex;
  align-items: stretch;
  z-index: 12000;
}

.per-q-search-inner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 4px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f2ff 100%);
  border: 1px solid rgba(102, 126, 234, 0.45);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.per-question-image-search:focus-within .per-q-search-inner {
  box-shadow: 0 4px 18px rgba(102, 126, 234, 0.35);
  border-color: #667eea;
}

.per-q-search-ico {
  font-size: 1rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.per-q-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2d3748;
  outline: none;
  padding: 10px 4px 10px 0;
  font-family: inherit;
}

.per-q-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.per-q-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(60vh, 320px);
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
  border: 1px solid rgba(102, 126, 234, 0.4);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  padding: 6px;
  z-index: 12001;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.per-q-search-dropdown.is-visible,
.per-q-search-dropdown.per-q-search-dropdown--open {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.per-q-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  border: 1px solid transparent;
}

.per-q-dd-item:hover,
.per-q-dd-item.per-q-dd--highlighted {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-color: rgba(102, 126, 234, 0.2);
  transform: translateX(1px);
}

.per-q-dd-thumb {
  width: 72px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1b2e 0%, #2d2f4a 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.per-q-dd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.per-q-dd-thumb--letter {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  font-family: Georgia, "Times New Roman", serif;
}

.per-q-dd-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.per-q-dd-word {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.per-q-dd-hint {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.per-q-search-empty,
.per-q-search-hint-bar {
  padding: 8px 10px;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

@media (max-width: 900px) {
  .course-btn-middle {
    flex-direction: column;
    width: 100%;
  }
  .course-btn-middle > .course-btn { flex: 1 1 auto; }
  .per-question-image-search { max-width: none; width: 100%; flex: 1 1 auto; }
}

@media (max-width: 520px) {
  .course-btn-row { gap: 6px; }
  .course-btn-mini {
    min-width: 54px;
    padding: 0 8px;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
  }
  .course-btn-mini .cbm-text { display: none; }
  .course-btn-mini .cbm-arrow { font-size: 1.05rem; }
  .course-btn-number-slot {
    flex-basis: 48px;
    min-width: 44px;
  }
  .course-btn-number-input {
    padding: 0 5px;
    font-size: 0.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   🎆 COURSE MODAL (FIREWORKS POPUP)
   ═══════════════════════════════════════════════════════════════ */
.course-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  animation: courseOverlayIn 0.3s ease;
}

.course-modal-overlay.active {
  display: flex;
}

@keyframes courseOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.course-modal-card {
  position: relative;
  background: linear-gradient(145deg, #0f0c29 0%, #1a1a3e 40%, #24243e 100%);
  border-radius: 24px;
  padding: 45px 40px 40px;
  max-width: 560px;
  width: 92%;
  text-align: center;
  box-shadow:
    0 25px 80px rgba(102, 126, 234, 0.4),
    0 0 60px rgba(118, 75, 162, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
  border: 2px solid rgba(102, 126, 234, 0.3);
  overflow: hidden;
  animation: courseCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

@keyframes courseCardIn {
  from { transform: scale(0.5) translateY(40px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.course-modal-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea);
  background-size: 400% 400%;
  animation: courseBorderGlow 3s ease infinite;
  z-index: -1;
  opacity: 0.6;
}

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

.course-modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.course-modal-close:hover {
  background: rgba(255, 77, 77, 0.6);
  border-color: rgba(255, 77, 77, 0.8);
  transform: rotate(90deg) scale(1.1);
}

.course-modal-emoji {
  font-size: 4.5rem;
  margin-bottom: 10px;
  animation: courseEmojiFloat 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.5));
}

@keyframes courseEmojiFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(-3deg); }
  75% { transform: translateY(-4px) rotate(3deg); }
}

.course-modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffd700, #ffaa00, #ff6b6b, #ffd700);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: courseTitleGlow 3s ease infinite;
}

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

.course-modal-word {
  font-size: 1.3rem;
  color: #a78bfa;
  font-weight: 700;
  margin-bottom: 18px;
  text-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
}

.course-modal-divider {
  width: 80px;
  height: 3px;
  margin: 0 auto 20px;
  background: linear-gradient(90deg, transparent, #667eea, #f093fb, transparent);
  border-radius: 3px;
  animation: courseDividerPulse 2s ease infinite;
}

@keyframes courseDividerPulse {
  0%, 100% { width: 80px; opacity: 0.8; }
  50% { width: 140px; opacity: 1; }
}

.course-modal-message {
  font-size: 1.05rem;
  color: #c4b5fd;
  line-height: 1.7;
  margin-bottom: 25px;
}

.course-modal-message strong {
  color: #fbbf24;
}

.course-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border: 1px solid rgba(102, 126, 234, 0.3);
  padding: 10px 22px;
  border-radius: 30px;
  color: #e0d4fd;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 22px;
  animation: courseBadgePulse 2s ease infinite;
}

@keyframes courseBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(102, 126, 234, 0); }
}

.course-modal-ok-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 50px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  letter-spacing: 0.3px;
}

.course-modal-ok-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.course-modal-ok-btn:active {
  transform: translateY(0);
}

/* Fireworks Canvas */
.fireworks-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 24px;
}

/* Sparkle particles around the card */
.course-sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.course-sparkle:nth-child(1) { top: 10%; left: 10%; background: #ffd700; animation: sparkleFloat 2.5s ease infinite 0s; }
.course-sparkle:nth-child(2) { top: 20%; right: 15%; background: #ff6b6b; animation: sparkleFloat 3s ease infinite 0.3s; }
.course-sparkle:nth-child(3) { bottom: 25%; left: 20%; background: #a78bfa; animation: sparkleFloat 2.8s ease infinite 0.6s; }
.course-sparkle:nth-child(4) { bottom: 15%; right: 10%; background: #34d399; animation: sparkleFloat 3.2s ease infinite 0.9s; }
.course-sparkle:nth-child(5) { top: 50%; left: 5%; background: #f093fb; animation: sparkleFloat 2.6s ease infinite 1.2s; }
.course-sparkle:nth-child(6) { top: 40%; right: 5%; background: #60a5fa; animation: sparkleFloat 3.1s ease infinite 0.4s; }

@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
  25% { transform: translateY(-12px) scale(1.5); opacity: 1; }
  50% { transform: translateY(-6px) scale(0.8); opacity: 0.5; }
  75% { transform: translateY(-15px) scale(1.3); opacity: 0.9; }
}

/* Responsive */
@media (max-width: 768px) {
  .course-btn {
    height: 46px;
    border-radius: 12px;
  }
  .course-btn-text {
    font-size: 0.82rem;
  }
  .course-btn-icon {
    font-size: 1.2rem;
  }
  .course-modal-card {
    padding: 35px 25px 30px;
    margin: 15px;
  }
  .course-modal-title {
    font-size: 1.4rem;
  }
  .course-modal-emoji {
    font-size: 3.5rem;
  }
  .course-modal-message {
    font-size: 0.95rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   🤖 AI CHAT CONTAINER (Per-Question)
   ═══════════════════════════════════════════════════════════════ */
.ai-chat-container {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(102, 126, 234, 0.2);
  background: linear-gradient(160deg, #0f0c29 0%, #1a1a3e 50%, #24243e 100%);
  box-shadow:
    0 8px 32px rgba(102, 126, 234, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  min-height: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ai-chat-container:hover {
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow:
    0 10px 40px rgba(102, 126, 234, 0.2),
    0 0 20px rgba(118, 75, 162, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Header */
.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}

.ai-chat-header-icon {
  font-size: 1.3rem;
  animation: aiIconPulse 3s ease-in-out infinite;
}

@keyframes aiIconPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(102, 126, 234, 0.3)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.6)); }
}

.ai-chat-header-title {
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.ai-chat-header-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  animation: badgeGlow 2s ease infinite;
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(102, 126, 234, 0.4); }
  50% { box-shadow: 0 0 14px rgba(102, 126, 234, 0.7), 0 0 4px rgba(118, 75, 162, 0.4); }
}

/* Response Area */
.ai-chat-response-area {
  flex: 1;
  min-height: 50px;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 15px;
}

.ai-placeholder-icon {
  font-size: 2.5rem;
  animation: placeholderFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3));
}

@keyframes placeholderFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.ai-placeholder-text {
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffd700, #ffaa00, #f093fb, #ffd700);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: aiPlaceholderGlow 4s ease infinite;
}

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

.ai-placeholder-sub {
  font-size: 0.82rem;
  color: rgba(196, 181, 253, 0.6);
  line-height: 1.5;
}

.ai-placeholder-sub strong {
  color: #a78bfa;
}

/* Input Area */
.ai-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(102, 126, 234, 0.12);
}

.ai-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #e0d4fd;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: all 0.3s ease;
  min-height: 40px;
  max-height: 80px;
}

.ai-chat-input::placeholder {
  color: rgba(196, 181, 253, 0.35);
  font-style: italic;
}

.ai-chat-input:focus {
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.15);
}

.ai-chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  flex-shrink: 0;
}

.ai-chat-send-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.45);
}

.ai-chat-send-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

.ai-chat-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: linear-gradient(135deg, #4a4e69 0%, #3a3d5c 100%);
  box-shadow: none;
}

.ai-chat-send-btn span {
  display: inline-block;
  transform: rotate(-0deg);
}

/* Responsive */
@media (max-width: 768px) {
  .ai-chat-container {
    min-height: 180px;
    border-radius: 12px;
  }
  .ai-chat-header {
    padding: 10px 14px;
  }
  .ai-chat-header-title {
    font-size: 0.85rem;
  }
  .ai-chat-response-area {
    min-height: 90px;
    padding: 14px;
  }
  .ai-placeholder-icon {
    font-size: 2rem;
  }
  .ai-placeholder-text {
    font-size: 0.88rem;
  }
  .ai-placeholder-sub {
    font-size: 0.75rem;
  }
  .ai-chat-input-area {
    padding: 10px 12px;
  }
  .ai-chat-input {
    font-size: 0.82rem;
    padding: 8px 12px;
  }
  .ai-chat-send-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   🤖 AI CHAT MESSAGES & CONVERSATION
   ═══════════════════════════════════════════════════════════════ */

/* Welcome message (replaces old placeholder) */
.ai-chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 20px 15px;
  min-height: 80px;
}

.ai-welcome-icon {
  font-size: 2rem;
  animation: aiIconPulse 3s ease-in-out infinite;
}

.ai-welcome-text {
  color: rgba(196, 181, 253, 0.85);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.ai-welcome-sub {
  color: rgba(167, 139, 250, 0.5);
  font-size: 0.78rem;
  font-style: italic;
}

/* Chat message row */
.ai-chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 14px;
  animation: aiMsgFadeIn 0.3s ease-out;
}

@keyframes aiMsgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* User messages align right */
.ai-chat-msg-user {
  flex-direction: row-reverse;
}

/* Avatar */
.ai-chat-msg-avatar {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 2px;
}

/* Message bubble */
.ai-chat-msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* User bubble */
.ai-chat-msg-user .ai-chat-msg-bubble {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* AI bubble */
.ai-chat-msg-ai .ai-chat-msg-bubble {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(230, 220, 255, 0.92);
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-bottom-left-radius: 4px;
}

.ai-chat-msg-ai .ai-chat-msg-bubble strong {
  color: #c4b5fd;
}

.ai-chat-msg-ai .ai-chat-msg-bubble em {
  color: rgba(167, 139, 250, 0.9);
}

.ai-chat-msg-ai .ai-chat-msg-bubble code {
  background: rgba(102, 126, 234, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #a78bfa;
}

/* Error bubble */
.ai-chat-msg-ai-error .ai-chat-msg-bubble {
  background: rgba(239, 68, 68, 0.12);
  color: rgba(252, 165, 165, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.ai-typing-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 18px !important;
  min-width: 60px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.6);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Clear chat button in header */
.ai-chat-clear-btn {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: rgba(252, 165, 165, 0.7);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.ai-chat-clear-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  transform: scale(1.05);
}

/* Override response area for scrollable chat */
.ai-chat-response-area {
  display: block;
  align-items: initial;
  justify-content: initial;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 8px 0;
}

/* Override badge color for Live */
.ai-chat-header-badge {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.4) !important;
  animation: liveBadgePulse 2s ease-in-out infinite !important;
}

@keyframes liveBadgePulse {
  0%, 100% { box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
  50% { box-shadow: 0 0 14px rgba(52, 211, 153, 0.7), 0 0 4px rgba(16, 185, 129, 0.4); }
}

/* Scrollbar for chat area */
.ai-chat-response-area::-webkit-scrollbar {
  width: 5px;
}

.ai-chat-response-area::-webkit-scrollbar-track {
  background: transparent;
}

.ai-chat-response-area::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.25);
  border-radius: 10px;
}

.ai-chat-response-area::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.45);
}

/* Responsive for chat messages */
@media (max-width: 768px) {
  .ai-chat-msg-bubble {
    max-width: 90%;
    font-size: 0.82rem;
    padding: 8px 12px;
  }
  .ai-chat-msg-avatar {
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }
  .ai-chat-msg {
    padding: 4px 10px;
  }
  .ai-chat-clear-btn {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ✨ AI PRESET PROMPT SUGGESTIONS
   ═══════════════════════════════════════════════════════════════ */

.ai-prompt-suggestions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  width: 100%;
}

.ai-prompt-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(196, 181, 253, 0.55);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  animation: labelShimmer 3s ease-in-out infinite;
}

@keyframes labelShimmer {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}

.ai-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0 4px;
}

.ai-prompt-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 24px;
  border: 1.5px solid rgba(102, 126, 234, 0.2);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  color: rgba(196, 181, 253, 0.85);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

/* Shimmer sweep on hover */
.ai-prompt-chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.ai-prompt-chip:hover::before {
  left: 100%;
}

.ai-prompt-chip:hover {
  border-color: rgba(102, 126, 234, 0.55);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.18) 0%, rgba(118, 75, 162, 0.18) 100%);
  color: #e0d4fd;
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 6px 20px rgba(102, 126, 234, 0.25),
    0 0 12px rgba(118, 75, 162, 0.12);
}

.ai-prompt-chip:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
  transition: all 0.1s ease;
}

.ai-chip-icon {
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.ai-prompt-chip:hover .ai-chip-icon {
  transform: scale(1.2) rotate(-5deg);
}

.ai-chip-text {
  letter-spacing: 0.3px;
}

/* Staggered entrance animation */
.ai-prompt-chip:nth-child(1) { animation: chipSlideIn 0.4s 0.1s ease-out both; }
.ai-prompt-chip:nth-child(2) { animation: chipSlideIn 0.4s 0.2s ease-out both; }
.ai-prompt-chip:nth-child(3) { animation: chipSlideIn 0.4s 0.3s ease-out both; }
.ai-prompt-chip:nth-child(4) { animation: chipSlideIn 0.4s 0.4s ease-out both; }

@keyframes chipSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .ai-prompt-suggestions {
    margin-top: 12px;
    padding-top: 10px;
    gap: 8px;
  }
  .ai-prompt-chips {
    gap: 6px;
  }
  .ai-prompt-chip {
    padding: 7px 12px;
    font-size: 0.73rem;
    border-radius: 20px;
  }
  .ai-chip-icon {
    font-size: 0.9rem;
  }
  .ai-prompt-label {
    font-size: 0.7rem;
  }
}


/* ═══════════════════════════════════════════════════════════════
   🖼️ WORD IMAGE PLACEHOLDER — Under Construction
   ═══════════════════════════════════════════════════════════════ */

.wip-visual {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  background:
    linear-gradient(165deg, #1e1f35 0%, #262740 50%, #1c1d32 100%);
  border: 1px solid rgba(114, 137, 245, 0.12);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.wip-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(114, 137, 245, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 90%, rgba(209, 168, 39, 0.06), transparent 50%);
  pointer-events: none;
}

.wip-visual::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(209, 168, 39, 0.25) 50%, transparent 90%);
}

.wip-visual__scene {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 16px 18px;
  gap: 6px;
  min-height: 100%;
}

.wip-visual__mount {
  width: 56px;
  height: 56px;
  position: relative;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(209, 168, 39, 0.08), rgba(114, 137, 245, 0.06));
  border: 1px solid rgba(209, 168, 39, 0.12);
  box-shadow: 0 0 20px rgba(209, 168, 39, 0.06);
  margin-bottom: 4px;
}

.wip-visual__mount::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 24px;
  border: 2px solid rgba(209, 168, 39, 0.4);
  border-radius: 3px;
}

.wip-visual__mount::after {
  content: '';
  position: absolute;
  bottom: 13px;
  left: 16px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 9px solid rgba(209, 168, 39, 0.3);
  filter: drop-shadow(12px 0 0 rgba(114, 137, 245, 0.25));
}

.wip-visual__badge {
  display: inline-block;
  padding: 4px 16px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(26, 27, 46, 0.92);
  background: linear-gradient(90deg, #c9a227 0%, #f0d78c 45%, #d4af37 100%);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(209, 168, 39, 0.3);
  line-height: 1;
}

.wip-visual__word {
  margin: 6px 0 0;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.03em;
  color: #f0f0ff;
  text-shadow: 0 2px 16px rgba(114, 137, 245, 0.3);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.2;
}

.wip-visual__note {
  margin: 4px 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: rgba(176, 179, 204, 0.55);
  text-align: center;
  max-width: 90%;
  letter-spacing: 0.01em;
}

.wip-visual--has-img {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wip-visual--has-img::before,
.wip-visual--has-img::after {
  display: none;
}

.wip-visual__img {
  width: 100%;
  flex: 1 1 auto;
  min-height: 220px;
  aspect-ratio: 16 / 7;
  display: block;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 12px;
}

.wip-visual__img-word {
  display: none;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(114, 137, 245, 0.25);
}

/* Ornamental text-only visual (e.g. angel — no bitmap image) */
.wip-visual--text-art {
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(ellipse 85% 70% at 50% 20%, rgba(209, 168, 39, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 85%, rgba(114, 137, 245, 0.1), transparent 50%),
    linear-gradient(165deg, #1a1b2e 0%, #22233c 45%, #17182b 100%);
  border: 1px solid rgba(209, 168, 39, 0.22);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.wip-visual--text-art::before,
.wip-visual--text-art::after {
  display: none;
}

.wip-visual__text-art-frame {
  position: relative;
  width: 100%;
  padding: 28px 32px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wip-visual__text-art-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(209, 168, 39, 0.55);
  border-style: double;
  pointer-events: none;
}

.wip-visual__text-art-corner--tl {
  top: 14px;
  left: 14px;
  border-width: 3px 0 0 3px;
}

.wip-visual__text-art-corner--tr {
  top: 14px;
  right: 14px;
  border-width: 3px 3px 0 0;
}

.wip-visual__text-art-corner--bl {
  bottom: 14px;
  left: 14px;
  border-width: 0 0 3px 3px;
}

.wip-visual__text-art-corner--br {
  bottom: 14px;
  right: 14px;
  border-width: 0 3px 3px 0;
}

.wip-visual__text-art-inner {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  text-align: center;
}

.wip-visual__text-art-eyebrow {
  margin: 0 0 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(209, 168, 39, 0.75);
  font-family: Georgia, 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.wip-visual__text-art-title {
  margin: 0;
  font-size: clamp(2.1rem, 4.5vw, 2.85rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.08em;
  font-family: Georgia, 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  background: linear-gradient(120deg, #f0d78c 0%, #fff8e7 35%, #e8c86a 55%, #c9a227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(209, 168, 39, 0.35));
  line-height: 1.15;
}

.wip-visual__text-art-rule {
  width: min(220px, 55%);
  height: 2px;
  margin: 14px auto 16px;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(209, 168, 39, 0.45) 20%,
    rgba(255, 248, 231, 0.55) 50%,
    rgba(209, 168, 39, 0.45) 80%,
    transparent
  );
}

.wip-visual__text-art-body {
  margin: 0 0 12px;
  font-size: clamp(0.92rem, 1.9vw, 1.02rem);
  line-height: 1.65;
  color: rgba(232, 234, 255, 0.9);
  font-family: Georgia, 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  letter-spacing: 0.02em;
}

.wip-visual__text-art-body strong {
  font-weight: 600;
  color: #fffdf5;
}

.wip-visual__text-art-body--secondary {
  margin-bottom: 0;
  font-size: clamp(0.78rem, 1.5vw, 0.88rem);
  line-height: 1.55;
  color: rgba(176, 179, 204, 0.72);
  font-style: italic;
}

.wip-visual__text-art-body--example {
  margin: 0 0 12px;
  font-size: clamp(0.88rem, 1.75vw, 0.98rem);
  line-height: 1.6;
  color: rgba(220, 224, 255, 0.88);
  font-family: Georgia, 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  font-style: normal;
}

.wip-visual__text-art-body--example strong {
  color: rgba(209, 168, 39, 0.95);
  font-weight: 600;
}

/* Text-only visual — cherub (angel-style card; soft heavenly gradient, script title) */
.wip-visual--cherub-meaning {
  background:
    radial-gradient(ellipse 88% 72% at 50% 12%, rgba(135, 206, 235, 0.2), transparent 58%),
    radial-gradient(ellipse 55% 48% at 8% 88%, rgba(209, 168, 39, 0.14), transparent 52%),
    radial-gradient(ellipse 45% 40% at 92% 75%, rgba(114, 137, 245, 0.12), transparent 50%),
    linear-gradient(165deg, #1a1b2e 0%, #1c2038 48%, #17182b 100%);
  border: 1px solid rgba(209, 168, 39, 0.24);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.wip-visual--cherub-meaning .wip-visual__text-art-title {
  font-family: 'Segoe Script', 'Snell Roundhand', 'Apple Chancery', 'Brush Script MT', Georgia, serif;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: clamp(2.35rem, 5vw, 3.1rem);
}

/* Text-only visual — chic (editorial fashion; same card structure as cherub) */
.wip-visual--chic-meaning {
  background:
    radial-gradient(ellipse 82% 70% at 50% 10%, rgba(251, 243, 235, 0.16), transparent 56%),
    radial-gradient(ellipse 50% 45% at 12% 85%, rgba(212, 165, 116, 0.14), transparent 52%),
    radial-gradient(ellipse 48% 42% at 88% 70%, rgba(167, 139, 250, 0.1), transparent 48%),
    linear-gradient(162deg, #1a1b2e 0%, #231a22 42%, #17182b 100%);
  border: 1px solid rgba(212, 165, 116, 0.28);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.wip-visual--chic-meaning .wip-visual__text-art-corner {
  border-color: rgba(212, 165, 116, 0.5);
}

.wip-visual--chic-meaning .wip-visual__text-art-eyebrow {
  color: rgba(232, 213, 183, 0.82);
}

.wip-visual--chic-meaning .wip-visual__text-art-title {
  font-family: Didot, 'Bodoni MT', 'Playfair Display', 'Palatino Linotype', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.1em;
  font-size: clamp(2.5rem, 5.2vw, 3.25rem);
  background: linear-gradient(118deg, #f5e6d3 0%, #fff9f0 35%, #e8d5c4 55%, #d4a574 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(212, 165, 116, 0.35));
}

.wip-visual--chic-meaning .wip-visual__text-art-rule {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 165, 116, 0.45) 22%,
    rgba(255, 248, 240, 0.5) 50%,
    rgba(212, 165, 116, 0.45) 78%,
    transparent
  );
}

/* Text-only visual — deity (no bitmap; illuminated caption, navy + gold like word banners) */
.wip-visual--deity-meaning {
  background:
    radial-gradient(ellipse 75% 55% at 50% 35%, rgba(209, 168, 39, 0.18), transparent 58%),
    radial-gradient(ellipse 45% 40% at 15% 80%, rgba(114, 137, 245, 0.08), transparent 50%),
    linear-gradient(165deg, #1a1b2e 0%, #1e2040 42%, #17182b 100%);
  border: 1px solid rgba(209, 168, 39, 0.28);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.wip-visual--deity-meaning .wip-visual__text-art-corner {
  width: 26px;
  height: 26px;
  border-color: rgba(209, 168, 39, 0.65);
  border-style: double;
}

.wip-visual--deity-meaning .wip-visual__text-art-eyebrow {
  color: rgba(209, 168, 39, 0.82);
  letter-spacing: 0.32em;
}

.wip-visual--deity-meaning .wip-visual__text-art-title {
  font-family: 'Palatino Linotype', Palatino, 'Times New Roman', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.5rem, 5.5vw, 3.35rem);
  letter-spacing: 0.14em;
  text-transform: none;
  background: linear-gradient(125deg, #f0d78c 0%, #fff8e7 32%, #e8c86a 52%, #c9a227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 16px rgba(209, 168, 39, 0.45));
}

.wip-visual--deity-meaning .wip-visual__text-art-ornament {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 1.4;
  letter-spacing: 0.35em;
  color: rgba(209, 168, 39, 0.72);
  font-family: 'Palatino Linotype', Palatino, Georgia, serif;
  text-shadow: 0 0 20px rgba(209, 168, 39, 0.25);
}

.wip-visual--deity-meaning .wip-visual__text-art-ornament--top {
  margin-bottom: 6px;
}

.wip-visual--deity-meaning .wip-visual__text-art-ornament--mid {
  margin: 6px 0 4px;
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: rgba(232, 213, 170, 0.85);
}

.wip-visual--deity-meaning .wip-visual__text-art-ornament--bottom {
  margin-top: 14px;
  opacity: 0.85;
}

.wip-visual--deity-meaning .wip-visual__text-art-pos {
  margin: 0 0 4px;
  font-size: clamp(0.72rem, 1.4vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(176, 179, 204, 0.7);
  font-family: 'Palatino Linotype', Palatino, Georgia, serif;
}

.wip-visual--deity-meaning .wip-visual__text-art-rule {
  margin-top: 12px;
}

.wip-visual--deity-meaning .wip-visual__text-art-body {
  color: rgba(238, 240, 255, 0.92);
}

/* Text-only visual — ballerina (same structure as angel; stage / ballet palette) */
.wip-visual--ballerina-meaning {
  background:
    radial-gradient(ellipse 92% 78% at 48% 12%, rgba(251, 207, 232, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 48% at 12% 88%, rgba(167, 139, 250, 0.14), transparent 52%),
    radial-gradient(ellipse 48% 42% at 92% 72%, rgba(251, 191, 36, 0.1), transparent 50%),
    linear-gradient(158deg, #1a1528 0%, #221a30 42%, #151022 100%);
  border: 1px solid rgba(236, 72, 153, 0.3);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 48px rgba(236, 72, 153, 0.1);
}

.wip-visual--ballerina-meaning .wip-visual__text-art-corner {
  border-color: rgba(244, 114, 182, 0.55);
}

.wip-visual--ballerina-meaning .wip-visual__text-art-eyebrow {
  color: rgba(251, 182, 206, 0.88);
}

.wip-visual--ballerina-meaning .wip-visual__text-art-title {
  background: linear-gradient(
    118deg,
    #fbcfe8 0%,
    #fdf2f8 28%,
    #f9a8d4 48%,
    #e9d5ff 68%,
    #fce7f3 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 16px rgba(236, 72, 153, 0.38));
}

.wip-visual--ballerina-meaning .wip-visual__text-art-rule {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(244, 114, 182, 0.45) 22%,
    rgba(253, 224, 232, 0.6) 50%,
    rgba(167, 139, 250, 0.4) 78%,
    transparent
  );
}

.question-main > .wip-visual.wip-visual--text-art,
.bsc-visual-wrap > .wip-visual.wip-visual--text-art {
  min-height: 340px;
}

@media (max-width: 640px) {
  .wip-visual__text-art-frame {
    padding: 22px 18px 20px;
  }

  .wip-visual__text-art-corner {
    width: 16px;
    height: 16px;
  }

  .wip-visual__text-art-corner--tl {
    top: 10px;
    left: 10px;
  }

  .wip-visual__text-art-corner--tr {
    top: 10px;
    right: 10px;
  }

  .wip-visual__text-art-corner--bl {
    bottom: 10px;
    left: 10px;
  }

  .wip-visual__text-art-corner--br {
    bottom: 10px;
    right: 10px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════
   🌙 DARK THEME — VS Code / Cursor IDE Inspired
   Eye-comfort dark mode with vibrant accent colors
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --dk-bg-deep: #1a1b2e;
  --dk-bg-body: #1e1f33;
  --dk-bg-container: #242538;
  --dk-bg-surface: #2a2b40;
  --dk-bg-elevated: #31324a;
  --dk-bg-input: #282940;
  --dk-bg-hover: #363752;
  --dk-border: #3a3b55;
  --dk-border-active: #52537a;
  --dk-text-primary: #e2e4f0;
  --dk-text-secondary: #b0b3cc;
  --dk-text-muted: #7d80a0;
  --dk-accent-blue: #7289f5;
  --dk-accent-purple: #a078e0;
  --dk-accent-cyan: #56d4cf;
  --dk-accent-green: #4ade80;
  --dk-accent-orange: #f5a623;
  --dk-accent-pink: #f472b6;
  --dk-glow-primary: rgba(114, 137, 245, 0.15);
  --dk-glow-accent: rgba(160, 120, 224, 0.12);
}

/* ─── Body & Container ─── */
body {
  background: linear-gradient(160deg, var(--dk-bg-deep) 0%, #1c1d35 40%, #201e38 100%);
  color: var(--dk-text-primary);
}

.container {
  background: var(--dk-bg-container);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(114, 137, 245, 0.04);
  border: 1px solid var(--dk-border);
}

/* ─── Header ─── */
.header {
  background: linear-gradient(135deg, #2a2b50 0%, #1e1f3a 50%, #2d2260 100%);
  border-bottom: 1px solid rgba(114, 137, 245, 0.2);
}

.header h1 {
  color: #f0f0ff;
  text-shadow: 0 0 30px rgba(114, 137, 245, 0.3);
}

.header p {
  color: var(--dk-text-secondary);
}

/* ─── Controls Area ─── */
.controls {
  background: var(--dk-bg-surface);
  border-bottom: 1px solid var(--dk-border);
}

.controls label {
  color: var(--dk-accent-blue) !important;
}

#shuffleSelect {
  background: var(--dk-bg-input) !important;
  color: var(--dk-text-primary) !important;
  border-color: var(--dk-border-active) !important;
}

#shuffleSelect option {
  background: var(--dk-bg-elevated);
  color: var(--dk-text-primary);
}

/* ─── Search Input ─── */
#searchInput {
  background: var(--dk-bg-input) !important;
  border-color: var(--dk-border-active);
  color: var(--dk-text-primary);
}

#searchInput::placeholder {
  color: var(--dk-text-muted);
}

#searchInput:focus {
  background: var(--dk-bg-elevated) !important;
  border-color: var(--dk-accent-blue);
  box-shadow: 0 0 20px rgba(114, 137, 245, 0.25), 0 0 40px rgba(114, 137, 245, 0.1);
  color: #fff;
}

#searchInput:hover {
  border-color: var(--dk-accent-blue);
  box-shadow: 0 0 10px rgba(114, 137, 245, 0.15);
}

/* ─── Search Dropdown ─── */
#searchDropdown {
  background: var(--dk-bg-elevated) !important;
  border-color: var(--dk-border-active);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(114, 137, 245, 0.08);
}

#searchDropdown::before {
  background: linear-gradient(90deg, transparent, rgba(114, 137, 245, 0.4), transparent);
}

.ghost-search-item {
  color: var(--dk-text-primary);
  border-bottom-color: var(--dk-border);
}

.ghost-search-item:hover,
.ghost-search-item.highlighted {
  background: linear-gradient(135deg, rgba(114, 137, 245, 0.15) 0%, rgba(160, 120, 224, 0.1) 100%);
  color: var(--dk-accent-blue);
}

.ghost-search-item-indicator {
  background: rgba(114, 137, 245, 0.15);
  color: var(--dk-accent-blue);
}

.ghost-search-no-results,
.ghost-search-loading {
  color: var(--dk-text-muted);
}

.ghost-search-hints {
  color: rgba(114, 137, 245, 0.4);
}

#searchDropdown::-webkit-scrollbar-track {
  background: var(--dk-bg-surface);
}

#searchDropdown::-webkit-scrollbar-thumb {
  background: rgba(114, 137, 245, 0.3);
}

/* ─── Search Results Info ─── */
.search-results-info {
  background: linear-gradient(135deg, var(--dk-bg-elevated) 0%, var(--dk-bg-surface) 100%);
  border-color: var(--dk-border);
}

.search-highlight {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.15) 0%, rgba(245, 166, 35, 0.08) 100%) !important;
  border-color: rgba(245, 166, 35, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.08) !important;
}

/* ─── General Notes Container ─── */
.general-notes-container {
  background: var(--dk-bg-surface);
  border-top: none;
}

.general-notes-textarea {
  background: var(--dk-bg-input);
  border-color: var(--dk-border);
  color: var(--dk-text-primary);
}

.general-notes-textarea::placeholder {
  color: var(--dk-text-muted);
}

.general-notes-textarea:focus {
  border-color: var(--dk-accent-blue);
  background: var(--dk-bg-elevated);
  box-shadow: 0 0 0 3px rgba(114, 137, 245, 0.1);
  color: #fff;
}

.general-notes-textarea:disabled {
  background: var(--dk-bg-deep);
  color: var(--dk-text-muted);
  border-color: var(--dk-border);
}

/* ─── Quiz Container & Question Cards ─── */
.quiz-container {
  background: var(--dk-bg-container);
}

.question {
  background: var(--dk-bg-surface);
  border-color: var(--dk-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.question:hover {
  border-color: var(--dk-accent-blue);
  box-shadow: 0 5px 20px rgba(114, 137, 245, 0.12);
}

.question.bookmarked {
  border-color: var(--dk-accent-orange);
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.06) 0%, var(--dk-bg-surface) 100%);
  box-shadow: 0 5px 15px rgba(245, 166, 35, 0.1);
}

.question-number {
  color: var(--dk-accent-blue);
}

.question-text {
  color: var(--dk-text-primary);
}

/* ─── Answer & Input Fields ─── */
.input-field {
  background: var(--dk-bg-input) !important;
  border-color: var(--dk-border) !important;
  color: var(--dk-text-primary);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.input-field:focus {
  border-color: var(--dk-accent-blue) !important;
  background: var(--dk-bg-elevated) !important;
  box-shadow: 0 0 0 3px rgba(114, 137, 245, 0.1);
  color: #fff;
}

.input-field:hover {
  border-color: var(--dk-accent-blue) !important;
}

.input-field.correct {
  background: rgba(74, 222, 128, 0.1) !important;
  border-color: var(--dk-accent-green) !important;
  color: var(--dk-accent-green);
}

.input-field.incorrect {
  background: rgba(244, 114, 182, 0.1) !important;
  border-color: var(--dk-accent-pink) !important;
  color: var(--dk-accent-pink);
}

.input-field.answer-filled {
  color: var(--dk-accent-green);
  border-color: var(--dk-accent-green) !important;
  background: rgba(74, 222, 128, 0.06) !important;
}

.answer-blank {
  color: var(--dk-text-muted);
  border-bottom-color: var(--dk-text-muted);
}

.answer-blank.answer-revealed {
  color: var(--dk-accent-green);
  border-bottom-color: var(--dk-accent-green);
  background: rgba(74, 222, 128, 0.08);
}

/* ─── Notes Container (per question) ─── */
.notes-container {
  background: linear-gradient(135deg, var(--dk-bg-elevated) 0%, var(--dk-bg-surface) 100%);
  border-color: var(--dk-border);
}

.notes-textarea {
  color: var(--dk-text-primary);
  background: transparent;
}

.notes-textarea::placeholder {
  color: var(--dk-text-muted);
}

.notes-textarea:focus {
  color: #fff;
}

/* ─── Answer Bulb ─── */
.answer-bulb {
  background: linear-gradient(135deg, var(--dk-bg-elevated) 0%, var(--dk-bg-surface) 100%);
  border-color: var(--dk-border);
}

/* ─── Height Control ─── */
.height-control-input {
  background: linear-gradient(135deg, var(--dk-bg-elevated) 0%, var(--dk-bg-surface) 100%) !important;
  border-color: var(--dk-border) !important;
  color: var(--dk-text-primary) !important;
}

.height-control-input:hover {
  border-color: var(--dk-accent-purple) !important;
}

.height-control-input:focus {
  border-color: var(--dk-accent-purple) !important;
  box-shadow: 0 0 0 3px rgba(160, 120, 224, 0.12);
}

/* ─── Progress Bar ─── */
.progress {
  background: var(--dk-bg-deep);
}

/* ─── Pagination Controls ─── */
.pagination-controls {
  background: var(--dk-bg-surface);
  border-top-color: var(--dk-border);
}

.pagination-controls.pagination-controls-top {
  border-top: none;
  border-bottom: 1px solid var(--dk-border);
}

.page-info {
  color: var(--dk-accent-blue);
}

.page-info small {
  color: var(--dk-text-muted);
}

/* ─── Bookmark Navigation ─── */
.bookmark-navigation {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.06) 0%, var(--dk-bg-surface) 100%);
  border-color: rgba(245, 166, 35, 0.35);
}

.bookmark-counter {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.12) 0%, rgba(245, 166, 35, 0.06) 100%);
  border-color: rgba(245, 166, 35, 0.3);
  color: var(--dk-accent-orange);
}

.bookmark-label {
  color: var(--dk-accent-blue);
}

/* ─── Modals (Translation, Meaning, etc.) ─── */
.modal-content {
  background-color: var(--dk-bg-elevated) !important;
  color: var(--dk-text-primary);
  border: 1px solid var(--dk-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(114, 137, 245, 0.06);
}

.modal-header {
  border-bottom-color: var(--dk-border);
}

.modal-title {
  color: var(--dk-text-primary);
}

.close-btn {
  color: var(--dk-text-muted);
}

.close-btn:hover {
  color: var(--dk-text-primary);
}

.section-header {
  border-bottom-color: var(--dk-border);
}

.section-header h3 {
  color: var(--dk-text-secondary);
}

.word-display {
  color: var(--dk-accent-blue);
}

.arabic-word {
  color: var(--dk-accent-cyan);
}

.definition {
  color: var(--dk-text-secondary);
}

.context-example {
  background: var(--dk-bg-surface);
  border-left-color: var(--dk-accent-blue);
}

.context-example h4 {
  color: var(--dk-accent-blue);
}

.context-example-container {
  border-top-color: var(--dk-border);
}

.context-header h4 {
  color: var(--dk-accent-blue);
}

/* ─── Editable Content in dark mode ─── */
[contenteditable="true"] {
  background: var(--dk-bg-input) !important;
  border-color: var(--dk-accent-blue);
  color: var(--dk-text-primary) !important;
}

[contenteditable="true"]:focus {
  background: var(--dk-bg-elevated) !important;
  border-color: var(--dk-accent-purple);
  box-shadow: 0 0 0 3px rgba(160, 120, 224, 0.12);
}

[contenteditable="true"]:hover {
  background: var(--dk-bg-elevated) !important;
  border-color: var(--dk-accent-purple);
}

/* ─── Edit Controls ─── */
.edit-controls {
  background: var(--dk-bg-surface);
  border-top-color: var(--dk-accent-blue);
}

.edit-tips {
  color: var(--dk-text-muted);
}

.ai-tips {
  color: var(--dk-accent-blue);
}

.paste-tips {
  color: var(--dk-accent-cyan);
}

/* ─── Dictionary Modal (Meaning) ─── */
.dictionary-content {
  color: var(--dk-text-primary);
}

.main-definition {
  color: var(--dk-text-primary);
}

.definition-section,
.synonyms-section,
.examples-section,
.etymology-section,
.professional-usage {
  background: var(--dk-bg-surface);
  border-left-color: var(--dk-accent-blue);
}

.definition-section h3,
.synonyms-section h3,
.examples-section h3,
.etymology-section h3,
.professional-usage h3 {
  color: var(--dk-accent-blue);
}

.example-item {
  background: var(--dk-bg-elevated);
  border-left-color: var(--dk-accent-blue);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.example-item .example-text {
  color: var(--dk-text-secondary);
}

.example-item .example-context {
  color: var(--dk-accent-blue);
}

.etymology-text {
  color: var(--dk-text-secondary);
  background: var(--dk-bg-elevated);
  border-color: var(--dk-border);
}

.usage-text {
  color: var(--dk-text-secondary);
}

.usage-highlight {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.12) 0%, rgba(245, 166, 35, 0.06) 100%);
}

/* ─── Arabic Translation Section ─── */
.arabic-translation-section {
  background: linear-gradient(135deg, var(--dk-bg-surface) 0%, rgba(86, 212, 207, 0.04) 100%);
  border-color: var(--dk-accent-cyan);
}

.arabic-translation-section .section-header h3 {
  color: var(--dk-accent-cyan);
}

.arabic-word-display {
  color: var(--dk-accent-cyan);
  background: rgba(86, 212, 207, 0.08);
}

.arabic-definition-display {
  color: var(--dk-text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border-right-color: var(--dk-accent-cyan);
}

/* ─── Meaning Modal AI buttons area ─── */
.meaning-ai-helper-buttons {
  background: linear-gradient(135deg, var(--dk-bg-surface) 0%, var(--dk-bg-elevated) 100%);
  border-color: var(--dk-border);
}

/* ─── Confirmation / Success / Error Modals ─── */
.confirmation-modal {
  background: linear-gradient(135deg, var(--dk-bg-elevated) 0%, var(--dk-bg-surface) 100%) !important;
}

.confirmation-body {
  color: var(--dk-text-primary);
}

.confirmation-message-en {
  color: var(--dk-text-primary);
}

.confirmation-message-ar {
  color: var(--dk-text-secondary);
}

.confirmation-warning {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.1) 0%, rgba(245, 166, 35, 0.05) 100%);
  border-color: rgba(245, 166, 35, 0.35);
}

.warning-message-en,
.warning-message-ar {
  color: var(--dk-accent-orange);
}

.success-details,
.error-details {
  background: linear-gradient(135deg, var(--dk-bg-surface) 0%, var(--dk-bg-elevated) 100%);
  border-color: var(--dk-border);
}

.success-details-content,
.error-details-content {
  color: var(--dk-text-secondary);
}

/* ─── AI Prompt Modal ─── */
.ai-prompt-modal-content {
  background: linear-gradient(135deg, var(--dk-bg-elevated) 0%, var(--dk-bg-surface) 100%) !important;
}

.ai-prompt-modal-body {
  color: var(--dk-text-primary);
}

.ai-prompt-controls {
  background-color: var(--dk-bg-surface);
  border-bottom-color: var(--dk-border);
}

.ai-prompt-textarea {
  background-color: var(--dk-bg-input) !important;
  border-color: var(--dk-border);
  color: var(--dk-text-primary);
}

.ai-prompt-textarea:focus {
  border-color: var(--dk-accent-blue);
  box-shadow: 0 0 0 3px rgba(114, 137, 245, 0.1);
}

.ai-prompt-question-ref {
  background-color: rgba(245, 166, 35, 0.08);
  border-top-color: var(--dk-border);
}

.ai-prompt-question-ref strong {
  color: var(--dk-accent-orange);
}

.ai-prompt-question-ref p {
  color: var(--dk-text-muted);
}

/* ─── Prompt Sections ─── */
.prompt-section {
  background: var(--dk-bg-surface);
  border-color: var(--dk-border);
}

.prompt-section:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.prompt-section-title {
  color: var(--dk-text-primary);
}

.prompt-textarea {
  background: var(--dk-bg-input);
  border-color: var(--dk-border);
  color: var(--dk-text-primary);
}

.prompt-textarea:focus {
  border-color: var(--dk-accent-purple);
  background: var(--dk-bg-elevated);
}

/* ─── Notes Summary ─── */
.notes-summary {
  background: linear-gradient(135deg, var(--dk-bg-surface) 0%, var(--dk-bg-elevated) 100%);
  border-color: var(--dk-border);
}

.notes-summary-title {
  color: var(--dk-text-primary);
}

.notes-item {
  background: var(--dk-bg-elevated);
  border-left-color: var(--dk-accent-purple);
  color: var(--dk-text-secondary);
}

.notes-item strong {
  color: var(--dk-text-primary);
}

.notes-summary-note {
  background-color: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.2);
  color: var(--dk-accent-orange);
}

/* ─── Main Prompt Controls ─── */
.main-prompt-controls {
  background-color: var(--dk-bg-surface);
  border-bottom-color: var(--dk-border);
}

/* ─── Admin Panel ─── */
.admin-pass-modal-box {
  background: var(--dk-bg-elevated);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.admin-pass-title {
  color: var(--dk-text-primary);
}

.admin-pass-subtitle {
  color: var(--dk-text-muted);
}

.admin-pass-input-wrap {
  border-color: var(--dk-accent-blue);
  background: var(--dk-bg-input);
}

.admin-pass-input-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(114, 137, 245, 0.15);
}

.admin-pass-input {
  color: var(--dk-text-primary);
}

.admin-pass-error {
  color: var(--dk-accent-pink);
}

.admin-pass-remember {
  color: var(--dk-text-muted);
}

.admin-pass-cancel {
  background: var(--dk-bg-surface);
  color: var(--dk-text-secondary);
}

.admin-pass-cancel:hover {
  background: var(--dk-bg-hover);
}

/* ─── Admin Prompt Panel ─── */
.admin-prompt-panel .word-input-section {
  background: linear-gradient(135deg, rgba(114, 137, 245, 0.06), rgba(160, 120, 224, 0.06)) !important;
  border-color: var(--dk-accent-blue) !important;
}

.admin-prompt-panel .admin-prompt-subsection {
  background: var(--dk-bg-surface) !important;
  border-width: 2px !important;
  border-style: solid !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 4px 18px rgba(0, 0, 0, 0.28) !important;
}

.admin-prompt-panel .admin-prompt-subsection--en {
  border-color: rgba(114, 137, 245, 0.65) !important;
}

.admin-prompt-panel .admin-prompt-subsection--ar {
  border-color: rgba(245, 166, 35, 0.6) !important;
}

.admin-prompt-panel .admin-prompt-subsection--img {
  border-color: rgba(74, 222, 128, 0.55) !important;
}

.admin-prompt-panel .admin-prompt-subsection--course {
  border-color: rgba(129, 140, 248, 0.65) !important;
}

.admin-prompt-panel .admin-prompt-subsection--notes {
  border-color: rgba(148, 163, 184, 0.5) !important;
}

.admin-prompt-panel .admin-section-refresh-btn {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  box-shadow: 0 3px 10px rgba(56, 189, 248, 0.35) !important;
}

.admin-prompt-panel .word-input-section label {
  color: var(--dk-accent-blue) !important;
}

.admin-prompt-panel #wordInput {
  background: var(--dk-bg-input) !important;
  border-color: var(--dk-accent-blue) !important;
  color: var(--dk-text-primary) !important;
}

/* ─── Scrollbar global ─── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dk-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(114, 137, 245, 0.25), rgba(160, 120, 224, 0.25));
  border-radius: 5px;
  border: 2px solid var(--dk-bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(114, 137, 245, 0.45), rgba(160, 120, 224, 0.45));
}

/* ─── Selection color ─── */
::selection {
  background: rgba(114, 137, 245, 0.35);
  color: #fff;
}

::-moz-selection {
  background: rgba(114, 137, 245, 0.35);
  color: #fff;
}

/* ─── Compound Words Checkbox (inline styles override) ─── */
.compound-checkbox-wrapper {
  background: linear-gradient(135deg, rgba(114, 137, 245, 0.08) 0%, rgba(160, 120, 224, 0.08) 100%) !important;
  border-color: rgba(114, 137, 245, 0.2) !important;
}

.checkbox-label {
  color: var(--dk-accent-purple) !important;
}

.dual-toggle-container {
  background: var(--dk-bg-input) !important;
  border-color: rgba(114, 137, 245, 0.15) !important;
}

/* ─── Word Prompt Generator Modal ─── */
#wordPromptModal .modal-content {
  background: var(--dk-bg-elevated) !important;
}

#wordPromptOutput {
  color: var(--dk-text-primary) !important;
  background: transparent !important;
}

#promptOutputContainer {
  background: var(--dk-bg-surface) !important;
  border-color: var(--dk-border) !important;
}

/* ─── Prompt Progress Display ─── */
#promptProgressDisplay {
  background: linear-gradient(135deg, rgba(114, 137, 245, 0.08), rgba(245, 166, 35, 0.08)) !important;
  color: var(--dk-text-muted) !important;
  border-left-color: var(--dk-accent-orange) !important;
}

/* ─── Inline style overrides for HTML elements ─── */
#wordPromptModal .modal-body ol {
  color: var(--dk-text-secondary) !important;
}

#wordPromptModal .modal-body p {
  color: var(--dk-accent-blue);
}

#wordPromptModal [style*="background: #f8f9fa"],
#wordPromptModal [style*="background:#f8f9fa"] {
  background: var(--dk-bg-surface) !important;
  border-color: var(--dk-border) !important;
}

#wordPromptModal [style*="border-left: 4px solid #667eea"] {
  border-left-color: var(--dk-accent-blue) !important;
}

/* ─── Back Home & Admin Buttons (top bar) ─── */
.back-home-btn,
.admin-panel-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.back-home-btn:hover,
.admin-panel-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* ─── Textarea & select inside dictionary controls ─── */
.controls select {
  background: var(--dk-bg-input);
  color: var(--dk-text-primary);
  border-color: var(--dk-border-active);
}

/* ─── Arabic phrase text in dark mode ─── */
.question-text-ar {
  color: var(--dk-text-secondary);
}

/* ─── Read Arabic phrase button dark mode ─── */
.read-ar-phrase-btn {
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.2);
}

/* ─── Tooltip overrides ─── */
.audio-btn::after {
  background: linear-gradient(135deg, var(--dk-bg-elevated) 0%, var(--dk-bg-surface) 100%);
  border: 1px solid var(--dk-border);
}

.audio-btn::before {
  border-top-color: var(--dk-bg-elevated);
}

/* ─── Mark/highlight in search results ─── */
.ghost-search-item mark {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.3), rgba(245, 166, 35, 0.15));
  color: var(--dk-accent-orange);
  border-radius: 3px;
  padding: 1px 3px;
}

/* ─── AI Chat container already dark-themed — ensure consistency ─── */
.ai-chat-container {
  border-color: rgba(114, 137, 245, 0.2) !important;
}

/* ─── Subtle ambient glow on main container ─── */
.container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--dk-accent-blue), 
    var(--dk-accent-purple), 
    var(--dk-accent-cyan), 
    transparent
  );
  opacity: 0.5;
  z-index: 1;
  border-radius: 20px 20px 0 0;
}

/* ─── Subtle gradient line under header ─── */
.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--dk-accent-blue), var(--dk-accent-purple), transparent);
  opacity: 0.6;
}

/* ─── Link colors ─── */
a {
  color: var(--dk-accent-blue);
}

a:hover {
  color: var(--dk-accent-purple);
}

/* â•â• AR Under Modification Modal â•â• */
.ar-mod-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}
.ar-mod-modal-overlay.active { opacity: 1; }

.ar-mod-modal {
  background: linear-gradient(160deg, #0f0c29 0%, #1a1a3e 50%, #24243e 100%);
  border: 2px solid rgba(253, 219, 146, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5), 0 0 40px rgba(209,168,39,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}
.ar-mod-modal-overlay.active .ar-mod-modal { transform: scale(1) translateY(0); }

.ar-mod-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(253,219,146,0.15) 0%, rgba(209,168,39,0.1) 100%);
  border-bottom: 1px solid rgba(253,219,146,0.15);
}

.ar-mod-modal-icon {
  font-size: 2rem;
  animation: arIconFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(253,219,146,0.4));
}
@keyframes arIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

.ar-mod-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fddb92, #d1a827);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ar-mod-modal-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fddb92, #d1a827);
  color: #4a2e00;
  margin-left: 8px;
}

.ar-mod-modal-close {
  margin-left: auto;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  width: 32px; height: 32px;
  border-radius: 10px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.ar-mod-modal-close:hover { background: rgba(255,100,100,0.2); color: #ff6b6b; border-color: rgba(255,100,100,0.3); }

.ar-mod-modal-body {
  padding: 30px 24px 20px;
}

.ar-mod-modal-emoji {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: arEmojiPulse 2s ease-in-out infinite;
}
@keyframes arEmojiPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.ar-mod-modal-text {
  color: #e2e8f0;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 8px;
}
.ar-mod-modal-text strong {
  background: linear-gradient(135deg, #fddb92, #d1a827);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ar-mod-modal-sub {
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  margin: 0;
}

.ar-mod-modal-footer {
  padding: 16px 24px 22px;
}

.ar-mod-modal-ok-btn {
  background: linear-gradient(135deg, #fddb92 0%, #d1a827 100%);
  color: #4a2e00;
  border: none;
  padding: 10px 36px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(209,168,39,0.3);
}
.ar-mod-modal-ok-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(209,168,39,0.5);
}
.ar-mod-modal-ok-btn:active {
  transform: translateY(1px);
}


/* ══ AR Prompt Modal Animations ══ */

/* Modal entrance with bounce */
.ar-prompt-modal-animated {
  animation: arModalEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes arModalEntrance {
  0% { opacity: 0; transform: scale(0.8) translateY(30px) rotateX(8deg); }
  60% { opacity: 1; transform: scale(1.02) translateY(-5px) rotateX(0deg); }
  100% { opacity: 1; transform: scale(1) translateY(0) rotateX(0deg); }
}

/* Title shimmer effect */
.ar-title-shimmer {
  background: linear-gradient(90deg, #c4b5fd, #f093fb, #fddb92, #f093fb, #c4b5fd) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  animation: arTitleShimmer 4s ease-in-out infinite !important;
}

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

/* Icon animated entrance */
.ar-icon-animated {
  animation: arIconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both, promptIconFloat 3s ease-in-out 0.8s infinite !important;
}

@keyframes arIconBounce {
  0% { opacity: 0; transform: scale(0) rotate(-30deg); }
  70% { transform: scale(1.2) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* AR language pill */
.ar-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fddb92, #d1a827);
  color: #4a2e00;
  animation: arPillPulse 2.5s ease-in-out infinite;
  box-shadow: 0 2px 10px rgba(209, 168, 39, 0.3);
}

@keyframes arPillPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(209, 168, 39, 0.3); }
  50% { box-shadow: 0 2px 20px rgba(209, 168, 39, 0.6); }
}

/* Badge glow */
.ar-badge-glow {
  animation: arBadgeGlow 3s ease-in-out infinite;
}

@keyframes arBadgeGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(102, 126, 234, 0); }
  50% { box-shadow: 0 0 15px rgba(102, 126, 234, 0.2); }
}

/* Content reveal animation */
.ar-content-reveal {
  animation: arContentReveal 0.7s ease-out 0.3s both;
}

@keyframes arContentReveal {
  0% { opacity: 0; transform: translateY(15px); clip-path: inset(0 0 100% 0); }
  100% { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
}

/* Hint fade in with slide */
.ar-hint-fade {
  animation: arHintFade 0.6s ease-out 0.6s both;
}

@keyframes arHintFade {
  0% { opacity: 0; transform: translateX(20px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* Footer buttons pop in */
.ar-btn-pop {
  animation: arBtnPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ar-btn-pop:nth-child(1) { animation-delay: 0.5s; }
.ar-btn-pop:nth-child(2) { animation-delay: 0.6s; }
.ar-btn-pop:nth-child(3) { animation-delay: 0.7s; }

@keyframes arBtnPop {
  0% { opacity: 0; transform: scale(0.5) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   🧠  BSC VISUAL WRAP — BrainScrack Center Button + Panel
   ═══════════════════════════════════════════════════════════════ */

.bsc-visual-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.bsc-visual-wrap > .wip-visual {
  flex: 1 1 auto;
}

/* ─── BrainScrack Center Button ─────────────────────────────── */
.bsc-btn {
  position: relative;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #6d28d9 100%);
  box-shadow: 0 4px 18px rgba(124,58,237,0.45), 0 2px 6px rgba(0,0,0,0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsc-btn .course-btn-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.bsc-btn .course-btn-shine {
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.25) 50%, transparent 80%);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}

.bsc-btn:hover .course-btn-shine { left: 125%; }

.bsc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(124,58,237,0.55), 0 4px 10px rgba(0,0,0,0.2);
}

.bsc-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

.bsc-btn .course-btn-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  width: 100%;
}

.bsc-btn .course-btn-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.bsc-btn .course-btn-text {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.bsc-btn .bsc-btn-chevron {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.85);
  transition: transform 0.3s ease;
  line-height: 1;
  flex-shrink: 0;
}

.bsc-btn.bsc-btn--open .bsc-btn-chevron {
  transform: rotate(180deg);
}

/* ─── BSC Dropdown Panel ─────────────────────────────────────── */
.bsc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              margin-top 0.3s ease;
  opacity: 0;
  margin-top: 0;
}

.bsc-panel.bsc-panel--open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 6px;
}

.bsc-panel__inner {
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
}

.bsc-panel__wrap {
  background: linear-gradient(160deg, #1e1b4b 0%, #2d1b69 100%);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}

.bsc-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(124,58,237,0.2);
  border-bottom: 1px solid rgba(167,139,250,0.15);
}

.bsc-panel__title {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bsc-panel__close {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.bsc-panel__close:hover {
  background: rgba(239,68,68,0.6);
  color: #fff;
}

.bsc-panel__iframe-wrap {
  position: relative;
  width: 100%;
  min-height: 660px;
}

.bsc-panel__iframe-wrap iframe {
  width: 100%;
  height: 660px;
  border: none;
  display: block;
}

.bsc-panel__loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
}

.bsc-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(167,139,250,0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: bscSpin 0.75s linear infinite;
}

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