:root{
  --ide-shell-bg:#070a10;
  --ide-drawer:#0c111a;
  --ide-drawer-2:#101722;
  --ide-line:#1d2735;
  --ide-soft:#151e2a;
  --ide-cyan:#38bdf8;
  --ide-accent:#7dd3fc;
  --ide-indigo:#818cf8;
  --ide-text:#eef4fb;
  --ide-muted:#8b98aa;
  --ide-dim:#5f6c7e;
  --ide-green:#4ade80;
  --ide-amber:#fbbf24;
  --ide-red:#fb7185;
}

.hdlforge-ide-active{
  overflow:hidden;
  background:
    radial-gradient(circle at 70% -10%,rgba(99,102,241,.12),transparent 34%),
    radial-gradient(circle at 15% 10%,rgba(56,189,248,.07),transparent 28%),
    var(--ide-shell-bg);
}
.hdlforge-ide-active>.app>.nav{display:none}
.hdlforge-ide-active>.app>.layout,
.hdlforge-ide-active>.app>.layout>.main{
  height:100vh;
  min-height:0;
  max-width:none;
  width:100%;
  padding:0;
  margin:0;
}
.hdlforge-ide-active .ide-page{
  height:100vh;
  padding:8px;
  background:transparent;
}

.hdlforge-ide-active,
.hdlforge-ide-active *{
  scrollbar-width:thin;
  scrollbar-color:#405066 #0c111a;
}
.hdlforge-ide-active *::-webkit-scrollbar{width:9px;height:9px}
.hdlforge-ide-active *::-webkit-scrollbar-track{background:#0c111a}
.hdlforge-ide-active *::-webkit-scrollbar-thumb{
  background:#405066;
  border:2px solid #0c111a;
  border-radius:999px;
}
.hdlforge-ide-active *::-webkit-scrollbar-thumb:hover{background:#536174}

.hdlforge-ide-active .ide-topbar{
  position:relative!important;
  height:62px;
  min-height:62px;
  flex-basis:62px;
  gap:12px;
  padding:0 16px;
  margin-bottom:8px;
  border:1px solid var(--ide-line);
  border-radius:14px;
  background:rgba(12,17,26,.96);
  box-shadow:0 12px 36px rgba(0,0,0,.18);
  backdrop-filter:blur(14px);
}

/* One clean HDLForge wordmark: the old HDL badge caused HDLHDLForge. */
.hdlforge-ide-active .ide-brand-icon{display:none!important}
.hdlforge-ide-active .ide-brand{
  gap:0!important;
  padding:7px 5px!important;
}
.hdlforge-ide-active .ide-brand strong{
  font-size:19px;
  font-weight:800;
  letter-spacing:-.035em;
  background:linear-gradient(100deg,#a5f3fc,#818cf8);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent!important;
}

.ide-topbar-problems{
  height:36px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 11px;
  border:1px solid #253144;
  border-radius:9px;
  background:#0c121b;
  color:#cdd7e4;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  transition:.15s;
  flex:0 0 auto;
}
.ide-topbar-problems:hover,
.ide-topbar-problems.active{
  background:rgba(148,163,184,.08);
  border-color:#3a485c;
  color:#fff;
}
.ide-topbar-problems-icon{color:#7dd3fc;font-size:14px;line-height:1}
.ide-topbar-problems-count{
  color:#667488;
  font:9px ui-monospace,SFMono-Regular,Consolas,monospace;
}

.hdlforge-ide-active .ide-problem-navigation{
  border-color:#273447;
  background:#0c121b;
}
.hdlforge-ide-active .ide-problem-navigation button:hover:not(:disabled){
  background:rgba(148,163,184,.08);
}
.hdlforge-ide-active .ide-actions .primary{
  background:linear-gradient(135deg,#0ea5e9,#6366f1);
  color:#fff;
  box-shadow:0 8px 26px rgba(59,130,246,.18);
}
.hdlforge-ide-active .solve-status{
  border-color:#273344;
  background:rgba(148,163,184,.055);
  color:#8b98aa;
}
.hdlforge-ide-active .solve-status.passed{
  color:#4ade80;
  border-color:rgba(74,222,128,.25);
  background:rgba(34,197,94,.07);
}

/* NeetCode-style split: two separate curved cards with a dark gutter. */
.hdlforge-ide-active .ide-body{
  border:0!important;
  border-radius:0!important;
  gap:8px;
  background:transparent!important;
  overflow:visible!important;
}
.hdlforge-ide-active .ide-problem,
.hdlforge-ide-active .ide-workspace{
  border:1px solid var(--ide-line);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 18px 50px rgba(0,0,0,.16);
}
.hdlforge-ide-active .ide-problem{
  border-right:1px solid var(--ide-line);
  background:#0c111a;
}
.hdlforge-ide-active .ide-workspace{
  background:#080d14;
}
.hdlforge-ide-active .ide-problem>.problem-tabs{
  height:46px;
  flex-basis:46px;
  padding:0 13px;
  border-radius:13px 13px 0 0;
  background:#0d141d;
}
.hdlforge-ide-active .ide-problem>.problem-tabs button.active{
  color:#e9f6ff;
  background:#132232;
  border-color:#203a50;
  box-shadow:inset 0 -2px 0 #38bdf8;
}
.hdlforge-ide-active .ide-problem-content{
  padding:0 24px 32px;
  scrollbar-gutter:stable;
}
.hdlforge-ide-active .file-tabs{
  height:44px;
  flex-basis:44px;
  border-radius:13px 13px 0 0;
  background:#0a1018;
}
.hdlforge-ide-active .file-tab.active{
  box-shadow:inset 0 -2px 0 #38bdf8;
}
.hdlforge-ide-active .editor-shell,
.hdlforge-ide-active .editor-wrap,
.hdlforge-ide-active .editor-stage,
.hdlforge-ide-active .ide-editor{
  background:#080d14;
}
.hdlforge-ide-active .editor-toolbar,
.hdlforge-ide-active .editor-gutter,
.hdlforge-ide-active .ide-bottom,
.hdlforge-ide-active .console{
  background:#090f17;
}

/* Shorter console by default so the editor owns more vertical space. */
.hdlforge-ide-active .ide-bottom{
  flex:0 0 188px;
  height:188px;
  min-height:120px;
  max-height:45%;
  border-radius:0 0 13px 13px;
}
.hdlforge-ide-active .ide-bottom.collapsed{
  flex-basis:34px;
  height:34px;
  min-height:34px;
  max-height:34px;
}
.hdlforge-ide-active .bottom-tabs button.active{
  border-bottom-color:#38bdf8;
}

/* Keep the resize target but remove the full-height bright separator. */
.hdlforge-ide-active .ide-panel-resizer{
  width:12px;
  z-index:3;
  background:transparent;
  border:0;
}
.hdlforge-ide-active .ide-panel-resizer::before{
  top:50%;
  bottom:auto;
  left:4px;
  width:4px;
  height:48px;
  transform:translateY(-50%);
  border-radius:999px;
  background:#405066;
  opacity:.72;
}
.hdlforge-ide-active .ide-panel-resizer:hover::before,
.hdlforge-ide-active .ide-panel-resizer.dragging::before{
  left:4px;
  width:4px;
  background:#7dd3fc;
  opacity:1;
}
.hdlforge-ide-active .ide-panel-resizer span{display:none}

/* Drawer now opens from the top-bar Problems button. */
.ide-drawer-backdrop{
  display:block;
  position:fixed;
  z-index:124;
  inset:0;
  border:0;
  background:rgba(2,6,11,.42);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:.18s;
  cursor:default;
}
.ide-drawer-backdrop.open{opacity:1;visibility:visible;pointer-events:auto}
.ide-problem-drawer{
  position:fixed;
  z-index:130;
  left:16px;
  top:78px;
  bottom:16px;
  width:min(360px,calc(100vw - 32px));
  display:flex;
  flex-direction:column;
  border:1px solid #253144;
  border-radius:14px;
  background:linear-gradient(180deg,#0c111a,#090f17);
  box-shadow:0 28px 80px rgba(0,0,0,.54);
  transform:translateX(-18px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:transform .18s ease,opacity .18s ease,visibility .18s ease;
  overflow:hidden;
}
.ide-problem-drawer.open{
  transform:translateX(0);
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.ide-drawer-header{
  height:62px;
  flex:0 0 62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px 0 16px;
  border-bottom:1px solid var(--ide-line);
  background:#0d151f;
}
.ide-drawer-header>div{display:flex;flex-direction:column;gap:3px}
.ide-drawer-eyebrow{
  font-size:8px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#67d5ff;
}
.ide-drawer-header strong{font-size:15px;color:var(--ide-text)}
.ide-drawer-close{
  width:29px;
  height:29px;
  border:1px solid var(--ide-line);
  border-radius:8px;
  background:#0a1018;
  color:#8292a6;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
.ide-drawer-close:hover{color:#fff;border-color:#33455b}
.ide-drawer-search{
  flex:0 0 42px;
  height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  margin:10px 10px 6px;
  padding:0 11px;
  border:1px solid #253144;
  border-radius:10px;
  background:#080e15;
  color:#66788e;
}
.ide-drawer-search:focus-within{
  border-color:#3b82f6;
  box-shadow:0 0 0 3px rgba(59,130,246,.09);
}
.ide-drawer-search input{
  flex:1;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:#dce8f3;
  font-size:11px;
}
.ide-drawer-search input::placeholder{color:#5f7186}
.ide-drawer-groups{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:4px 8px 12px;
}
.ide-drawer-group{margin-top:9px}
.ide-drawer-group-title{
  height:28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 8px;
  color:#8394a8;
  font-size:9px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.ide-drawer-group-title em{
  font-style:normal;
  color:#56687d;
  font:8px ui-monospace,SFMono-Regular,Consolas,monospace;
}
.ide-drawer-list{display:flex;flex-direction:column;gap:3px}
.ide-drawer-problem{
  width:100%;
  min-height:48px;
  display:grid;
  grid-template-columns:22px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  padding:7px 8px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.ide-drawer-problem:hover{
  background:rgba(148,163,184,.06);
  border-color:#33455a;
}
.ide-drawer-problem.active{
  background:linear-gradient(90deg,rgba(56,189,248,.1),rgba(99,102,241,.07));
  border-color:rgba(125,211,252,.12);
  box-shadow:inset 2px 0 0 #38bdf8;
}
.ide-drawer-problem[hidden]{display:none!important}
.ide-drawer-status{
  width:18px;
  height:18px;
  border:1px solid #405066;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#52657a;
  font-size:9px;
}
.ide-drawer-status.solved{
  color:#4ade80;
  border-color:rgba(74,222,128,.32);
  background:rgba(74,222,128,.07);
}
.ide-drawer-copy{min-width:0;display:flex;flex-direction:column;gap:3px}
.ide-drawer-copy strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#dce5ef;
  font-size:10px;
  font-weight:750;
}
.ide-drawer-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#627084;
  font-size:8px;
}
.ide-drawer-difficulty{font-size:8px;font-weight:850;text-transform:uppercase}
.ide-drawer-difficulty.easy{color:#4ade80}
.ide-drawer-difficulty.medium{color:#fbbf24}
.ide-drawer-difficulty.hard{color:#fb7185}

@media(max-width:950px){
  .hdlforge-ide-active .ide-actions .solve-status{display:none}
  .hdlforge-ide-active .ide-bottom{flex-basis:180px;height:180px}
}
@media(max-width:900px){
  .hdlforge-ide-active .ide-topbar .topbar-navigation{
    position:static!important;
    transform:none!important;
    margin-left:auto;
  }
  .ide-topbar-problems-count{display:none}
}
@media(max-width:720px){
  .hdlforge-ide-active .ide-page{padding:6px}
  .hdlforge-ide-active .ide-topbar{height:56px;min-height:56px;flex-basis:56px;padding:0 8px}
  .hdlforge-ide-active .ide-topbar .topbar-navigation{display:none}
  .ide-topbar-problems{padding:0 9px}
  .ide-topbar-problems-label{display:none}
  .hdlforge-ide-active .ide-body{gap:6px}
  .hdlforge-ide-active .ide-problem{max-height:43vh}
  .hdlforge-ide-active .ide-panel-resizer{display:none}
  .ide-problem-drawer{left:6px;top:70px;bottom:6px;width:calc(100vw - 12px)}
}
