/* Code-Karo.dev neutral dark interface tokens */
:root {
  color-scheme: dark;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --bg-app: #101014;
  --bg-topbar: #111116;
  --bg-panel: #121318;
  --bg-surface: #17181e;
  --bg-surface-raised: #202127;
  --bg-surface-hover: #292a31;
  --bg-surface-active: #303139;
  --border-subtle: rgba(190, 194, 205, 0.08);
  --border-default: rgba(190, 194, 205, 0.16);
  --border-strong: rgba(190, 194, 205, 0.3);
  --color-accent: #aeb1ba;
  --color-accent-soft: rgba(174, 177, 186, 0.12);
  --color-accent-secondary: #cf91a8;
  --color-accent-secondary-soft: rgba(207, 145, 168, 0.12);
  --color-success: #78b99a;
  --color-success-soft: rgba(120, 185, 154, 0.12);
  --color-warning: #d9bf71;
  --color-warning-soft: rgba(217, 191, 113, 0.12);
  --color-danger: #d9878e;
  --color-danger-soft: rgba(217, 135, 142, 0.12);
  --text-primary: #e4e4e8;
  --text-secondary: #c3c5cc;
  --text-muted: #92949e;
  --text-faint: #62646e;
  --text-inverse: #101014;
  --btn-submit-bg: #398d7c;
  --btn-submit-hover: #327d6e;
  --diff-easy: var(--color-success);
  --diff-easy-bg: var(--color-success-soft);
  --diff-easy-border: rgba(120, 185, 154, 0.28);
  --diff-medium: var(--color-warning);
  --diff-medium-bg: var(--color-warning-soft);
  --diff-medium-border: rgba(211, 171, 103, 0.28);
  --diff-hard: var(--color-danger);
  --diff-hard-bg: var(--color-danger-soft);
  --diff-hard-border: rgba(217, 135, 142, 0.28);
  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 7px;
  --radius-pill: 9999px;
  --split-v: 47%;
  --split-h: 42%;
  --topbar-height: 60px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-app: #f0f0f2;
  --bg-topbar: #ffffff;
  --bg-panel: #f7f7f8;
  --bg-surface: #ffffff;
  --bg-surface-raised: #ebebee;
  --bg-surface-hover: #e1e1e5;
  --bg-surface-active: #d6d6dc;
  --border-subtle: rgba(32, 33, 38, 0.08);
  --border-default: rgba(32, 33, 38, 0.16);
  --border-strong: rgba(32, 33, 38, 0.3);
  --color-accent: #64666e;
  --color-accent-soft: rgba(100, 102, 110, 0.1);
  --color-accent-secondary: #a45e76;
  --color-accent-secondary-soft: rgba(164, 94, 118, 0.1);
  --color-success: #28795f;
  --color-success-soft: rgba(40, 121, 95, 0.1);
  --color-warning: #8f701c;
  --color-warning-soft: rgba(143, 112, 28, 0.1);
  --color-danger: #a54c54;
  --color-danger-soft: rgba(165, 76, 84, 0.1);
  --text-primary: #202126;
  --text-secondary: #42434a;
  --text-muted: #696b74;
  --text-faint: #888a92;
  --text-inverse: #ffffff;
  --btn-submit-bg: #28795f;
  --btn-submit-hover: #226b54;
  --diff-easy-border: rgba(40, 121, 95, 0.24);
  --diff-medium-border: rgba(143, 112, 28, 0.24);
  --diff-hard-border: rgba(165, 76, 84, 0.24);
}

/* Base resets & typography */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-panel);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-raised);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);

}

/* Dragging lockouts */
body.is-resizing {
  user-select: none !important;
}
body.is-resizing iframe,
body.is-resizing .monaco-container,
body.is-resizing #monaco-editor {
  pointer-events: none !important;
}
body.resizing-col, body.resizing-col * {
  cursor: col-resize !important;
}
body.resizing-row, body.resizing-row * {
  cursor: row-resize !important;
}

/* =====================================================================
   1. TOP BAR (Fixed 48px)
   ===================================================================== */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-default);

  position: relative;
  z-index: 100;
}

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

.topbar-github {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.topbar-github svg { width: 17px; height: 17px; }
.topbar-github:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.topbar-github:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.3px;
  transition: opacity 0.15s ease;
}
.brand:hover {
  opacity: 0.9;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: var(--text-inverse);
  background: #e9e9ed;

  font: 700 11px var(--font-mono);
}
.brand-muted {
  color: var(--color-accent);
  font-weight: 600;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.topbar-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--color-accent);

}

.problem-nav-group {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2px;
}

.topbar-credits {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(190, 194, 205, 0.08);
  border: 1px solid rgba(190, 194, 205, 0.16);
  letter-spacing: 0.2px;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s ease;
}
.topbar-credits:hover {
  background: rgba(174, 179, 191, 0.08);
  border-color: rgba(174, 179, 191, 0.3);
  color: var(--color-accent);

}

.topbar-icon-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}
.topbar-icon-btn:not(:disabled):hover {
  background: var(--bg-surface-hover);
  color: var(--color-accent);

}
.topbar-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Center Run & Submit Segmented Control */
.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.run-submit-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;

}

.btn-segmented {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-segmented.btn-run {
  background: rgba(174, 179, 191, 0.08);
  color: var(--color-accent);
  border: 1px solid var(--border-default);
  border-right: 1px solid var(--border-strong);
}
.btn-segmented.btn-run:not(:disabled):hover {
  background: rgba(174, 179, 191, 0.18);
  border-color: var(--color-accent);

}

.btn-segmented.btn-submit {
  background: var(--btn-submit-bg);
  color: var(--text-inverse);
  font-weight: 700;

}
.btn-segmented.btn-submit:not(:disabled):hover {
  background: var(--btn-submit-hover);

}

.btn-segmented:disabled {
  opacity: 0.4;
  cursor: not-allowed;

}
.play-icon { font-size: 9px; }

/* Right Section */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.runner-indicator-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);

  transition: all 0.3s ease;
}
.status-dot.waking {
  background: var(--color-warning);


}
.status-dot.offline {
  background: var(--color-danger);

}

/* Auth Actions in Topbar */
.auth-actions {
  display: flex;
  align-items: center;
}
.guest-auth-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-btn-signin {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.auth-btn-signin:hover {
  background: var(--bg-surface-hover);
  border-color: var(--color-accent);
  color: var(--color-accent);

}
.auth-btn-signup {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #05050a;
  border: 0;
  cursor: pointer;

  transition: all 0.15s ease;
}
.auth-btn-signup:hover {

  filter: brightness(1.1);
}

/* User Menu in Topbar */
.user-menu-container {
  position: relative;
}
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 2px 9px 2px 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.user-menu-btn:hover {
  border-color: var(--color-accent);

}
.user-avatar {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e9e9ed;
  color: #05050a;
  font: 700 10px var(--font-mono);
  text-transform: uppercase;
}
.user-handle {
  font-size: 12px;
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-caret {
  font-size: 9px;
  color: var(--text-muted);
}
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 190px;
  background: #0d0d1a;
  border: 1px solid rgba(174, 179, 191, 0.25);

  border-radius: var(--radius-md);
  padding: 6px;
  z-index: 1000;
}
.user-menu-header {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-menu-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-badge {
  font-size: 11px;
  color: var(--color-success);
  font-weight: 600;
}
.user-menu-sep {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}
.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.user-menu-dropdown a.user-menu-item {
  text-decoration: none;
}
.user-menu-item:hover {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

/* Auth Modal Styling */
.shortcuts-modal .auth-modal-card {
  position: relative;
  isolation: isolate;
  width: 380px;
  max-width: 92vw;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
    conic-gradient(
      from var(--shine-angle, 0deg),
      transparent 0deg 255deg,
      #a07cfe 280deg,
      #fe8fb5 310deg,
      #ffbe7b 340deg,
      transparent 360deg
    ) border-box;
  animation: auth-shine-rotate 8s linear infinite;
}
@property --shine-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes auth-shine-rotate {
  to { --shine-angle: 360deg; }
}
@media (prefers-reduced-motion: reduce) {
  .shortcuts-modal .auth-modal-card { animation: none; }
}
.auth-tabs-row {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  padding-bottom: 8px;
}
.auth-tab {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.auth-tab.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);

}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.form-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  transition: all 0.15s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-accent);

}
.auth-error-box {
  background: var(--color-danger-soft);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: #ff85a0;
  font-size: 12px;
  margin-bottom: 12px;
}
.auth-demo-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(190, 194, 205, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-bottom: 14px;
}
.auth-submit-btn {
  width: 100%;
  justify-content: center;
  height: 34px;
  font-size: 13px;
  font-weight: 700;
}

/* Submissions Tab in Left Panel */
.submissions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 4px;
}
.submission-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease;
}
.submission-card:hover {
  border-color: var(--border-strong);
}
.sub-card-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sub-card-verdict {
  font-size: 13px;
  font-weight: 700;
}
.sub-card-verdict.accepted { color: var(--color-success);  }
.sub-card-verdict.wrong-answer { color: var(--color-danger);  }
.sub-card-verdict.compile-error { color: var(--color-warning);  }
.sub-card-verdict.time-limit { color: var(--color-warning);  }
.sub-card-verdict.runtime-error { color: var(--color-danger);  }

.sub-card-time {
  font-size: 11px;
  color: var(--text-muted);
}
.sub-card-row-mid {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.sub-card-row-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}
.sub-action-btn {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sub-action-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.sub-guest-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 16px;
  gap: 12px;
  color: var(--text-secondary);
}
.sub-guest-icon { font-size: 34px; }
.sub-guest-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0; }
.sub-guest-desc { font-size: 12.5px; color: var(--text-muted); max-width: 280px; margin: 0; line-height: 1.5; }


/* =====================================================================
   2. SLIDE-IN PROBLEM DRAWER
   ===================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 7, 0.75);
  backdrop-filter: blur(3px);
  z-index: 550;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.problem-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-default);
  z-index: 600;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);

}
.problem-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface-raised);
}

.drawer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-title-row h2 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.eyebrow {
  color: var(--color-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.25px;
}
.count-pill {
  display: inline-block;
  vertical-align: 2px;
  padding: 2px 8px;
  margin-left: 5px;
  border-radius: var(--radius-sm);
  color: var(--color-success);
  background: var(--color-success-soft);
  border: 1px solid rgba(120, 185, 154, 0.3);
  font: 10px var(--font-mono);
}

.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  transition: all 0.15s ease;
}
.icon-button:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
  border-color: var(--color-accent);
}

.search-box {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: var(--bg-surface);
  transition: all 0.15s ease;
}
.search-box:focus-within {
  border-color: var(--color-accent);

}
.search-box > span { font-size: 16px; line-height: 1; }
.search-box input {
  min-width: 0;
  flex: 1;
  outline: 0;
  border: 0;
  color: var(--text-primary);
  background: transparent;
  font-size: 12px;
}
.search-box input::placeholder { color: var(--text-muted); }
kbd {
  padding: 2px 5px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  background: rgba(174, 179, 191, 0.08);
  font: 10px var(--font-mono);
}

/* Filter Controls */
.filter-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-row {
  display: flex;
  gap: 6px;
}
.filter-select {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  font-size: 11.5px;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-select:hover, .filter-select:focus {
  border-color: var(--color-accent);

}
.topic-select { width: 100%; }

.list-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.list-label span {
  font: 10px var(--font-mono);
  letter-spacing: 0;
}

.problem-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 12px;
}
.problem-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-md);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: all 0.12s ease;
}
.problem-item:hover {
  background: var(--bg-surface-raised);
}
.problem-item.selected {
  background: var(--bg-surface-active);

}
.problem-number {
  flex: 0 0 19px;
  padding-top: 1px;
  color: var(--text-muted);
  font: 10px var(--font-mono);
}
.status-marker {
  flex: 0 0 19px;
  text-align: center;
  font: 700 12px var(--font-mono);
}
.status-marker.solved {
  color: var(--color-success);

}
.status-marker.attempted {
  color: var(--color-warning);

  font-size: 13px;
}

.problem-item-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.problem-title {
  color: var(--text-primary);
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 500;
}
.problem-item.selected .problem-title {
  color: #fff;
  font-weight: 600;

}
.problem-item-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.problem-slug {
  overflow: hidden;
  color: var(--text-muted);
  font: 9.5px var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.problem-item-diff {
  font: 700 9px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.problem-item-diff.easy { color: var(--color-success); }
.problem-item-diff.medium { color: var(--color-warning); }
.problem-item-diff.hard { color: var(--color-danger); }

.empty-list {
  padding: 24px 10px;
  color: var(--text-muted);
  font-size: 12.5px;
  text-align: center;
}

.drawer-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-default);
  background: var(--bg-surface-raised);
}
.footer-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  background: rgba(174, 179, 191, 0.1);
  border: 1px solid rgba(174, 179, 191, 0.25);
}
.drawer-footer div { display: flex; flex-direction: column; gap: 2px; }
.drawer-footer strong { font-size: 11px; font-weight: 600; color: var(--text-primary); }
.drawer-footer div span { color: var(--text-muted); font-size: 9.5px; }

/* =====================================================================
   3. WORKSPACE 3-PANE LAYOUT & SPLITTERS
   ===================================================================== */
.workspace-layout {
  height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: row;
  overflow: hidden;
  position: relative;
  background: transparent;
}

/* Panels generic */
.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);

  position: relative;
}

/* Panel Headers */
.panel-header {
  height: 38px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}

.panel-tabs, .console-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}

.panel-tab, .console-tab {
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.panel-tab:hover, .console-tab:hover {
  color: var(--text-primary);
}
.panel-tab.active, .console-tab.active {
  color: #fff;
  border-bottom-color: var(--color-accent);


  font-weight: 600;
}

.panel-action-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}
.panel-action-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--color-accent);
  border-color: var(--color-accent-soft);

}

/* LEFT PANEL (Problem Panel) */
.problem-panel {
  width: var(--split-v);
  min-width: 280px;
  max-width: calc(100% - 360px);
  margin: 8px 0 8px 8px;
  flex-shrink: 0;
}

.left-panel-header {
  padding-right: 8px;
}
.problem-id-tag {
  color: var(--color-accent);
  font: 10px var(--font-mono);
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  border: 1px solid rgba(174, 179, 191, 0.25);
}

.left-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 30px;
}

.tab-pane {
  min-height: 100%;
}
.placeholder-tab-pane {
  max-width: 320px;
  margin: 12vh auto 0;
  text-align: center;
  color: var(--text-secondary);
}
.placeholder-icon {
  font-size: 34px;
  margin-bottom: 12px;

}
.placeholder-tab-pane h3 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 16px;
}
.placeholder-tab-pane p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Left collapsed strip */
[hidden] {
  display: none !important;
}

.expand-left-strip {
  display: none;
  width: 26px;
  height: calc(100% - 16px);
  margin: 8px 0 8px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  writing-mode: vertical-rl;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.expand-left-strip:hover {
  background: var(--bg-surface-hover);
  color: var(--color-accent);
  border-color: var(--color-accent);

}

/* SPLITTERS */
.splitter {
  position: relative;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 0.15s ease;
}

.splitter-vertical {
  width: 10px;
  cursor: col-resize;
  margin: 8px 0;
}
.splitter-horizontal {
  height: 10px;
  cursor: row-resize;
  width: 100%;
}

.splitter-handle {
  border-radius: 2px;
  background: var(--border-strong);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.splitter-vertical .splitter-handle {
  width: 2px;
  height: 32px;
}
.splitter-horizontal .splitter-handle {
  width: 32px;
  height: 2px;
}

.splitter:hover .splitter-handle,
.splitter:focus-visible .splitter-handle,
.splitter.active .splitter-handle {
  background: var(--color-accent);

  transform: scale(1.3);
}
.splitter:focus-visible {
  outline: none;
}

/* RIGHT COLUMN */
.right-column {
  flex: 1;
  min-width: 360px;
  display: flex;
  flex-direction: column;
  margin: 8px 8px 8px 0;
  overflow: hidden;
}

/* TOP: Editor Panel */
.editor-panel {
  height: var(--split-h);
  min-height: 160px;
  max-height: calc(100% - 120px);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.editor-header {
  padding-left: 14px;
}

.file-tab {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 2px solid var(--color-accent);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;

}
.java-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  color: var(--color-warning);
  background: rgba(211, 171, 103, 0.15);
  border: 1px solid rgba(211, 171, 103, 0.3);
  font: 700 9px var(--font-mono);
}
.dirty-indicator {
  color: var(--color-warning);

  font-size: 9px;
  margin-left: -2px;
}

.editor-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.save-status {
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  margin-right: 4px;
}

/* Generic buttons inside toolbar */
.button {
  display: inline-flex;
  height: 26px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: all 0.15s ease;
}
.button:disabled { opacity: 0.45; cursor: not-allowed;  }
.button-secondary {
  border-color: var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
}
.button-secondary:not(:disabled):hover {
  background: var(--bg-surface-hover);
  border-color: var(--color-accent);

}
.button-ghost {
  border-color: var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
}
.button-ghost:not(:disabled):hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.button-primary {
  color: var(--text-inverse);
  background: var(--btn-submit-bg);
  font-weight: 700;

}
.button-primary:not(:disabled):hover {
  background: var(--btn-submit-hover);
}

/* Font size controls */
.font-controls {
  display: inline-flex;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 25px;
}
.font-btn {
  background: var(--bg-surface);
  border: 0;
  color: var(--text-secondary);
  padding: 0 8px;
  font: 700 10.5px var(--font-mono);
  cursor: pointer;
  transition: all 0.15s ease;
}
.font-btn:first-child { border-right: 1px solid var(--border-default); }
.font-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--color-accent);
}

/* Code Area & Monaco Container */
.code-area {
  min-height: 100px;
  flex: 1 1 auto;
  display: flex;
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
}
.monaco-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

.fallback-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.fallback-banner {
  padding: 6px 12px;
  background: rgba(211, 171, 103, 0.12);
  border-bottom: 1px solid rgba(211, 171, 103, 0.25);
  color: var(--color-warning);
  font-size: 11px;
}
.fallback-textarea-row {
  flex: 1 1 auto;
  display: flex;
  overflow: auto;
  background: var(--bg-panel);
}
.line-numbers {
  width: 40px;
  flex: 0 0 40px;
  padding: 14px 8px 20px 0;
  color: var(--text-faint);
  font: 11.5px/19px var(--font-mono);
  text-align: right;
  user-select: none;
  white-space: pre;
}
#code-editor {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  resize: none;
  padding: 14px 12px 20px 0;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  background: transparent;
  caret-color: var(--color-accent);
  font: 12px/20px var(--font-mono);
  tab-size: 4;
  white-space: pre;
}

.monaco-error-line { background: rgba(217, 135, 142, 0.18) !important; }
.monaco-error-line-number { color: var(--color-danger) !important; font-weight: 700 !important; }

.editor-statusbar {
  height: 23px;
  flex: 0 0 23px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font: 11px var(--font-mono);
  user-select: none;
}
.statusbar-spacer { flex: 1; }

/* BOTTOM: Console Panel */
.console-panel {
  flex: 1;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  overflow: hidden;
}

.console-header {
  padding-right: 10px;
}
.console-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.run-duration {
  color: var(--text-muted);
  font: 10px var(--font-mono);
}

.console-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.console-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
}
.console-pane[hidden] {
  display: none !important;
}

.testcase-preview-card {
  padding: 18px;
}
.testcase-card-header {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.testcase-card-body {
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
  line-height: 1.6;
}

.console-output {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  color: var(--text-primary);
  position: relative;
}

/* =====================================================================
   4. COLLAPSED, MAXIMIZED & FULLSCREEN STATES
   ===================================================================== */
/* Left panel collapsed */
.workspace-layout.left-collapsed .problem-panel {
  display: none !important;
}
.workspace-layout.left-collapsed .splitter-vertical {
  display: none !important;
}
.workspace-layout.left-collapsed .expand-left-strip {
  display: flex !important;
}

/* Editor maximized (collapses console) */
.right-column.editor-maximized .editor-panel {
  height: calc(100% - 38px) !important;
  max-height: none !important;
  flex: 1 !important;
}
.right-column.editor-maximized .splitter-horizontal {
  display: none !important;
}
.right-column.editor-maximized .console-panel {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  flex: none !important;
}
.right-column.editor-maximized .console-content-wrap {
  display: none !important;
}

/* Console collapsed */
.right-column.console-collapsed .editor-panel {
  height: calc(100% - 38px) !important;
  max-height: none !important;
  flex: 1 !important;
}
.right-column.console-collapsed .splitter-horizontal {
  display: none !important;
}
.right-column.console-collapsed .console-panel {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  flex: none !important;
}
.right-column.console-collapsed .console-content-wrap {
  display: none !important;
}

/* Editor Fullscreen mode */
.editor-panel.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: none !important;
  z-index: 9999 !important;
  border-radius: 0 !important;
  margin: 0 !important;

}

/* =====================================================================
   5. PROBLEM METADATA, CARDS & MARKDOWN
   ===================================================================== */
.problem-meta-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.problem-title-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.problem-display-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
  line-height: 1.3;
}

.problem-meta-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.diff-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.diff-badge.easy {
  color: var(--diff-easy);
  background: var(--diff-easy-bg);
  border: 1px solid var(--diff-easy-border);

}
.diff-badge.medium {
  color: var(--diff-medium);
  background: var(--diff-medium-bg);
  border: 1px solid var(--diff-medium-border);

}
.diff-badge.hard {
  color: var(--diff-hard);
  background: var(--diff-hard-bg);
  border: 1px solid var(--diff-hard-border);

}

/* Expandable Meta Chips (Topics & Hint) */
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.meta-chip:hover {
  background: var(--bg-surface-hover);
  border-color: var(--color-accent);
  color: var(--color-accent);

}
.meta-chip.hints-chip:hover {
  border-color: var(--color-warning);
  color: var(--color-warning);

}
.meta-chip[aria-expanded="true"] {
  background: var(--bg-surface-raised);
  border-color: var(--color-accent);
  color: #fff;
}
.meta-chip.hints-chip[aria-expanded="true"] {
  border-color: var(--color-warning);
  color: var(--color-warning);
}
.chip-icon {
  font-size: 11px;
}
.chip-arrow {
  font-size: 9px;
  transition: transform 0.2s ease;
  color: var(--text-muted);
}
.meta-chip[aria-expanded="true"] .chip-arrow {
  transform: rotate(180deg);
  color: var(--color-accent);
}
.meta-chip.hints-chip[aria-expanded="true"] .chip-arrow {
  color: var(--color-warning);
}

.topic-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 2px;
}
.topic-tag {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  font-size: 11px;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
}
.topic-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Hints Drawer & Step-by-Step Accordion */
.hints-drawer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(211, 171, 103, 0.04);
  border: 1px solid rgba(211, 171, 103, 0.25);
  border-radius: var(--radius-md);
  margin-top: 4px;
}
.hint-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.55;
  background: var(--bg-surface);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.hint-badge {
  font: 700 9.5px var(--font-mono);
  color: var(--color-warning);
  background: var(--color-warning-soft);
  border: 1px solid rgba(211, 171, 103, 0.35);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}
.hint-text {
  flex: 1;
}
.hint-reveal-btn {
  align-self: flex-start;
  margin-top: 4px;
  background: transparent;
  border: 1px dashed var(--color-warning);
  color: var(--color-warning);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hint-reveal-btn:hover {
  background: var(--color-warning-soft);

}

.welcome-state {
  max-width: 340px;
  margin: 10vh auto 0;
  text-align: center;
}
.welcome-icon {
  margin-bottom: 18px;
  color: var(--color-accent);
  font: 500 36px var(--font-mono);
  letter-spacing: -3px;

}
.welcome-state h2 {
  margin: 12px 0 10px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  color: var(--text-primary);
}
.welcome-state h2 span { color: var(--color-accent); }
.welcome-state p {
  max-width: 300px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 auto;
}

/* Enhanced Markdown Body (Max readable line length ~75ch) */
.markdown-body {
  max-width: 75ch;
  margin: 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.68;
  overflow-wrap: anywhere;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  color: #fff;
  line-height: 1.35;
  letter-spacing: -0.3px;
}
.markdown-body h1 {
  margin: 4px 0 14px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.markdown-body h2 { margin: 20px 0 10px; font-size: 15.5px; font-weight: 600; color: var(--color-accent); }
.markdown-body h3 { margin: 16px 0 8px; font-size: 13.5px; font-weight: 600; }
.markdown-body p { margin: 10px 0; }
.markdown-body strong { color: #fff; font-weight: 600; }

/* Inline Code: rounded chip with faint cyan background and border */
.markdown-body code {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid rgba(174, 179, 191, 0.28);
  font: 12px var(--font-mono);
}

/* Example 1/2 Bordered Cards */
.example-card {
  margin: 14px 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;

}
.example-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border-subtle);
}
.example-card-title {
  font: 700 11px var(--font-mono);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.example-card-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.example-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
}
.example-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.example-value {
  font: 12px/1.5 var(--font-mono);
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: inline-block;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Constraints Section */
.constraints-card {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid rgba(174, 179, 191, 0.2);
  border-radius: var(--radius-md);
  background: rgba(174, 179, 191, 0.03);
}
.constraints-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.constraints-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.6;
}
.constraints-list li {
  margin: 4px 0;
}

/* Description Bottom Action Bar (Social Bar) */
.problem-footer-bar {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.footer-status-label {
  color: var(--text-muted);
  font-weight: 500;
}
.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font: 700 11px var(--font-mono);
  letter-spacing: 0.3px;
}
.footer-status-pill .status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.footer-status-pill.solved {
  color: var(--color-success);
  background: var(--color-success-soft);
  border: 1px solid rgba(120, 185, 154, 0.35);

}
.footer-status-pill.solved .status-indicator-dot {
  background: var(--color-success);

}
.footer-status-pill.attempted {
  color: var(--color-warning);
  background: var(--color-warning-soft);
  border: 1px solid rgba(211, 171, 103, 0.35);

}
.footer-status-pill.attempted .status-indicator-dot {
  background: var(--color-warning);

}
.footer-status-pill.todo {
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}
.footer-status-pill.todo .status-indicator-dot {
  background: var(--text-muted);
}

.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-link-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--color-accent);
  border-color: var(--color-accent);

}
.copy-link-btn.copied {
  color: var(--color-success);
  border-color: var(--color-success);

}

/* Fenced Code Block Container with Copy Button */
.code-block-wrap {
  margin: 14px 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: #080812;
  overflow: hidden;

}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}
.code-block-lang {
  font: 700 10px var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.code-copy-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 10.5px;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.code-copy-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.code-copy-btn.copied {
  color: var(--color-success);
  border-color: var(--color-success);
}

.markdown-body pre {
  margin: 0;
  padding: 12px 14px;
  background: transparent;
  overflow: auto;
}
.markdown-body pre code {
  padding: 0;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  line-height: 1.6;
  font-size: 12.5px;
}
.markdown-body ul, .markdown-body ol {
  padding-left: 22px;
  margin: 10px 0;
}
.markdown-body li { margin: 6px 0; }
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.markdown-body th, .markdown-body td {
  padding: 9px 13px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}
.markdown-body th {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
  font-weight: 600;
}
.markdown-body td { color: var(--text-secondary); }

/* Skeleton Shimmer Loading States */
.description-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}
.skeleton-line, .skeleton-pill, .skeleton-chip, .skeleton-card {
  background: #202127;
    border-radius: var(--radius-sm);
}
.sk-title { height: 26px; width: 60%; border-radius: var(--radius-md); }
.skeleton-meta-row { display: flex; gap: 8px; margin-bottom: 6px; }
.skeleton-pill { height: 22px; width: 55px; border-radius: var(--radius-sm); }
.skeleton-chip { height: 22px; width: 70px; border-radius: var(--radius-pill); }
.sk-p { height: 14px; }
.sk-w90 { width: 90%; }
.sk-w80 { width: 80%; }
.sk-w60 { width: 60%; }
.skeleton-card { height: 90px; width: 100%; border-radius: var(--radius-md); margin-top: 8px; }

/* Description Error Card */
.description-error-card {
  padding: 18px 20px;
  border: 1px solid var(--color-danger);
  background: rgba(217, 135, 142, 0.06);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.error-card-icon { font-size: 24px; color: var(--color-danger); }
.error-card-title { font-size: 15px; font-weight: 700; color: #fff; }
.error-card-msg { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* Console "Testcase" Tab View */
.testcase-tab-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 2px;
}
.testcase-subtabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.sample-case-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}
.sample-case-tab {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.sample-case-tab:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.sample-case-tab.active {
  background: var(--bg-surface-active);
  border-color: var(--color-accent);
  color: #fff;

}
.custom-case-placeholder {
  display: inline-flex;
  align-items: center;
}
.custom-case-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 500;
}
.tag-soon {
  font: 700 8.5px var(--font-mono);
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
}
.sample-case-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Console Centered Empty State */
.console-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  text-align: center;
  padding: 24px 16px;
  color: var(--text-secondary);
}
.empty-icon-mug {
  font-size: 32px;
  margin-bottom: 8px;

}
.empty-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.5;
}

/* Code Panel Status Bar */
.statusbar-save-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
}
.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);

  display: inline-block;
  transition: all 0.2s ease;
}
.save-dot.unsaved {
  background: var(--color-warning);

}
.statusbar-sep {
  color: var(--border-strong);
  font-weight: 300;
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  max-width: 380px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);

  color: var(--text-primary);
  font-size: 12.5px;
  font-family: var(--font-sans);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.toast-msg {
  flex: 1;
  line-height: 1.4;
}
.toast-close-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
}
.toast-close-btn:hover { color: var(--text-primary); }

.toast-saved {
  border-color: var(--color-success);

}
.toast-reset {
  border-color: var(--color-accent);

}
.toast-runner {
  border-color: var(--color-warning);

}
.toast-error {
  border-color: var(--color-danger);

}

/* Keyboard Shortcuts Modal (?) */
.shortcuts-modal {
  border: none;
  padding: 0;
  background: transparent;
  outline: none;
  margin: auto;
  overflow: visible;
}
.shortcuts-modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--bg-surface);
  border: 1px solid rgba(174, 179, 191, 0.3);
  border-radius: var(--radius-lg);

  width: 440px;
  max-width: 90vw;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-icon {
  font-size: 16px;
}
.modal-title-row h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.modal-body {
  padding: 16px 18px;
}
.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-primary);
}
.shortcut-keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* =====================================================================
   6. TEST RESULTS & CONSOLE RENDERING
   ===================================================================== */
.result-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.result-container.loading-dimmed {
  opacity: 0.45;
  filter: blur(0.5px);
  pointer-events: none;
}

.verdict-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.verdict-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.verdict-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.verdict-title.accepted {
  color: var(--color-success);

}
.verdict-title.wrong-answer {
  color: var(--color-danger);

}
.verdict-title.compile-error {
  color: var(--color-warning);

}
.verdict-title.runtime-error {
  color: var(--color-danger);

}
.verdict-title.time-limit {
  color: var(--color-warning);

}

.verdict-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.meta-pill { color: var(--text-primary); font-weight: 500; }
.meta-sep { color: var(--border-strong); }
.meta-notice { color: var(--color-warning); font-weight: 500; }

.mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mode-badge.run {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border: 1px solid rgba(174, 179, 191, 0.3);
}
.mode-badge.submit {
  background: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid rgba(120, 185, 154, 0.3);
}

.case-tabs-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.case-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 4px;
}
.case-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.case-tab:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.case-tab.active {
  background: var(--bg-surface-active);
  color: #fff;
  border-color: var(--color-accent);

}
.case-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.case-dot.pass {
  background: var(--color-success);

}
.case-dot.fail {
  background: var(--color-danger);

}

.detail-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 8px;
}
.detail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border-subtle);
}
.detail-card-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 10.5px;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.copy-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.copy-btn.copied {
  color: var(--color-success);
  border-color: var(--color-success);
  font-weight: 600;
}

.detail-card-body {
  padding: 10px 14px;
  font: 12px/1.6 var(--font-mono);
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.diff-highlight {
  border-radius: 2px;
  padding: 1px 3px;
}
.diff-highlight.expected {
  background: var(--color-success-soft);
  outline: 1px solid var(--color-success);
}
.diff-highlight.actual {
  background: var(--color-danger-soft);
  outline: 1px solid var(--color-danger);
}
.diff-highlight.diff-missing {
  background: var(--color-warning-soft);
  outline: 1px solid var(--color-warning);
  font-style: italic;
  font-size: 10px;
}

.invis-null { color: var(--color-warning); font-weight: 700; }
.invis-space { color: var(--text-faint); font-weight: 700; }
.invis-cr { color: var(--color-accent); font-weight: 700; }
.invis-nl { color: var(--color-accent); font-weight: 700; }

/* Submit Success / Failure Banners */
.submit-success-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-success-soft);
  border: 1px solid rgba(120, 185, 154, 0.35);
  border-radius: var(--radius-md);

}
.success-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-success);
  color: var(--text-inverse);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;

}
.success-content .success-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;

}
.success-content .success-subtitle {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.success-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.success-pill {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  color: var(--color-success);
  font: 11px var(--font-mono);
}

.submit-failure-banner {
  padding: 10px 14px;
  background: var(--color-danger-soft);
  border: 1px solid rgba(217, 135, 142, 0.35);
  border-radius: var(--radius-md);
  color: var(--color-danger);
  font-size: 13px;
  font-weight: 600;
}

.clickable-line-ref {
  color: var(--color-accent);
  text-decoration: underline;
  cursor: pointer;
}
.clickable-line-ref:hover {
  color: #fff;

}

.console-placeholder, .console-empty-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12.5px;
}
.console-empty-state {
  flex-direction: column;
  justify-content: center;
  padding: 40px 16px;
  text-align: center;
}
.empty-icon-wrap {
  font-size: 28px;
  color: var(--color-accent);
  margin-bottom: 6px;

}
.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.empty-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}
.terminal-icon {
  font: 700 13px var(--font-mono);
  color: var(--color-accent);
}

.loading-shimmer-bar {
  height: 2px;
  width: 100%;
  background: var(--color-accent);
    margin-bottom: 8px;
}

.running-floating-pill {
  position: absolute;
  top: 12px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-raised);
  border: 1px solid var(--color-accent);
  font-size: 11.5px;
  color: var(--text-primary);

  z-index: 20;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;

}

/* Retry Button */
.button-retry {
  align-self: flex-start;
  margin-top: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--color-warning);
  color: var(--color-warning);
}
.button-retry:hover {
  background: var(--color-warning-soft);

}

/* =====================================================================
   7. MOBILE VIEW (< 900px)
   ===================================================================== */
.mobile-tab-bar {
  display: none;
}

@media (max-width: 900px) {
  .topbar {
    padding: 0 12px;
  }
  .runner-indicator-wrap {
    display: none;
  }
  .problem-nav-group {
    display: none;
  }
  .topbar-credits {
    display: none;
  }

  .workspace-layout {
    height: calc(100vh - var(--topbar-height) - 48px);
    display: block;
    position: relative;
    padding: 6px;
  }

  .splitter-vertical,
  .splitter-horizontal,
  .expand-left-strip {
    display: none !important;
  }

  .problem-panel,
  .right-column,
  .editor-panel,
  .console-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  /* Show only active mobile view */
  .workspace-layout:not([data-mobile-active="description"]) .problem-panel {
    display: none !important;
  }
  .workspace-layout[data-mobile-active="description"] .right-column {
    display: none !important;
  }

  .workspace-layout[data-mobile-active="code"] .console-panel {
    display: none !important;
  }
  .workspace-layout[data-mobile-active="result"] .editor-panel {
    display: none !important;
  }

  /* Mobile bottom bar */
  .mobile-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--bg-topbar);
    border-top: 1px solid var(--border-default);

    z-index: 500;
  }
  .mobile-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .mobile-tab-btn.active {
    color: var(--color-accent);

  }
  .mobile-tab-icon {
    font-size: 15px;
  }
}

html[data-theme="light"] .brand-mark {
  color: #202126;
  background: #dedee2;
}

html[data-theme="light"] .brand-muted {
  color: var(--text-muted);
}

html[data-theme="light"] .btn-segmented.btn-run {
  color: var(--text-primary);
  background: #e3e3e6;
}

html[data-theme="light"] .btn-segmented.btn-run:not(:disabled):hover {
  background: #d6d6dc;
}

html[data-theme="light"] .panel-tab.active,
html[data-theme="light"] .console-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--color-accent);
}

html[data-theme="light"] .problem-display-title,
html[data-theme="light"] .markdown-body h1,
html[data-theme="light"] .markdown-body h2,
html[data-theme="light"] .markdown-body h3,
html[data-theme="light"] .markdown-body strong {
  color: var(--text-primary);
}

html[data-theme="light"] .markdown-body,
html[data-theme="light"] .markdown-body h2 {
  color: var(--text-secondary);
}

html[data-theme="light"] .markdown-body code {
  color: #555761;
  background: #e4e4e8;
}

html[data-theme="light"] .example-card {
  background: #f1f1f3;
}

html[data-theme="light"] .splitter-vertical {
  background: #d0d0d6;
}

html[data-theme="light"] .splitter:hover .splitter-handle,
html[data-theme="light"] .splitter:focus-visible .splitter-handle,
html[data-theme="light"] .splitter.active .splitter-handle {
  background: #aeb1ba;
}

html[data-theme="light"] .editor-statusbar,
html[data-theme="light"] .console-panel {
  background: var(--bg-panel);
}

html[data-theme="light"] .console-empty-state {
  color: var(--text-secondary);
}

html[data-theme="light"] .console-empty-state .empty-title {
  color: var(--text-primary);
}

html[data-theme="light"] .console-empty-state .empty-desc {
  color: var(--text-muted);
}

body {
  background-color: var(--bg-app);
  background-image: none;
}

.topbar {
  padding: 0 18px;
  background: var(--bg-topbar);
  border-bottom-color: var(--border-default);

}

.brand {
  gap: 10px;
  font-size: 17px;
  letter-spacing: -0.4px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #191a1f;
  background: #e9e9ed;

  font-size: 12px;
}

.brand-muted {
  color: #92949e;
}

.topbar-credits {
  display: none;
}

.topbar-icon-btn:not(:disabled):hover,
.button-secondary:not(:disabled):hover,
.button-ghost:not(:disabled):hover,
.font-btn:hover,
.panel-action-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);

}

.run-submit-group {
  gap: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;

  overflow: visible;
}

.btn-segmented {
  height: 42px;
  padding: 0 19px;
  border-radius: 8px;
  font-size: 14px;
}

.btn-segmented.btn-run {
  color: #d0d1d6;
  background: #303139;
  border: 1px solid transparent;
}

.btn-segmented.btn-run:not(:disabled):hover {
  background: #3a3b44;
  border-color: var(--border-strong);

}

.btn-segmented.btn-submit {
  color: #fff;
  font-weight: 600;

}

.runner-indicator-wrap {
  font-size: 13px;
}

.status-dot {

}

.user-menu-btn {
  background: transparent;
  border-color: transparent;
}

.user-avatar {
  background: #aeb1ba;
  color: #25262c;
}

.workspace-layout {
  height: calc(100vh - var(--topbar-height));
  background: var(--bg-app);
}

.panel {
  background: var(--bg-panel);
  border: 0;
  border-radius: 0;

}

.panel-header {
  height: 56px;
  flex-basis: 56px;
  padding: 0 20px;
  background: var(--bg-panel);
  border-bottom-color: var(--border-default);
}

.panel-tab,
.console-tab {
  padding: 0 16px;
  font-size: 15px;
}

.panel-tab.active,
.console-tab.active {
  color: #e7e7eb;
  border-bottom-color: #d1d3dc;


}

.problem-panel {
  min-width: 300px;
  max-width: calc(100% - 360px);
  margin: 0;
}

.left-panel-header {
  padding-right: 14px;
}

.left-panel-content {
  padding: 26px 3.2vw 32px;
}

.problem-display-title {
  color: #e7e7eb;
  font-size: clamp(24px, 2.1vw, 32px);
  letter-spacing: -0.6px;
  line-height: 1.35;
}

.markdown-body {
  color: #d5d5da;
  font-size: 16px;
  line-height: 1.7;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body strong {
  color: #e7e7eb;
}

.markdown-body h2 {
  color: #d5d5da;
}

.markdown-body code {
  color: #bec2ce;
  background: #24262e;
  border-color: transparent;
}

.example-card {
  background: #15161c;
}

.splitter-vertical {
  width: 2px;
  margin: 0;
  background: #292a31;
}

.splitter-vertical .splitter-handle {
  width: 2px;
  height: 100%;
}

.splitter:hover .splitter-handle,
.splitter:focus-visible .splitter-handle,
.splitter.active .splitter-handle {
  background: #858893;

  transform: none;
}

.right-column {
  min-width: 360px;
  margin: 0;
  border-left: 1px solid var(--border-default);
}

.editor-panel {
  height: var(--split-h);
  border-bottom: 1px solid var(--border-default);
}

.editor-header {
  padding-left: 18px;
}

.file-tab {
  font-size: 15px;

}

.button {
  height: 34px;
  padding: 0 13px;
  border-radius: 6px;
  font-size: 12px;
}

.button-primary {
  color: #fff;
}

.font-controls {
  height: 34px;
  border-radius: 6px;
}

.font-btn {
  padding: 0 10px;
}

.editor-statusbar {
  height: 40px;
  flex-basis: 40px;
  gap: 14px;
  background: #14151a;
  font: 12px var(--font-sans);
}

.console-panel {
  background: #101115;
}

.console-header {
  padding-right: 16px;
}

.console-empty-state {
  color: #d8d9de;
}

.console-empty-state .empty-title {
  color: #e1e1e5;
}

.console-empty-state .empty-desc {
  color: #93959f;
}

.problem-drawer,
.drawer-header,
.drawer-footer {
  background: var(--bg-surface);

}

@media (max-width: 900px) {
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .brand {
    font-size: 15px;
    white-space: nowrap;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .topbar-left,
  .topbar-right {
    gap: 6px;
  }

  .problem-list-toggle {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .problem-list-toggle > span:last-child {
    display: none;
  }

  .btn-segmented {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .run-submit-group {
    gap: 5px;
  }

  .problem-id-tag {
    display: none;
  }

  #fullscreen-app-btn,
  .auth-btn-signup {
    display: none;
  }

  .auth-btn-signin {
    height: 30px;
    padding: 0 8px;
    white-space: nowrap;
  }

  .panel-header {
    padding: 0 12px;
  }

  .left-panel-content {
    padding: 20px 18px 28px;
  }
}
