/* ============================================================
   unit1.css - Java Study Notes Styles
   ============================================================ */

:root {
  --primary-color: #2563eb;
  --secondary-color: #3b82f6;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --sidebar-width: 280px;
  --nav-height: 60px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

body.dark-mode {
  --primary-color: #60a5fa;
  --secondary-color: #3b82f6;
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  z-index: 50;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
}
.brand-icon { font-size: 1.5rem; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.staff-badge {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}
.download-btn {
  background: var(--primary-color);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.download-btn:hover {
  opacity: 0.9;
}
.theme-btn {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
}
.theme-btn:hover { background: var(--bg-color); }
.theme-btn svg { width: 20px; height: 20px; }

/* Layout */
.layout-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: var(--nav-height);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: var(--nav-height);
  bottom: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  background: var(--surface-color);
  padding: 2rem 1.5rem;
}
.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 700;
}
.nav-list { list-style: none; }
.nav-list li { margin-bottom: 0.25rem; }
.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.nav-link:hover { background: var(--bg-color); color: var(--primary-color); }
.nav-link.active { background: rgba(37, 99, 235, 0.1); color: var(--primary-color); font-weight: 600; }
.separator { height: 1px; background: var(--border-color); margin: 1rem 0; }
.practical-link { font-weight: 600; color: #10b981; }

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 3rem 4rem;
  max-width: 900px;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.topic-section {
  margin-bottom: 4rem;
  scroll-margin-top: calc(var(--nav-height) + 2rem);
}
.topic-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}
.topic-section h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}
.topic-section p { margin-bottom: 1rem; font-size: 1.05rem; }

/* OOP Diagram */
.oop-diagram {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-sm);
}
.diagram-center {
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  text-align: center;
}
.diagram-branches {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}
.branch {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: transform 0.2s;
}
.branch:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}
.branch-icon { font-size: 1.25rem; }

/* Components */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.grid-cards.three-cols { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-icon { font-size: 2rem; margin-bottom: 1rem; }
.card h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; color: var(--text-muted); margin: 0; }

.bullet-list {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.bullet-list li { margin-bottom: 0.5rem; font-size: 1.05rem; }

/* Architecture Box */
.architecture-box { margin: 2rem 0; }
.box {
  padding: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  margin-top: 1rem;
}
.box h4 { margin-bottom: 0.5rem; }
.box p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }

/* Tables */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--surface-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.styled-table th, .styled-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}
.styled-table th { background: rgba(0,0,0,0.03); font-weight: 600; }
body.dark-mode .styled-table th { background: rgba(255,255,255,0.05); }

/* Code Blocks */
.code-block {
  background: #1e1e1e;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #2d2d2d;
  color: #a3a3a3;
  font-size: 0.875rem;
  font-family: var(--font-main);
}
.copy-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  transition: 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }
pre {
  padding: 1.5rem;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-code);
  font-size: 0.9rem;
  color: #d4d4d4;
  line-height: 1.5;
}

/* Syntax Highlighting overrides */
.kw { color: #569cd6; font-weight: bold; } /* keyword */
.cn { color: #4ec9b0; } /* class name */
.str { color: #ce9178; } /* string */
.num { color: #b5cea8; } /* number */
.cmt { color: #6a9955; font-style: italic; } /* comment */

code:not(pre code) {
  background: rgba(128,128,128,0.15);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: var(--font-code);
  font-size: 0.9em;
  color: var(--primary-color);
}

.note {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: 1rem;
}

/* Practicals Section */
.practical-section {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.practical-title { color: var(--primary-color); }
.section-divider { border: none; height: 1px; background: var(--border-color); margin: 4rem 0; }

.page-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

@media (max-width: 1024px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 2rem; }
  .grid-cards, .grid-cards.three-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   Interactive Student View & Quiz Styles
   ============================================================ */

/* Navbar Button */
.student-mode-btn {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white !important;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.student-mode-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}
body.student-view-active .student-mode-btn {
  background: #10b981; /* Green when active */
}

/* Buzzwords Grid */
.buzzwords-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  perspective: 1200px;
}

.buzzword-card {
  height: 320px;
  cursor: pointer;
  position: relative;
}

.buzzword-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.buzzword-card.flipped .buzzword-card-inner {
  transform: rotateY(180deg);
}

.buzzword-front, .buzzword-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-color);
}

.buzzword-front {
  background: linear-gradient(145deg, var(--surface-color), var(--bg-color));
}

.buzzword-back {
  transform: rotateY(180deg);
  background: var(--surface-color);
  justify-content: flex-start;
  text-align: left;
  overflow-y: auto;
}

.buzzword-icon {
  font-size: 3rem;
  margin-top: 1rem;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

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

.buzzword-front h4, .buzzword-back h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.5rem 0;
  color: var(--primary-color);
}

.buzzword-front p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 2rem;
}

.buzzword-back p {
  font-size: 0.875rem;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.click-prompt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Quizzes & Mini Quizzes */
.mini-quiz {
  width: 100%;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.75rem;
  margin-top: auto;
}

.quiz-q {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem !important;
  color: var(--text-main);
}

.quiz-opt {
  display: block;
  width: 100%;
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-main);
}

.quiz-opt:hover {
  background: rgba(37, 99, 235, 0.05);
  border-color: var(--secondary-color);
}

.quiz-opt.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #047857 !important;
  font-weight: 600;
}

.quiz-opt.incorrect {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}

.quiz-feedback {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.25rem;
  min-height: 1rem;
}

/* Trace Action Buttons inside Code Headers */
.code-actions {
  display: flex;
  align-items: center;
}

.trace-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 0.75rem;
}
.trace-btn:hover {
  background: var(--primary-color);
  color: white;
}
.trace-btn.active {
  background: #f59e0b;
  border-color: #d97706;
  color: white;
}

/* Trace Visualizer Layout */
.trace-container {
  background: #111827; /* Deep Charcoal Dark background */
  border: 1px solid #374151;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 1.5rem;
  margin-top: -1.5rem; /* Join with code block */
  margin-bottom: 2rem;
  color: #f3f4f6;
  font-family: system-ui, -apple-system, sans-serif;
  animation: slideDown 0.3s ease-out;
}

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

.trace-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #374151;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.trace-controls button {
  background: #374151;
  border: 1px solid #4b5563;
  color: #f3f4f6;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.trace-controls button:hover {
  background: #4b5563;
}

.trace-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.trace-step-info {
  margin-left: auto;
  font-size: 0.8rem;
  color: #9ca3af;
  font-weight: 500;
}

.trace-explanation {
  background: #1f2937;
  border-left: 3px solid #f59e0b;
  padding: 0.75rem 1rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.trace-workspace {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .trace-workspace {
    grid-template-columns: 1fr;
  }
}

.trace-code-view {
  background: #1f2937;
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid #374151;
}

.trace-code-view pre {
  margin: 0;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
}

.trace-code-line {
  display: block;
  padding: 0.05rem 0.5rem;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.trace-code-line.active {
  background: rgba(245, 158, 11, 0.25);
  border-left: 3px solid #f59e0b;
  font-weight: 600;
}

/* Trace Memory Visualization */
.trace-memory-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trace-memory-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  height: 250px;
}

.memory-col {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.memory-col h5 {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #374151;
  padding-bottom: 0.25rem;
  text-align: center;
}

.stack-frame {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.4);
  border-radius: 4px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}

.stack-frame-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.variable-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0.15rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.variable-name {
  color: #f3f4f6;
  font-family: 'Fira Code', monospace;
}

.variable-val {
  color: #a3e635;
  font-family: 'Fira Code', monospace;
}

.heap-object {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.object-header {
  font-size: 0.7rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 0.25rem;
}

/* Static Metaspace Representation */
.metaspace-area {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
}
.metaspace-area h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

/* Console View */
.trace-console-view {
    background: #000;
    border: 1px solid #374151;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    min-height: 150px;
    height: auto;
    max-height: 300px;
    overflow-y: auto;
}

.trace-console-view h5 {
  font-size: 0.7rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-family: system-ui, sans-serif;
  border-bottom: 1px solid #111827;
  padding-bottom: 0.25rem;
}

.console-output {
  color: #a3e635; /* Green output */
  white-space: pre-wrap;
  margin: 0;
}

/* General Interactive Mode Overlay Indicators */
body.student-view-active .buzzword-accordion-item {
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}
body.student-view-active .code-block {
  border: 2px solid rgba(245, 158, 11, 0.4);
}

/* ============================================================
   Buzzwords Accordion Styles
   ============================================================ */
.buzzwords-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0;
}

.buzzword-accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.buzzword-accordion-item:hover {
  border-color: var(--secondary-color);
}

.buzzword-accordion-item.active {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.buzzword-accordion-header {
  width: 100%;
  padding: 1.15rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.buzzword-accordion-header:hover {
  background-color: rgba(37, 99, 235, 0.03);
  color: var(--primary-color);
}

.buzzword-accordion-item.active .buzzword-accordion-header {
  background-color: rgba(37, 99, 235, 0.05);
  color: var(--primary-color);
}

.accordion-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.buzzword-accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.buzzword-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  padding: 0 1.5rem;
  background: var(--surface-color);
}

.buzzword-accordion-item.active .buzzword-accordion-content {
  padding: 1.25rem 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.buzzword-accordion-content p {
  font-size: 0.975rem;
  line-height: 1.55;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.buzzword-accordion-content p:last-child {
  margin-bottom: 0;
}

.buzzword-accordion-content ul {
  margin-top: 0.5rem;
  margin-bottom: 0.85rem;
}

.buzzword-accordion-content li {
  font-size: 0.925rem;
  line-height: 1.5;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}


/* Student Examples Styles */
.student-example { background-color: #f8fafc; border-left: 4px solid #3b82f6; padding: 15px; margin-top: 20px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.student-example h4 { color: #1e40af; margin-top: 0; margin-bottom: 10px; font-size: 1.1rem; }
.student-example p { margin-bottom: 15px; color: #334155; }

.run-java-btn {
    background-color: #22c55e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 10px;
    display: inline-block;
}
.run-java-btn:hover {
    background-color: #16a34a;
}
.run-java-btn:disabled {
    background-color: #86efac;
    cursor: not-allowed;
}
.output-terminal {
    background-color: #1e293b;
    color: #a3e635;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    margin-top: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    overflow-x: auto;
}
.student-example pre {
    margin-bottom: 0;
}
.student-example code[contenteditable="true"] {
    cursor: text;
}
.student-example code[contenteditable="true"]:focus {
    background-color: #f1f5f9;
}

.student-example pre code {
    /* Color removed to allow default light text on black frame */
    font-weight: 500;
}

/* Advantage & Use Case Box */
.advantage-box {
    background-color: rgba(16, 185, 129, 0.05);
    border-left: 4px solid #10b981;
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.dark-mode .advantage-box {
    background-color: rgba(16, 185, 129, 0.1);
}

.advantage-box h4 {
    color: #10b981;
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.advantage-box ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.advantage-box li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
