/* Custom styling for outer educational workbench wrapper */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;
}

body {
  font-family: var(--font-sans);
  background-color: #0f172a;
  color: #f8fafc;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Viewport resizer container styling */
.simulator-frame {
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  border: 2px solid #334155;
  position: relative;
  margin: 0 auto;
}

/* Resize drag handle */
.resize-handle {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 60px;
  background: #3b82f6;
  border-radius: 6px;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  z-index: 40;
  transition: background-color 0.2s, transform 0.1s;
}
.resize-handle:hover {
  background: #2563eb;
  transform: translateY(-50%) scale(1.1);
}
.resize-handle::after {
  content: '║';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Viewport Ruler Marks */
.ruler-container {
  position: relative;
  height: 28px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  user-select: none;
}
.ruler-mark {
  position: absolute;
  bottom: 0;
  border-left: 1px solid #475569;
  height: 8px;
  font-size: 10px;
  color: #94a3b8;
  padding-left: 3px;
}
.ruler-mark.major {
  height: 16px;
  border-left-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}

/* Code highlight span */
.code-token-class {
  color: #38bdf8;
  font-weight: 600;
}
.code-token-resp {
  color: #f43f5e;
  font-weight: 700;
  background: rgba(244, 63, 94, 0.15);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Active status pulse animation */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.active-bp-pulse {
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Code Editor Textarea */
.sandbox-textarea {
  font-family: var(--font-mono);
  tab-size: 2;
  white-space: pre;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-msg {
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Quiz option card hover & active state */
.quiz-opt-btn {
  transition: all 0.2s ease-in-out;
}
.quiz-opt-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.08);
}
.quiz-opt-btn.correct {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}
.quiz-opt-btn.incorrect {
  border-color: #f43f5e !important;
  background-color: rgba(244, 63, 94, 0.15) !important;
  color: #fb7185 !important;
}
