/* =========================================================
   EDUNET v3.0 — LIME GREEN & CRISP WHITE LUXURY THEME
   ========================================================= */

:root {
  /* PALETTE: LIME GREEN & CRISP WHITE */
  --bg-main: #f8faf5;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f1f6ea;
  
  --lime-primary: #84cc16;
  --lime-bright: #a3e635;
  --lime-dark: #4d7c0f;
  --lime-deep: #3f6212;
  --lime-dim: rgba(132, 204, 22, 0.12);
  --lime-glow: rgba(132, 204, 22, 0.35);

  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.1);

  --cyan: #0284c7;
  --cyan-dim: rgba(2, 132, 199, 0.1);

  --border-light: rgba(132, 204, 22, 0.2);
  --border-card: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(132, 204, 22, 0.45);

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(77, 124, 15, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 45px rgba(77, 124, 15, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;

  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Lime Mesh & Lighting Orbs */
.mesh-bg {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(rgba(132, 204, 22, 0.06) 1px, transparent 1px),
    linear-gradient(to right, rgba(132, 204, 22, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(132, 204, 22, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.mesh-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 18s infinite alternate ease-in-out;
}

.orb-1 {
  width: 550px;
  height: 550px;
  background: #d9f99d;
  top: -120px;
  left: 15%;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: #bef264;
  bottom: 5%;
  right: 10%;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: #a7f3d0;
  top: 40%;
  left: 55%;
  animation-delay: -11s;
}

@keyframes orbFloat {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(40px, 30px); }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   TOP NAVIGATION
   ========================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
  box-shadow: 0 2px 14px rgba(77, 124, 15, 0.04);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--lime-primary), var(--lime-dark));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: 0 4px 14px var(--lime-glow);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.lime-text {
  color: var(--lime-dark);
}

.brand-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--lime-dim);
  color: var(--lime-deep);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  border: 1px solid var(--border-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--lime-primary), var(--lime-dark));
  color: #ffffff;
  box-shadow: 0 2px 14px var(--lime-glow);
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sound Toggle Button with Animated Wave */
.sound-toggle-btn {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.sound-toggle-btn:hover {
  border-color: var(--lime-primary);
  background: var(--bg-subtle);
}

.sound-toggle-btn.active {
  background: var(--lime-dim);
  border-color: var(--lime-primary);
  color: var(--lime-deep);
}

.sound-wave-icon {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.sound-wave-icon span {
  width: 3px;
  height: 6px;
  background: var(--lime-dark);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.sound-toggle-btn.active .sound-wave-icon span {
  animation: soundBounce 0.8s infinite ease-in-out alternate;
}

.sound-toggle-btn.active .sound-wave-icon span:nth-child(1) { animation-delay: 0.1s; }
.sound-toggle-btn.active .sound-wave-icon span:nth-child(2) { animation-delay: 0.3s; }
.sound-toggle-btn.active .sound-wave-icon span:nth-child(3) { animation-delay: 0.2s; }
.sound-toggle-btn.active .sound-wave-icon span:nth-child(4) { animation-delay: 0.4s; }

@keyframes soundBounce {
  0% { height: 4px; }
  100% { height: 14px; }
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 4px 14px 4px 5px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lime-primary), var(--emerald));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
}

.user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 24px;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-tab {
  background: #f8faf5;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
}

.mobile-tab.active {
  background: var(--lime-dim);
  border-color: var(--lime-primary);
  color: var(--lime-deep);
  font-weight: 700;
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
  position: relative;
  z-index: 1;
  padding: 70px 24px 45px;
  text-align: center;
}

.hero-container {
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  background: var(--lime-dim);
  border: 1px solid var(--border-light);
  color: var(--lime-deep);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime-dark);
  box-shadow: 0 0 10px var(--lime-primary);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text-main);
}

.hero-gradient-title {
  background: linear-gradient(135deg, var(--lime-dark), #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 34px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-md);
  max-width: 680px;
  margin: 0 auto 38px;
  transition: all 0.3s ease;
}

.hero-search-box:focus-within {
  border-color: var(--lime-primary);
  box-shadow: 0 12px 35px var(--lime-glow);
}

.search-icon {
  font-size: 1.1rem;
  margin-right: 10px;
  color: var(--text-muted);
}

.hero-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: var(--text-main);
}

.hero-search-box input::placeholder {
  color: var(--text-muted);
}

.search-submit-btn {
  background: linear-gradient(135deg, var(--lime-primary), var(--lime-dark));
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--lime-glow);
}

.search-submit-btn:hover {
  filter: brightness(1.06);
  transform: scale(1.02);
}

/* Metrics Ribbon */
.metrics-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--lime-deep);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 4px;
}

.metric-divider {
  width: 1px;
  height: 36px;
  background: var(--border-light);
}

/* =========================================================
   MAIN CONTENT & TABS
   ========================================================= */
.main-content-wrapper {
  position: relative;
  z-index: 1;
  padding-bottom: 90px;
}

.tab-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-view.active {
  display: block;
}

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

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-count {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--lime-dim);
  color: var(--lime-deep);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Filter Pills */
.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.filter-pill:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
  border-color: var(--lime-primary);
}

.filter-pill.active {
  background: linear-gradient(135deg, var(--lime-primary), var(--lime-dark));
  color: #ffffff;
  border-color: var(--lime-primary);
  box-shadow: 0 2px 12px var(--lime-glow);
}

/* =========================================================
   CRISP WHITE CARDS & COURSE CATALOG (TAB 1)
   ========================================================= */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.course-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.course-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.course-icon-badge {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: var(--lime-dim);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.course-meta {
  flex: 1;
  min-width: 0;
}

.course-category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lime-deep);
  display: block;
  margin-bottom: 4px;
}

.course-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
}

.course-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.course-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.course-rating {
  color: #d97706;
  font-weight: 700;
}

.btn-view-syllabus {
  background: var(--lime-dim);
  color: var(--lime-deep);
  border: 1px solid var(--border-light);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.course-card:hover .btn-view-syllabus {
  background: var(--lime-primary);
  color: #ffffff;
  box-shadow: 0 2px 12px var(--lime-glow);
}

/* =========================================================
   AI STUDY COPILOT (TAB 2)
   ========================================================= */
.copilot-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}

.badge-lime {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--lime-dim);
  color: var(--lime-deep);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.quick-prompts-section {
  margin: 18px 0;
}

.section-sub-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

.prompt-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt-chip {
  background: #f8faf5;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-chip:hover {
  background: var(--lime-dim);
  border-color: var(--lime-primary);
  color: var(--lime-deep);
  transform: translateX(3px);
}

.copilot-input-box {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copilot-input-box textarea {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  resize: none;
}

.copilot-input-box textarea:focus {
  border-color: var(--lime-primary);
  box-shadow: 0 0 0 3px var(--lime-dim);
}

.btn-lime-primary {
  background: linear-gradient(135deg, var(--lime-primary), var(--lime-dark));
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--lime-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-lime-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--lime-glow);
}

.status-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime-dark);
  box-shadow: 0 0 10px var(--lime-primary);
  display: inline-block;
  margin-right: 8px;
}

.header-with-icon {
  display: flex;
  align-items: center;
}

.copilot-body {
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.copilot-body h4 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--lime-deep);
  margin: 18px 0 8px;
}

.copilot-body pre {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #a3e635;
  overflow-x: auto;
  margin: 12px 0;
}

.copilot-body p {
  margin-bottom: 12px;
}

/* =========================================================
   CODE PLAYGROUND (TAB 3)
   ========================================================= */
.playground-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.editor-header, .terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.editor-lang-selector {
  display: flex;
  gap: 6px;
}

.lang-btn {
  background: #f8faf5;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--lime-dim);
  border-color: var(--lime-primary);
  color: var(--lime-deep);
  font-weight: 700;
}

.code-editor-wrapper textarea {
  width: 100%;
  height: 380px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #f8fafc;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}

.code-editor-wrapper textarea:focus {
  border-color: var(--lime-primary);
}

.terminal-panel {
  display: flex;
  flex-direction: column;
}

.terminal-traffic-lights {
  display: flex;
  gap: 6px;
}

.t-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.t-dot.red { background: #ef4444; }
.t-dot.yellow { background: #f59e0b; }
.t-dot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  flex: 1;
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: #38bdf8;
  line-height: 1.65;
  overflow-y: auto;
  min-height: 380px;
  white-space: pre-wrap;
}

/* =========================================================
   ALGORITHM SANDBOX (TAB 4)
   ========================================================= */
.sandbox-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.input-group input,
.input-group select {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--lime-primary);
  box-shadow: 0 0 0 3px var(--lime-dim);
}

.sandbox-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-ghost {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-ghost-sm {
  background: #f8faf5;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.btn-ghost-sm:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.complexity-box {
  background: #f8faf5;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
}

.comp-row {
  display: flex;
  justify-content: space-between;
}

.comp-row span {
  color: var(--text-muted);
}

.text-lime {
  color: var(--lime-deep) !important;
  font-weight: 700;
}

.visualizer-stage {
  min-height: 220px;
  background: #f8faf5;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.algo-element {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.algo-element.active-scan {
  border-color: var(--lime-primary);
  background: var(--lime-dim);
  color: var(--lime-deep);
  transform: scale(1.1);
  box-shadow: 0 0 18px var(--lime-glow);
}

.algo-element.found {
  border-color: var(--lime-dark);
  background: var(--lime-primary);
  color: #ffffff;
  font-weight: 900;
  transform: scale(1.18);
  box-shadow: 0 0 24px var(--lime-glow);
}

.algo-element.discarded {
  opacity: 0.28;
  transform: scale(0.9);
}

.terminal-log-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-content {
  padding: 14px;
  font-size: 0.84rem;
  color: #a3e635;
  line-height: 1.65;
  min-height: 80px;
  max-height: 140px;
  overflow-y: auto;
}

/* =========================================================
   SKILL QUIZZES (TAB 5)
   ========================================================= */
.quiz-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.quiz-badge {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--lime-dim);
  color: var(--lime-deep);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.quiz-progress-text {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.quiz-progress-bar {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lime-primary), var(--lime-dark));
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 24px;
  color: var(--text-main);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-opt-btn {
  background: #f8faf5;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-opt-btn:hover {
  background: #ffffff;
  border-color: var(--lime-primary);
  box-shadow: var(--shadow-sm);
}

.quiz-opt-btn.correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #15803d;
  font-weight: 700;
}

.quiz-opt-btn.wrong {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b91c1c;
}

.quiz-feedback {
  background: #f8faf5;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.certificate-card {
  text-align: center;
  padding: 44px;
}

.cert-ribbon {
  display: inline-block;
  background: var(--lime-dim);
  color: var(--lime-deep);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.cert-course-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--lime-deep);
  margin: 12px 0 20px;
}

.cert-score-box {
  margin-bottom: 20px;
  font-size: 1.15rem;
}

.cert-score-box strong {
  color: var(--lime-dark);
  font-size: 1.8rem;
  margin-left: 8px;
}

/* =========================================================
   CHEATSHEET VAULT (TAB 6)
   ========================================================= */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 24px;
}

.vault-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.vault-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--lime-dim);
  color: var(--lime-deep);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

.vault-pages {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.vault-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
  color: var(--text-main);
}

.vault-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.vault-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.vault-category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lime-deep);
}

.btn-vault-download {
  background: var(--lime-dim);
  border: 1px solid var(--border-light);
  color: var(--lime-deep);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-vault-download:hover {
  background: var(--lime-primary);
  color: #ffffff;
}

/* =========================================================
   MODAL & FOOTER
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 34px;
  background: #ffffff;
  border: 1.5px solid var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--lime-deep);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #f8faf5;
  border: 1px solid var(--border-light);
  padding: 14px;
  border-radius: var(--radius-md);
  margin: 18px 0;
  font-size: 0.84rem;
}

.m-meta-item span {
  color: var(--text-muted);
  display: block;
}

.m-meta-item strong {
  color: var(--text-main);
}

.syllabus-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-main);
}

.syllabus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.syllabus-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 9px 14px;
  background: #f8faf5;
  border-radius: 6px;
  border-left: 3px solid var(--lime-primary);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 18px;
}

.app-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 34px 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--lime-deep);
  font-weight: 600;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 1024px) {
  .copilot-layout, .playground-layout, .sandbox-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links, .user-pill, .hide-mobile {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .metrics-ribbon {
    gap: 16px;
  }
  .courses-grid, .vault-grid {
    grid-template-columns: 1fr;
  }
}