/* Your existing styles */
.am-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.am-card{background:#FDF8F3;padding:1.5rem;border-radius:20px;box-shadow:0 3px 8px rgba(0,0,0,.08)}
.am-card h3{font-family:Inter,sans-serif;margin-top:0}
.am-solved{background:#1675F2;color:#fff;border:none;padding:8px 14px;border-radius:999px;cursor:pointer}

/* --- Editor hardening --- */
#am-monaco,
.am-editor{
  position: relative;
  height: 480px;              /* ensure focusable area exists */
  max-width: 100%;
  z-index: 1;
}
#am-monaco .monaco-editor,
#am-monaco .monaco-editor * ,
.am-editor .monaco-editor,
.am-editor .monaco-editor * {
  pointer-events: auto !important; /* defeat accidental overlays */
}
/* --- LeetCode-like polish for problem page --- */
.single-am_problem .site-main,
.single-am_problem #primary,
.single-am_problem .content-area { max-width: 1280px; margin: 0 auto; }

/* Container + spacing */
.am-problem{max-width:1280px;margin:12px auto 48px;padding:0 12px}
.am-problem-header{margin:8px 0 10px}
.am-problem-title{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800; font-size: 28px; letter-spacing:.2px; margin: 0;
}

/* Two-panel layout similar to LeetCode */
.am-problem-body{
  display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:18px;
}
@media (max-width: 980px){ .am-problem-body{ grid-template-columns:1fr; } }

/* Left content card */
.am-left .am-pane{
  background:#0f172a0a;    /* subtle slate tint */
  border:1px solid #e5e7eb;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
}

/* Tabs like LC */
.am-tabs{ gap:10px; }
.am-tab{
  background:#eef2ff; color:#111; border:none; padding:7px 12px;
  border-radius:8px; font-weight:700; font-size:13px;
}
.am-tab.active{ background:#4338ca; color:#fff; }

/* Right editor panel */
.am-editor-bar{
  background:#0f172a; color:#fff; padding:8px; border-radius:12px; align-items:center;
  box-shadow:0 2px 8px rgba(2,6,23,.25);
}
.am-editor{ height:520px; border-radius:12px; overflow:hidden; }
.am-io{ margin-top:12px; }

/* Buttons like LC’s blue pills */
.am-btn{
  background:#4338ca; border:none; color:#fff; font-weight:700;
  padding:8px 12px; border-radius:10px; transition:filter .15s ease;
}
.am-btn:hover{ filter:brightness(1.08); }
.am-btn:active{ filter:brightness(.96); }

/* Small labels */
.am-label{ font-size:12px; color:#475569; }

/* Editorial code blocks — already dark; just tighten spacing */
.am-problem .am-ed pre{ margin:10px 0; }

/* ===== LeetCode-like layout polish ===== */
.single-am_problem .site-main,
.single-am_problem #primary,
.single-am_problem .content-area { max-width: 1280px; margin: 0 auto; }

.am-problem{max-width:1280px;margin:16px auto 56px;padding:0 16px}
.am-problem-header{margin:8px 0 12px}
.am-problem-title{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800; font-size: 32px; letter-spacing:.2px; margin:0 0 12px;
}

/* Two-panel grid (desc/editor) */
.am-problem-body{
  display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,1fr); gap:20px;
}
@media (max-width: 980px){ .am-problem-body{ grid-template-columns:1fr; } }

/* Left panel card */
.am-left .am-pane{
  background:#0f172a08; border:1px solid #e5e7eb; border-radius:14px;
  box-shadow:0 2px 8px rgba(2,6,23,.06);
}
.am-left .am-pane .am-section{ padding:18px 18px 6px; }
.am-left .am-pane .am-section + .am-section{ padding-top:0; }

/* Tabs like LC */
.am-tabs{ display:flex; align-items:center; gap:10px; margin:6px 0 12px; }
.am-tab{
  background:#eef2ff; color:#111827; border:none; padding:8px 14px;
  border-radius:10px; font-weight:700; font-size:13px; line-height:1;
  cursor:pointer; transition:filter .15s ease, transform .02s;
}
.am-tab:hover{ filter:brightness(1.04); }
.am-tab:active{ transform:translateY(1px); }
.am-tab.active{ background:#4338ca; color:#fff; }

/* Ensure nothing can re-lock tabs */
.am-tab.disabled, .am-tab[aria-disabled="true"]{
  opacity:1; pointer-events:auto; filter:none; cursor:pointer;
}

/* Right editor bar */
.am-editor-bar{
  background:#0f172a; color:#fff; padding:10px; border-radius:14px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  box-shadow:0 2px 10px rgba(2,6,23,.25);
}
.am-editor-bar select,
.am-editor-bar .am-btn{ height:36px; }

/* Editor surface */
.am-editor{
  height:560px; border-radius:14px; overflow:hidden; border:1px solid #0b1220;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}

/* IO/console area */
.am-io{ margin-top:14px; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:980px){ .am-io{ grid-template-columns:1fr; } }
.am-io .am-card{
  background:#0f172a08; border:1px solid #e5e7eb; border-radius:12px; padding:12px;
}

/* Blue pill buttons like LC */
.am-btn{
  background:#4338ca; border:none; color:#fff; font-weight:700;
  padding:8px 14px; border-radius:10px; transition:filter .15s ease;
}
.am-btn:hover{ filter:brightness(1.08); }
.am-btn:active{ filter:brightness(.96); }

/* Status pill (Solved) */
.am-solved-pill{
  display:inline-flex; align-items:center; gap:6px; font-weight:700;
  background:#16a34a; color:#fff; padding:8px 12px; border-radius:10px;
  box-shadow:0 1px 2px rgba(0,0,0,.1);
}

/* Typography & code blocks inside description/editorial */
.am-problem .am-desc p,
.am-problem .am-ed p{ color:#111827; line-height:1.6; margin:10px 0; }
.am-problem .am-ed pre{ background:#0b1220; color:#e5e7eb; }
.am-problem .am-ed code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Small labels */
.am-label{ font-size:12px; color:#475569; }
