:root {
  --bg-app: #09090b;
  --bg-surface: #111113;
  --bg-subtle: #18181b;
  --border-color: #27272a;
  --border-strong: #3f3f46;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent-primary: #3f3f46;
  --accent-hover: #52525b;
}

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

body {
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Topbar */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
  flex-shrink: 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px 0 9px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-back:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong, #a1a1aa);
}

.btn-back-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn-back:hover .btn-back-icon {
  transform: translateX(-2px);
}

.brand-mark {
  width: 24px;
  height: 24px;
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 760px;
}

.engine-select {
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.engine-select:focus,
input:focus {
  border-color: var(--accent-primary);
}

input {
  height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.84rem;
  flex: 1;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

input:focus {
  background: var(--bg-surface);
}

.btn-primary {
  height: 34px;
  background: var(--accent-primary);
  color: #ffffff;
  border: 1px solid var(--accent-primary);
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-small,
.btn-icon {
  height: 28px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  transition: all 0.12s ease;
}

.btn-icon {
  width: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.btn-small:hover,
.btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

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

.btn-toggle.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.btn-icon-svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.cache-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* Workspace Flex Layout */
.workspace {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
  position: relative;
  height: calc(100vh - 56px);
}

/* Video Column */
.video-panel {
  flex: 1 1 0%;
  min-width: 360px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-surface);
}

.video-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 16px 24px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
}

.video-scroll-container::-webkit-scrollbar {
  display: none;
}

/* Video Box */
.video-wrapper {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  background: #000000;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.video-wrapper.is-standby {
  aspect-ratio: auto;
  height: 470px;
}

#player {
  width: 100%;
  height: 100%;
  display: block;
}

.playback-controls {
display: flex;
flex-wrap: nowrap;
align-items: center;
gap: 8px;
min-width: 0;
padding: 7px 8px;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-surface);
overflow-x: auto;
scrollbar-width: none;
}

.playback-controls::-webkit-scrollbar {
display: none;
}

.playback-buttons,
.playback-options,
.playback-timeline,
.playback-option {
display: flex;
flex: 0 0 auto;
align-items: center;
gap: 5px;
}

.playback-controls .btn-icon {
flex: 0 0 30px;
width: 30px;
height: 30px;
padding: 5px;
}

.playback-controls .btn-icon svg {
width: 100%;
height: 100%;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}

#playPauseBtn .play-icon,
#playPauseBtn .pause-icon {
fill: currentColor;
stroke: none;
}

.playback-controls .hidden {
display: none;
}

.playback-control:focus-visible {
outline: 2px solid var(--accent-primary);
outline-offset: 2px;
}

.playback-timeline {
flex: 1 1 auto;
min-width: 100px;
}

.playback-controls input[type="range"] {
appearance: none;
-webkit-appearance: none;
height: 18px;
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
cursor: pointer;
}

.playback-timeline input[type="range"] {
flex: 1;
min-width: 50px;
}

.playback-controls input[type="range"]::-webkit-slider-runnable-track {
height: 4px;
border-radius: 999px;
background: var(--border-strong);
}

.playback-controls input[type="range"]::-moz-range-track {
height: 4px;
border-radius: 999px;
background: var(--border-strong);
}

.playback-controls input[type="range"]::-webkit-slider-thumb {
appearance: none;
-webkit-appearance: none;
width: 12px;
height: 12px;
margin-top: -4px;
border: 0;
border-radius: 50%;
background: var(--accent-primary);
}

.playback-controls input[type="range"]::-moz-range-thumb {
width: 12px;
height: 12px;
border: 0;
border-radius: 50%;
background: var(--accent-primary);
}

.playback-time {
min-width: 30px;
color: var(--text-secondary);
font-size: 0.65rem;
text-align: center;
}

.playback-option {
color: var(--text-muted);
font-size: 0.72rem;
}

.playback-option select {
height: 30px;
padding: 0 4px;
border: 1px solid var(--border-color);
border-radius: 5px;
background: var(--bg-surface);
color: var(--text-secondary);
font: inherit;
font-size: 0.7rem;
}

.volume-slider {
width: 68px;
}

.captions-button {
flex: 0 0 32px;
width: 32px;
height: 30px;
padding: 0;
font-size: 0.72rem;
font-weight: 700;
}

.playback-control:disabled {
cursor: not-allowed;
opacity: 0.55;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  background: var(--bg-app);
  background-image: radial-gradient(#27272a 1px, transparent 1px);
  background-size: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

.video-placeholder.hidden {
  display: none;
}

.placeholder-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px 28px;
  max-width: 440px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.placeholder-box h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.placeholder-box p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cached-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.cached-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.cached-pill:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* Headers & Metadata */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.panel-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.panel-title span:first-child {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.panel-subtitle,
.status-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 400;
}

.mono-badge,
.mono-text {
  font-family: 'JetBrains Mono', monospace;
}

.mono-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 4px;
}

#timestampCountBadge {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Chapters Timeline */
.chapters-timeline-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.chapters-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chapters-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.chapters-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.current-chapter-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-track-wrapper {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
}

.chapter-track-base {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: visible;
}

.chapter-track-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-primary);
  border-radius: 999px;
  pointer-events: none;
  transition: width 0.15s linear;
}

.chapter-markers-container {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.chapter-marker-point {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2.5px solid var(--accent-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, border-color 0.15s ease;
  z-index: 5;
}

.chapter-marker-point:hover {
  transform: translate(-50%, -50%) scale(1.45);
  background: var(--accent-primary);
  z-index: 10;
}

.chapter-marker-point.active {
  background: var(--accent-primary);
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.14);
}

.chapter-marker-point.passed {
  background: var(--accent-primary);
}

.chapter-marker-point::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--accent-primary);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 20;
}

.chapter-marker-point:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.chapter-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.chapter-pills-row::-webkit-scrollbar {
  height: 4px;
}

.chapter-pills-row::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

.chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.chapter-pill:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.chapter-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
}

.chapter-pill-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  opacity: 0.85;
}

/* Workspace Draggable Resizer */
.workspace-resizer {
  width: 12px;
  margin: 0 -6px;
  cursor: col-resize;
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}

.resizer-line {
  width: 2px;
  height: 100%;
  background: var(--border-color);
  transition: background 0.15s ease, width 0.15s ease;
}

.workspace-resizer:hover .resizer-line,
.workspace-resizer.is-dragging .resizer-line {
  background: var(--accent-primary);
  width: 4px;
}

/* ============================================================================
   SIDE INSPECTOR (50% / 50% Exact Grid/Flex Split or 100% Full Height)
   ============================================================================ */
.side-inspector {
  width: var(--side-panel-width, 450px);
  min-width: 340px;
  max-width: 65vw;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.side-inspector.is-dragging,
.side-inspector.is-dragging-vertical {
  transition: none !important;
  user-select: none;
}

/* ----------------------------------------------------------------------------
   TOP HALF: Notes / Concept Map Wrapper
   ---------------------------------------------------------------------------- */
.inspector-top-wrapper {
  height: var(--inspector-top-height, 50%);
  flex: 0 0 var(--inspector-top-height, 50%);
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  overflow: hidden;
  box-sizing: border-box;
  min-height: 120px;
}

/* JAB TOP CLOSED HO -> COMPLETELY HIDE */
.inspector-top-wrapper.hidden {
  display: none !important;
}

/* Horizontal Resizer between Top Notes/Map and Bottom Timestamps */
.inspector-section-resizer {
  height: 10px;
  margin: -5px 0;
  cursor: row-resize;
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  flex-shrink: 0;
}

.resizer-horizontal-line {
  width: 100%;
  height: 2px;
  background: var(--border-color);
  transition: background 0.15s ease, height 0.15s ease;
}

.inspector-section-resizer:hover .resizer-horizontal-line,
.inspector-section-resizer.is-dragging .resizer-horizontal-line {
  background: var(--accent-primary);
  height: 4px;
}

.inspector-top-wrapper.hidden ~ .inspector-section-resizer {
  display: none !important;
}

.inspector-tabs-header {
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-app);
  flex-shrink: 0;
}

.inspector-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.inspector-header-right {
  display: flex;
  align-items: center;
}

.inspector-content {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: calc(100% - 42px);
}

.tab-pane {
  display: none;
  height: 100%;
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
  padding: 12px 14px;
  box-sizing: border-box;
  overflow: hidden;
}

.tab-pane.active {
  display: flex !important;
}

.notes-box {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

/* Textarea poori bachi hui top 50% height ko fill karega */
textarea#studyNotes {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.83rem;
  line-height: 1.55;
  resize: none;
  outline: none;
  box-sizing: border-box;
}

textarea#studyNotes:focus {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

/* Concept Architecture / Diagram inside Top Pane */
.diagram-panel {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.diagram-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mermaid-box {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-surface);
  background-image: radial-gradient(#27272a 1px, transparent 1px);
  background-size: 16px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.mermaid-box.dragging {
  cursor: grabbing;
}

#mermaidZoomTarget {
  transform-origin: center center;
  will-change: transform;
  display: inline-block;
  padding: 20px;
}

#mermaidZoomTarget svg {
  max-width: none !important;
  height: auto !important;
  display: block;
}

.empty-diagram-msg {
  margin: auto;
  color: var(--text-muted);
  font-size: 0.82rem;
  background: var(--bg-surface);
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  pointer-events: none;
}

/* ============================================================================
   BOTTOM HALF: Timestamps Section
   ============================================================================ */
.timestamps-section {
  flex: 1 1 0;
  height: auto;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface);
  border: none;
  border-radius: 0;
  padding: 14px 16px;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* JAB TOP WRAPPER HIDDEN HO -> TIMESTAMPS 100% FULL SCREEN */
.inspector-top-wrapper.hidden ~ .timestamps-section {
  height: 100% !important;
  flex: 1 1 100% !important;
  max-height: 100% !important;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  margin: -14px -16px 0;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-app);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.section-title > span:first-child {
  white-space: nowrap;
}

.timestamp-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.stamp-current-tag {
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.timestamp-form input {
  flex: 1;
  min-width: 0;
  height: 32px;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  border-radius: 5px;
  padding: 0 10px;
}

.btn-save-stamp {
  height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
}

/* Timestamps List fills remaining 50% bottom area completely */
.timestamps-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-width: thin;
}

.timestamps-list::-webkit-scrollbar {
  width: 4px;
}

.timestamps-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

.empty-timestamps-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 8px 2px;
}

.timestamp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.timestamp-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.timestamp-item.active {
  border-color: var(--accent-primary);
  background: #1f1f23;
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.timestamp-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.timestamp-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.timestamp-text {
  font-size: 0.8rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timestamp-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timestamp-delete-btn:hover {
  color: #fca5a5;
  background: #3f1d22;
}

@media (max-width: 900px) {
  .workspace {
    flex-direction: column;
    overflow-y: auto;
  }
  .side-inspector {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 600px;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
}

/* Hidden Elements */
.hidden {
  display: none !important;
}
.lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.65); /* Dark dimmed blur backdrop */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

/* JAB HIDDEN HO -> 100% GAYAB RAHEGA */
.lock-overlay.hidden,
#lockOverlay.hidden,
.hidden {
  display: none !important;
}

.lock-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 440px;
  width: 90%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: lockModalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lockModalPop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lock-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #dc2626;
  letter-spacing: 0.08em;
}

.lock-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.lock-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.lock-card .btn-primary {
  align-self: flex-start;
  height: 36px;
  padding: 0 18px;
  font-weight: 600;
}