/* ============================================
   MHC Code Editor — Main Stylesheet
   Dark theme inspired by VS Code / Catppuccin
   ============================================ */

:root {
  --bg-base:       #1e1e2e;
  --bg-mantle:     #181825;
  --bg-crust:      #11111b;
  --bg-surface0:   #313244;
  --bg-surface1:   #45475a;
  --bg-surface2:   #585b70;
  --text-main:     #cdd6f4;
  --text-sub:      #a6adc8;
  --text-muted:    #6c7086;
  --accent:        #cba6f7;
  --accent-dark:   #9a6bce;
  --green:         #a6e3a1;
  --red:           #f38ba8;
  --yellow:        #f9e2af;
  --blue:          #89b4fa;
  --teal:          #94e2d5;
  --peach:         #fab387;
  --font-ui:       'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,.45);
  --shadow-sm:     0 2px 8px rgba(0,0,0,.3);
  --transition:    0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-mantle); }
::-webkit-scrollbar-thumb { background: var(--bg-surface1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(24,24,37,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-surface0);
  height: 56px;
}
.nav-container {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 100%;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text-main);
  font-weight: 700; font-size: 1.1rem; letter-spacing: -0.3px;
}
.brand-icon { font-size: 1.4rem; }
.brand-accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-sm);
  color: var(--text-sub); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition);
}
.nav-link:hover { background: var(--bg-surface0); color: var(--text-main); }
.nav-link.active { background: var(--bg-surface0); color: var(--accent); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-sub); border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== EDITOR LAYOUT ===== */
.editor-wrapper {
  display: flex; height: 100vh; padding-top: 56px;
  overflow: hidden;
}
.editor-pane {
  width: 50%; display: flex; flex-direction: column;
  border-right: 2px solid var(--bg-surface0);
  min-width: 0;
}
.preview-pane {
  width: 50%; display: flex; flex-direction: column; min-width: 0;
}

/* ===== EDITOR TOOLBAR ===== */
.editor-toolbar {
  display: flex; align-items: center;
  background: var(--bg-mantle);
  border-bottom: 1px solid var(--bg-surface0);
  padding: 0 12px; height: 44px; gap: 4px; flex-shrink: 0;
}
.tab-btn {
  padding: 5px 14px; border-radius: var(--radius-sm);
  border: none; background: transparent;
  color: var(--text-muted); cursor: pointer;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.5px; transition: all var(--transition);
  position: relative;
}
.tab-btn::after {
  content: ''; position: absolute; bottom: -2px; left: 50%; right: 50%;
  height: 2px; border-radius: 1px; transition: all var(--transition);
}
.tab-btn.html-tab.active { color: #e06c75; }
.tab-btn.html-tab.active::after { background: #e06c75; left: 8px; right: 8px; }
.tab-btn.css-tab.active { color: #61afef; }
.tab-btn.css-tab.active::after { background: #61afef; left: 8px; right: 8px; }
.tab-btn.js-tab.active { color: #e5c07b; }
.tab-btn.js-tab.active::after { background: #e5c07b; left: 8px; right: 8px; }
.tab-btn.php-tab.active { color: #a78bfa; }
.tab-btn.php-tab.active::after { background: #a78bfa; left: 8px; right: 8px; }
.tab-btn:hover { background: var(--bg-surface0); color: var(--text-main); }
.toolbar-spacer { flex: 1; }
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: none; background: transparent;
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); font-size: 0.85rem;
}
.icon-btn:hover { background: var(--bg-surface0); color: var(--text-main); }

/* ===== CODE MIRROR PANELS ===== */
.editor-panels { flex: 1; overflow: hidden; position: relative; }
.editor-panel { display: none; height: 100%; }
.editor-panel.active { display: block; height: 100%; }
.CodeMirror {
  height: 100% !important;
  font-family: var(--font-mono) !important;
  font-size: 13.5px !important;
  line-height: 1.7 !important;
  background: var(--bg-crust) !important;
}
.CodeMirror-scroll { padding-bottom: 40px; }

/* ===== META FORM (below editor) ===== */
.meta-form {
  background: var(--bg-mantle);
  border-top: 1px solid var(--bg-surface0);
  padding: 12px 16px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  flex-shrink: 0;
}
.meta-input {
  flex: 1; min-width: 120px;
  background: var(--bg-surface0);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-ui); font-size: 0.82rem;
  padding: 7px 11px; outline: none;
  transition: border-color var(--transition);
}
.meta-input::placeholder { color: var(--text-muted); }
.meta-input:focus { border-color: var(--accent); }
.meta-input.wide { flex: 2; min-width: 160px; }

.action-btns { display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 0.83rem; font-weight: 600;
  transition: all var(--transition); white-space: nowrap;
}
.btn-run {
  background: var(--green); color: #1a2b1a;
}
.btn-run:hover { background: #8fd48a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(166,227,161,.3); }
.btn-save {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #1e1e2e;
}
.btn-save:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(203,166,247,.4); }
.btn-save:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent; color: var(--text-sub);
  border: 1px solid var(--bg-surface1);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger {
  background: var(--red); color: #2a0a12;
}
.btn-danger:hover { background: #e07080; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #5a9ee8);
  color: #11111b;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(137,180,250,.3); }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-lg { padding: 11px 28px; font-size: 0.95rem; }
.btn-load {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
}
.btn-load:hover { background: rgba(148,226,213,.12); transform: translateY(-1px); }

/* Update project button — orange/peach */
.btn-update {
  background: linear-gradient(135deg, #fab387, #f38ba8);
  color: #1e1e2e; border: none; font-weight: 700;
}
.btn-update:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(250,179,135,.4); }

/* Edit mode banner */
.edit-mode-banner {
  display: none; align-items: center; justify-content: space-between;
  background: rgba(250,179,135,.15);
  border-bottom: 2px solid rgba(250,179,135,.4);
  color: #fab387; padding: 7px 14px;
  font-size: .8rem; font-weight: 600; flex-shrink: 0;
  gap: 12px;
}
.edit-mode-banner.show { display: flex; }
.edit-mode-banner button {
  background: rgba(250,179,135,.2); border: 1px solid rgba(250,179,135,.4);
  color: #fab387; border-radius: 4px; padding: 3px 10px;
  font-size: .75rem; cursor: pointer; font-family: inherit;
  transition: background .2s;
}
.edit-mode-banner button:hover { background: rgba(250,179,135,.35); }


/* ===== PREVIEW PANE ===== */
.preview-toolbar {
  background: var(--bg-mantle);
  border-bottom: 1px solid var(--bg-surface0);
  padding: 0 14px; height: 44px;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.preview-title {
  font-size: 0.8rem; color: var(--text-muted);
  font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase;
}
.preview-dots { display: flex; gap: 6px; margin-right: 4px; }
.dot {
  width: 11px; height: 11px; border-radius: 50%;
}
.dot-red   { background: #ff5f57; }
.dot-yellow{ background: #ffbd2e; }
.dot-green { background: #28c941; }
#preview-frame {
  flex: 1; border: none; background: #fff;
  width: 100%;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-mantle);
  border: 1px solid var(--bg-surface0);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  max-width: 480px; width: 90%;
  transform: translateY(20px) scale(.97);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--shadow);
  text-align: center;
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-icon { font-size: 3.5rem; margin-bottom: 12px; display: block; }
.modal h2 { font-size: 1.4rem; margin-bottom: 6px; }
.modal p { color: var(--text-sub); font-size: 0.9rem; margin-bottom: 20px; }
.url-box {
  background: var(--bg-surface0);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px; text-align: left;
}
.url-box a {
  flex: 1; color: var(--blue); font-size: 0.82rem;
  word-break: break-all; text-decoration: none; font-family: var(--font-mono);
}
.url-box a:hover { text-decoration: underline; }
.copy-btn {
  background: var(--bg-surface1); border: none; border-radius: var(--radius-sm);
  color: var(--text-sub); padding: 6px 12px; cursor: pointer;
  font-size: 0.78rem; font-family: var(--font-ui); font-weight: 600;
  transition: all var(--transition); white-space: nowrap;
}
.copy-btn:hover { background: var(--accent); color: var(--bg-base); }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* confetti canvas */
#confetti-canvas {
  position: fixed; inset: 0; z-index: 1999;
  pointer-events: none;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 3000; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface0);
  border: 1px solid var(--bg-surface1);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  min-width: 260px; max-width: 380px;
  box-shadow: var(--shadow);
  transform: translateX(120%); opacity: 0;
  transition: all 0.35s cubic-bezier(.34,1.56,.64,1);
  font-size: 0.875rem;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--blue); }
.toast-warning { border-left: 3px solid var(--yellow); }
.toast-icon { font-size: 1.1rem; }
.toast-msg { flex: 1; }

/* ===== SPINNER ===== */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(30,30,46,.4);
  border-top-color: var(--bg-base);
  border-radius: 50%;
  animation: spin .6s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== DASHBOARD ===== */
.page-wrapper { max-width: 1300px; margin: 0 auto; padding: 80px 24px 40px; }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 32px;
}
.page-header h1 { font-size: 1.9rem; font-weight: 700; }
.page-header h1 span { color: var(--accent); }
.page-subtitle { color: var(--text-sub); font-size: 0.9rem; margin-top: 4px; }

/* Search + filter bar */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px;
}
.search-box {
  flex: 1; min-width: 200px;
  background: var(--bg-surface0);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--text-main); font-family: var(--font-ui); font-size: 0.875rem;
  padding: 9px 14px; outline: none; transition: border-color var(--transition);
}
.search-box::placeholder { color: var(--text-muted); }
.search-box:focus { border-color: var(--accent); }
.filter-select {
  background: var(--bg-surface0); border: 1px solid transparent;
  border-radius: var(--radius-sm); color: var(--text-main);
  font-family: var(--font-ui); font-size: 0.875rem;
  padding: 9px 14px; outline: none; cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--accent); }

/* Stats bar */
.stats-bar {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-mantle);
  border: 1px solid var(--bg-surface0);
  border-radius: var(--radius-md);
  padding: 16px 24px; flex: 1; min-width: 140px;
  display: flex; align-items: center; gap: 14px;
}
.stat-icon { font-size: 1.8rem; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-main); line-height: 1; }

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px; margin-bottom: 32px;
}
.project-card {
  background: var(--bg-mantle);
  border: 1px solid var(--bg-surface0);
  border-radius: var(--radius-md);
  overflow: hidden; transition: all var(--transition);
  display: flex; flex-direction: column;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(203,166,247,.15);
}
.card-preview {
  height: 140px; background: var(--bg-surface0);
  overflow: hidden; position: relative;
}
.card-preview iframe {
  width: 200%; height: 200%;
  transform: scale(.5); transform-origin: top left;
  border: none; pointer-events: none;
}
.card-preview-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--bg-mantle));
}
.card-body { padding: 16px; flex: 1; }
.card-title { font-size: 0.97rem; font-weight: 600; margin-bottom: 6px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px; font-size: 0.72rem; font-weight: 500;
}
.badge-student { background: rgba(203,166,247,.15); color: var(--accent); }
.badge-class   { background: rgba(137,180,250,.15); color: var(--blue); }
.badge-views   { background: rgba(166,227,161,.15); color: var(--green); }
.badge-date    { background: rgba(90,90,120,.25); color: var(--text-sub); }
.card-actions { padding: 12px 16px; border-top: 1px solid var(--bg-surface0); display: flex; gap: 8px; }

/* Pagination */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 6px;
}
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--bg-surface1); background: var(--bg-mantle);
  color: var(--text-sub); cursor: pointer; font-family: var(--font-ui);
  font-size: 0.85rem; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: var(--bg-base); border-color: var(--accent); font-weight: 700; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Empty state */
.empty-state {
  text-align: center; padding: 80px 20px; color: var(--text-muted);
}
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1.2rem; color: var(--text-sub); margin-bottom: 8px; }

/* ===== VIEW PAGE ===== */
.view-container { max-width: 1100px; margin: 0 auto; padding: 80px 24px 40px; }
.view-header {
  background: var(--bg-mantle); border: 1px solid var(--bg-surface0);
  border-radius: var(--radius-lg); padding: 28px 32px; margin-bottom: 24px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start;
}
.view-title-area { flex: 1; min-width: 200px; }
.view-title { font-size: 1.7rem; font-weight: 700; margin-bottom: 10px; }
.view-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.view-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.public-url-bar {
  background: var(--bg-surface0); border-radius: var(--radius-sm);
  padding: 10px 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.public-url-bar span { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.public-url-bar a { flex: 1; color: var(--blue); font-size: 0.82rem; word-break: break-all; font-family: var(--font-mono); text-decoration: none; }
.public-url-bar a:hover { text-decoration: underline; }

.preview-embed {
  background: var(--bg-mantle); border: 1px solid var(--bg-surface0);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px;
}
.preview-embed-header {
  padding: 12px 18px; border-bottom: 1px solid var(--bg-surface0);
  display: flex; align-items: center; gap: 10px;
}
.preview-embed iframe { width: 100%; height: 500px; border: none; background: #fff; display: block; }

/* Source accordion */
.accordion {
  background: var(--bg-mantle); border: 1px solid var(--bg-surface0);
  border-radius: var(--radius-lg); overflow: hidden;
}
.accordion-header {
  padding: 14px 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 0.9rem;
  border-bottom: 1px solid transparent; transition: all var(--transition);
  user-select: none;
}
.accordion-header:hover { background: var(--bg-surface0); }
.accordion-header.open { border-bottom-color: var(--bg-surface0); }
.accordion-chevron { transition: transform var(--transition); font-size: 0.75rem; }
.accordion-header.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body { display: none; }
.accordion-body.open { display: block; }
.source-block { margin: 0; }
.source-tab-bar {
  display: flex; border-bottom: 1px solid var(--bg-surface0); padding: 0 12px;
  background: var(--bg-crust);
}
.source-tab {
  padding: 8px 14px; border: none; background: transparent;
  cursor: pointer; font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted); transition: color var(--transition);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.source-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.source-pane { display: none; }
.source-pane.active { display: block; }
.source-pane pre {
  background: var(--bg-crust); margin: 0;
  padding: 20px; font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text-sub); overflow-x: auto; max-height: 340px;
  line-height: 1.7; tab-size: 2;
}

/* ===== LOADING OVERLAY ===== */
.loading-bar {
  position: fixed; top: 56px; left: 0; right: 0; height: 3px; z-index: 999;
  background: transparent;
}
.loading-bar.active {
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--green));
  animation: loading-anim 1.2s ease infinite;
}
@keyframes loading-anim {
  0%   { transform: scaleX(0); transform-origin: left; }
  50%  { transform: scaleX(0.7); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; opacity: 0; }
}

/* ===== RESIZER (drag split) ===== */
.resizer {
  width: 4px; background: var(--bg-surface0); cursor: col-resize; flex-shrink: 0;
  transition: background var(--transition); position: relative;
}
.resizer:hover, .resizer.dragging { background: var(--accent); }

/* ===== MODE SWITCHER (Web vs PHP) ===== */
.mode-switcher {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-crust);
  border-bottom: 2px solid var(--bg-surface0);
  padding: 6px 12px; flex-shrink: 0;
}
.mode-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent;
  color: var(--text-muted); cursor: pointer;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600;
  transition: all var(--transition); letter-spacing: 0.2px;
}
.mode-btn:hover { background: var(--bg-surface0); color: var(--text-main); }
.mode-btn.active {
  background: var(--bg-surface0);
  color: var(--text-main);
  border-color: var(--bg-surface1);
}
.mode-btn[data-mode="web"].active  { color: var(--blue); border-color: var(--blue); }
.mode-btn[data-mode="php"].active  { color: #a78bfa; border-color: #a78bfa; }
.mode-divider {
  width: 1px; height: 20px;
  background: var(--bg-surface1); margin: 0 8px; flex-shrink: 0;
}

/* ===== PHP TOOLBAR ===== */
.php-toolbar { background: rgba(167,139,250,.07) !important; }
.php-toolbar-label {
  display: flex; align-items: center; gap: 6px;
  color: #a78bfa; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.3px;
}
.php-hint {
  font-size: 0.72rem; color: var(--text-muted);
  margin-left: 12px;
}
.php-hint kbd {
  background: var(--bg-surface0); border: 1px solid var(--bg-surface1);
  border-radius: 3px; padding: 1px 5px; font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--text-sub);
}

/* ===== RESPONSIVE ===== */


@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: var(--bg-mantle); border-bottom: 1px solid var(--bg-surface0);
    flex-direction: column; padding: 10px 16px; gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; }

  .editor-wrapper { flex-direction: column; height: auto; overflow: auto; }
  .editor-pane, .preview-pane { width: 100%; }
  .editor-pane { height: 60vh; }
  .preview-pane { height: 50vh; }
  .resizer { display: none; }
  .meta-form { flex-direction: column; }
  .action-btns { width: 100%; }
  .btn { flex: 1; justify-content: center; }

  .cards-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .view-header { flex-direction: column; }
}
