/*
  GOOGLE AI STUDIO THEME + REAL VISUAL SLIDE THUMBNAILS ENGINE
  Ultra-clean, minimalist light theme with live 16:9 visual slide thumbnails and full mobile support.
*/

:root {
  --bg-app: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-header: #ffffff;
  --bg-editor: #ffffff;
  --bg-surface: #f8f9fa;
  --bg-hover: #f1f3f4;
  --bg-active: #f1f3f4;
  --border-subtle: #e8eaed;
  --border-strong: #dadce0;
  --text-primary: #1f1f1f;
  --text-secondary: #444746;
  --text-muted: #747775;
  --text-blue: #0b57d0;
  --bg-blue-subtle: #e8f0fe;
  
  --font-ui: "Google Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Roboto Mono", "SF Mono", Menlo, Consolas, "Courier New", monospace;
  
  --header-height: 48px;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

#studio-app {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ==========================================================================
   HEADER (Google Studio Topbar)
   ========================================================================== */
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 16px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
  z-index: 100;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Segmented Toggle (Preview / • Code) */
.tab-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f3f4;
  padding: 3px;
  border-radius: 8px;
  flex-shrink: 0;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

.header-title-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  border-left: 1px solid var(--border-subtle);
  padding-left: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title-badge strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Header Right Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.header-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: #bcc1c8;
}

.header-action-btn.primary {
  background: #0b57d0;
  border-color: #0b57d0;
  color: #ffffff;
}

.header-action-btn.primary:hover {
  background: #0842a0;
}

/* Export Dropdown */
.export-menu-wrap {
  position: relative;
}

.export-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 4px;
  display: none;
  flex-direction: column;
  z-index: 200;
}

.export-dropdown.open {
  display: flex;
}

.export-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.export-item:hover {
  background: var(--bg-hover);
}

/* ==========================================================================
   MAIN VIEWS
   ========================================================================== */
.studio-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
}

.view-pane {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.view-pane.active {
  display: flex;
}

/* ==========================================================================
   PREVIEW TAB & VISUAL SLIDE THUMBNAILS
   ========================================================================== */
#preview-view {
  flex-direction: row;
  background: #06111d;
  position: relative;
}

/* Visual Slide Thumbnails Sidebar */
.slide-thumbs-sidebar {
  width: 260px;
  min-width: 220px;
  max-width: 340px;
  background: #ffffff;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  z-index: 80;
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.slide-thumbs-sidebar.collapsed {
  width: 0;
  min-width: 0;
  border-right: none;
  overflow: hidden;
}

.thumbs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
  flex-shrink: 0;
}

.thumbs-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.thumbs-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.thumbs-count-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #1a73e8;
  background: #e8f0fe;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.thumbs-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8f9fa;
  -webkit-overflow-scrolling: touch;
}

/* Visual Thumbnail Card */
.thumb-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.thumb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 2px;
}

.thumb-num-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.thumb-card.active .thumb-num-badge {
  color: #1a73e8;
}

.thumb-card-title {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.thumb-card.active .thumb-card-title {
  color: #1a73e8;
  font-weight: 600;
}

/* 16:9 Visual Container */
.thumb-preview-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #071a2b;
  border-radius: 6px;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
}

.thumb-card:hover .thumb-preview-wrap {
  border-color: #1a73e8;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
  transform: translateY(-1px);
}

.thumb-card.active .thumb-preview-wrap {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2.5px #1a73e8, 0 4px 12px rgba(26, 115, 232, 0.3);
}

.thumb-preview-stage {
  width: 1920px;
  height: 1080px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  pointer-events: none;
  user-select: none;
}

.thumb-preview-stage .slide {
  display: block !important;
  position: absolute !important;
  width: 1920px !important;
  height: 1080px !important;
  left: 0 !important;
  top: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.thumb-preview-stage .slide * {
  opacity: 1 !important;
  visibility: visible !important;
}

.thumb-preview-stage .briefing-route-base,
.thumb-preview-stage .briefing-route-live,
.thumb-preview-stage .briefing-route-spurs path {
  opacity: 1 !important;
  stroke-dashoffset: 0 !important;
}

.thumb-preview-stage .briefing-route-nodes,
.thumb-preview-stage .briefing-route-spurs,
.thumb-preview-stage .briefing-recap,
.thumb-preview-stage .briefing-phase-list article,
.thumb-preview-stage .briefing-outcome {
  opacity: 1 !important;
  transform: none !important;
}

.thumb-preview-stage .video-intro-overlay,
.thumb-preview-stage .notes,
.thumb-preview-stage .case-signal,
.thumb-preview-stage .hud,
.thumb-preview-stage .overview,
.thumb-preview-stage .help-overlay {
  display: none !important;
}

/* Preview Frame Container */
.preview-frame-container {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #071a2b;
}

/* Floating Sidebar Toggle Button */
.preview-sidebar-toggle-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 70;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(11, 19, 30, 0.85);
  backdrop-filter: blur(8px);
  color: #f0f4f8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
}

.preview-sidebar-toggle-btn:hover {
  background: rgba(11, 19, 30, 0.98);
  border-color: rgba(72, 212, 221, 0.5);
  color: #48d4dd;
}

.slide-thumbs-sidebar:not(.collapsed) ~ .preview-frame-container .preview-sidebar-toggle-btn {
  display: none;
}

/* Mobile Orientation Hint */
.mobile-orientation-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 19, 30, 0.9);
  backdrop-filter: blur(8px);
  color: #f0f4f8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  pointer-events: none;
  animation: fadeInHint 0.3s ease;
}

@keyframes fadeInHint {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   CODE TAB (Google AI Studio Split & Drawer on Mobile)
   ========================================================================== */
#code-view {
  flex-direction: row;
  position: relative;
}

.explorer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
  display: none;
}

.file-explorer {
  width: 260px;
  min-width: 220px;
  max-width: 380px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  z-index: 95;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.explorer-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.explorer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.explorer-search-bar {
  padding: 4px 12px 8px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 8px 6px 28px;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-ui);
}

.search-input-wrap input:focus {
  border-color: var(--text-blue);
  background: #ffffff;
}

.search-icon {
  position: absolute;
  left: 8px;
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

.file-tree {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  -webkit-overflow-scrolling: touch;
}

.tree-row {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 13px;
  transition: background 0.1s ease;
  position: relative;
  white-space: nowrap;
}

.tree-row:hover {
  background: var(--bg-hover);
}

.tree-row.active {
  background: #f1f3f4;
  font-weight: 500;
}

.tree-row .node-arrow {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  color: var(--text-muted);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.tree-row.folder.open > .node-arrow {
  transform: rotate(90deg);
}

.tree-row .svg-icon {
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tree-row .node-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-row .node-menu-btn {
  opacity: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.tree-row:hover .node-menu-btn,
.tree-row.active .node-menu-btn {
  opacity: 1;
}

.folder-children {
  display: none;
}

.folder-children.open {
  display: block;
}

/* ==========================================================================
   CODE EDITOR / VIEWER PANE
   ========================================================================== */
.editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-editor);
  overflow: hidden;
  min-width: 0;
}

.editor-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
  flex-shrink: 0;
  gap: 8px;
}

.editor-tabs-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mobile-explorer-toggle-btn {
  display: none;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.active-tab-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e8f0fe;
  color: #1a73e8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-tools-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.editor-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-ui);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  height: 28px;
}

.editor-tool-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.editor-code-body {
  flex: 1;
  position: relative;
  overflow: auto;
  display: flex;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 20px;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.line-numbers-gutter {
  width: 48px;
  padding: 12px 10px 12px 0;
  text-align: right;
  color: #1a73e8;
  user-select: none;
  font-size: 12px;
  border-right: 1px solid var(--border-subtle);
  background: #ffffff;
  flex-shrink: 0;
}

.line-number {
  height: 20px;
  display: block;
}

.code-highlight-area {
  flex: 1;
  padding: 12px 16px;
  color: #24292f;
  white-space: pre;
  tab-size: 2;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code-highlight-area.wrap-lines {
  white-space: pre-wrap;
  word-break: break-all;
}

.media-preview-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f8f9fa;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.media-preview-image, .media-preview-video {
  max-width: 95%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-subtle);
}

.media-meta-card {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Google Light Code Highlighting Tokens */
.token-keyword { color: #cf222e; font-weight: 600; }
.token-string { color: #0a3069; }
.token-comment { color: #6e7781; font-style: italic; }
.token-function { color: #8250df; }
.token-tag { color: #116329; font-weight: 600; }
.token-attr { color: #0550ae; }
.token-attr-val { color: #0a3069; }
.token-number { color: #0550ae; }
.token-property { color: #116329; }
.token-punctuation { color: #57606a; }
.token-selector { color: #953800; font-weight: 600; }

/* ==========================================================================
   CHANGELOG MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(32, 33, 36, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  max-height: 80dvh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-group h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-title-group span {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.changelog-timeline {
  position: relative;
  padding-left: 20px;
}

.changelog-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item:last-child {
  margin-bottom: 4px;
}

.timeline-dot {
  position: absolute;
  top: 4px;
  left: -20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #1a73e8;
  box-shadow: 0 0 0 2px #ffffff;
}

.timeline-item:first-child .timeline-dot {
  border-color: #1a73e8;
  background: #1a73e8;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.timeline-version {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #1a73e8;
  background: #e8f0fe;
  padding: 1px 6px;
  border-radius: 4px;
}

.timeline-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.timeline-message {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.modal-footer {
  padding: 10px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .studio-header {
    padding: 0 10px;
    height: 44px;
  }

  .header-title-badge {
    display: none;
  }

  .tab-btn {
    padding: 4px 10px;
    font-size: 12px;
  }

  .header-right {
    gap: 5px;
  }

  .header-action-btn {
    height: 28px;
    padding: 0 7px;
    font-size: 11.5px;
  }

  .header-action-btn span.btn-label-long {
    display: none;
  }

  .slide-thumbs-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px;
    max-width: 85vw;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    transform: translateX(-100%);
  }

  .slide-thumbs-sidebar.open-mobile {
    transform: translateX(0);
  }

  .preview-sidebar-toggle-btn {
    display: flex !important;
  }

  .file-explorer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    transform: translateX(-100%);
  }

  .file-explorer.open {
    transform: translateX(0);
  }

  .explorer-backdrop.open {
    display: block;
  }

  .mobile-explorer-toggle-btn {
    display: inline-flex;
  }

  .editor-tabs-bar {
    height: 38px;
    padding: 0 8px;
  }

  .line-numbers-gutter {
    width: 38px;
    padding-right: 6px;
    font-size: 11px;
  }

  .code-highlight-area {
    padding: 10px 12px;
    font-size: 11.5px;
  }

  @media (orientation: portrait) {
    .mobile-orientation-hint {
      display: flex;
    }
  }

  .modal-card {
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 12px 14px;
  }

  .modal-body {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .header-action-btn {
    padding: 0 6px;
  }
  
  .tab-btn {
    padding: 4px 8px;
    font-size: 11.5px;
  }
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

/* Quick Jump Pill for Studio */
.quick-jump-pill {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px) scale(0.95);
  background: rgba(7, 26, 43, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid #27b6c3;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(39, 182, 195, 0.35);
  border-radius: 40px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.quick-jump-pill.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.quick-jump-label {
  font-size: 13px;
  font-weight: 600;
  color: #9eb6c2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quick-jump-num {
  font-family: var(--font-mono, monospace);
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  background: #126a7a;
  padding: 2px 12px;
  border-radius: 8px;
  border: 1px solid #27b6c3;
  min-width: 42px;
  text-align: center;
}

.quick-jump-hint {
  font-size: 12px;
  color: #7c99a5;
}
