@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #0c1524;
  --card: #111b2f;
  --card-strong: #0b1323;
  --text: #e8edf7;
  --muted: #9fb1d0;
  --primary: #4f8bff;
  --primary-strong: #2f6fe6;
  --border: #1f2a3d;
  --success: #3dd598;
  --warning: #f8d477;
  --danger: #ff6b6b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at 10% 20%, #13213a, #0a1020 40%),
    radial-gradient(circle at 80% 0%, #1c2b4a, transparent 45%),
    linear-gradient(180deg, #0c1424, #070d1a 60%, #03060c);
  color: var(--text);
  min-height: 100vh;
}

#app {
  max-width: none; /* Full width canvas */
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.page {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.02), transparent),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: visible; /* Allow content to extend */
}

.page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(79, 139, 255, 0.08), transparent 50%);
}

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

.title h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(79, 139, 255, 0.12);
  border: 1px solid rgba(79, 139, 255, 0.25);
}

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

button,
.button {
  border: 1px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease,
    background 0.12s ease;
}

button.primary,
.button.primary {
  background: var(--primary);
  border-color: var(--primary-strong);
  color: #0b1020;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 139, 255, 0.5);
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.tablist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--card-strong);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  border-right: 1px solid var(--border);
}

.tab:last-child {
  border-right: none;
}

.tab.active {
  color: var(--text);
  background: linear-gradient(
    180deg,
    rgba(79, 139, 255, 0.15),
    rgba(79, 139, 255, 0.02)
  );
}

.content {
  padding: 20px 24px 28px;
}

.upload {
  border: 1px dashed var(--border);
  padding: 20px;
  border-radius: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.upload strong {
  color: var(--text);
}

.status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
}

.status__pill {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
}

.status__pill.success {
  color: var(--success);
  border-color: rgba(61, 213, 152, 0.4);
}

.status__pill.warn {
  color: var(--warning);
  border-color: rgba(248, 212, 119, 0.4);
}

.layout-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.layout-row .muted {
  color: var(--muted);
}

.slide-list {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.slide-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-strong);
}

.slide-badge {
  min-width: 60px;
  text-align: center;
}

.slide-card.selected {
  border-color: rgba(79, 139, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(79, 139, 255, 0.25);
}

.slide-card.skipped {
  opacity: 0.4;
}

.slide-card.skipped .thumb {
  text-decoration: line-through;
}

.skip-btn {
  margin-left: auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
}

.skip-btn:hover {
  opacity: 1;
}

.slide-card .thumb {
  position: relative;
  width: 180px;
  height: 135px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f2f50, #152038);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 18px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.slide-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9px;
}

.slide-card .thumb .thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

/* Loading animation for thumbnails without images */
@keyframes thumb-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.slide-card .thumb .thumb-placeholder.loading {
  animation: thumb-pulse 1.5s ease-in-out infinite;
}

.hover-preview-portal {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid var(--primary);
  overflow: hidden;
  padding: 4px;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-100%, -50%) scale(0.95); }
  to { opacity: 1; transform: translate(-100%, -50%) scale(1); }
}

.hover-preview-image {
  max-width: 750px;
  max-height: 550px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.hover-preview-summary {
  max-width: 750px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Picker hover preview (in outline editor) */
.picker-hover-preview {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid var(--primary);
  overflow: hidden;
  padding: 4px;
  animation: fadeInUp 0.15s ease-out;
}

.picker-hover-summary {
  max-width: 350px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* View transcription button on slide card */
.view-transcription-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(61, 213, 152, 0.3);
  border: 1px solid rgba(61, 213, 152, 0.5);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
  z-index: 10;
}

.view-transcription-btn:hover {
  background: rgba(61, 213, 152, 0.6);
}

.slide-card .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.badge {
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge.edited {
  color: var(--warning);
  border-color: rgba(248, 212, 119, 0.4);
}

.summary {
  color: var(--text);
  font-size: 14px;
  margin: 4px 0 10px;
}

.textarea {
  width: 100%;
  min-height: 80px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0a1323;
  color: var(--text);
  padding: 10px;
  resize: vertical;
  font-family: inherit;
}

.input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0a1323;
  color: var(--text);
  padding: 8px 10px;
  font-family: inherit;
}

.input.number {
  max-width: 80px;
}

.input.range {
  max-width: 140px;
}

.muted {
  color: var(--muted);
}

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

.directive-form {
  border: 1px solid var(--border);
  background: var(--card-strong);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.list {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-strong);
}

.list__item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.list__item:last-child {
  border-bottom: none;
}

.outline-item,
.report-block {
  border: 1px solid var(--border);
  background: var(--card-strong);
  border-radius: 12px;
  padding: 12px;
}

.stack {
  display: grid;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
  align-items: start;
}

.main-pane {
  position: relative;
  min-height: 600px;
  overflow: auto;
}

.canvas-content {
  position: relative;
  display: flex;
  gap: 24px;
  transform-origin: top left;
  min-width: max-content;
}

.side-pane {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-strong);
  padding: 12px;
  max-height: 80vh;
  overflow: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform: translateX(4px);
}

.side-pane:not(.open) {
  opacity: 0.4;
}

.canvas-area {
  position: relative;
  user-select: none;
}

.selection-rect {
  position: absolute;
  border: 1px dashed rgba(79, 139, 255, 0.7);
  background: rgba(79, 139, 255, 0.1);
  pointer-events: none;
  top: 0;
  left: 0;
}

.composer {
  position: absolute;
  width: 320px;
  max-width: 90vw;
  z-index: 10;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.drag-handle {
  cursor: grab;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  color: var(--muted);
  font-size: 14px;
}

.canvas-area.list-mode {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Slides start at left edge of this container */
  margin-left: 50%; /* Push container to center - slides sit RIGHT of center line */
}

.directives-overlay {
  position: relative;
  width: 400px;
  flex-shrink: 0;
  pointer-events: none;
}

.directive-line {
  position: absolute;
  left: 0;
  width: 2px;
  border-left: 2px solid var(--primary);
}

.directive-label {
  position: absolute;
  top: 0;
  left: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #0b1020;
  font-weight: 600;
  font-size: 14px;
  min-width: 140px;
  max-width: 320px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  cursor: pointer;
  transition: max-width 0.2s ease-out;
}

.directive-label::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 14px;
  border: 8px solid transparent;
  border-right-color: var(--arrow-color, currentColor);
}

.directive-label.expanded {
  width: 340px;
  max-width: 340px;
  white-space: normal;
  z-index: 5;
}

.directive-label .delete-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  background: #ff6b6b;
  color: white;
  border: 2px solid var(--card);
  opacity: 0;
  transition: opacity 0.15s;
}

.directive-label:hover .delete-btn {
  opacity: 1;
}

.composer-bubble {
  position: absolute;
  left: 0;
  width: 360px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  z-index: 10;
}

.composer-arrow {
  position: absolute;
  left: -8px;
  top: 16px;
  border: 8px solid transparent;
  border-right-color: var(--border);
}

.composer-arrow::after {
  content: "";
  position: absolute;
  left: -6px;
  top: -7px;
  border: 7px solid transparent;
  border-right-color: var(--card);
}

.composer-input {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  resize: none;
}

.composer-input::placeholder {
  color: var(--muted);
}

.composer-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

button.small {
  padding: 6px 12px;
  font-size: 12px;
}

button.danger {
  background: #ff6b6b;
  border-color: #e55555;
  color: white;
}

.directive-text {
  display: block;
}

.directive-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.directive-edit {
  width: 100%;
}

.directive-edit-input {
  width: 100%;
  min-height: 50px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.9);
  color: #0b1020;
  font-family: inherit;
  font-size: 13px;
  resize: none;
}

.directive-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.small {
  font-size: 12px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}

.checkbox {
  width: 16px;
  height: 16px;
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #4f8bff, #32d6ff);
}

.toast {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

.alert {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.alert.warn {
  border-color: rgba(248, 212, 119, 0.4);
  color: var(--warning);
}

.alert.danger {
  border-color: rgba(255, 107, 107, 0.4);
  color: var(--danger);
}

/* Transcription UI */
.slide-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.badge.running {
  background: rgba(79, 139, 255, 0.2);
  color: var(--primary);
  animation: pulse 1.5s ease-in-out infinite;
}

.badge.success {
  background: rgba(61, 213, 152, 0.2);
  color: var(--success);
}

.badge.danger {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.transcription-preview {
  margin-top: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  max-height: 200px;
  overflow-y: auto;
}

.transcription-preview .summary {
  color: var(--muted);
  line-height: 1.4;
}

.transcription-preview .full-text {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--text);
  white-space: pre-wrap;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 10px;
  max-height: 150px;
  overflow-y: auto;
}

.layout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

/* Recovery Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--text);
}

.modal p {
  margin: 0 0 16px;
  color: var(--muted);
}

.modal-info {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.modal-info div {
  margin-bottom: 6px;
}

.modal-info div:last-child {
  margin-bottom: 0;
}

.modal-info strong {
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-actions button {
  flex: 1;
  min-width: 140px;
}

/* =============================================================================
   OUTLINE VIEW IMPROVEMENTS
   ============================================================================= */

/* Better contrast for inputs */
.input, .textarea {
  background: #1a2639;
  border: 1px solid #2f456b;
}

.input:focus, .textarea:focus {
  border-color: var(--primary);
  outline: none;
}

/* Better contrast for muted text */
.muted {
  color: #b8c7db;
}

/* Bigger section cards */
.outline-item {
  background: #1a2844; /* Lighter than page background for contrast */
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid #2a3f5f; /* Visible border */
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Section title input - prominent */
.section-title-input {
  font-size: 18px !important;
  font-weight: 600 !important;
  padding: 14px 16px !important;
  background: #0f1724 !important;
  border: 1px solid #2f456b !important;
}

.section-title-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(79, 139, 255, 0.2) !important;
}

/* Section label styling */
.outline-item .small.muted {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7a8da8;
  font-weight: 500;
}

/* AI description block */
.ai-description {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid #3d5a80;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #9fb1c9;
}

/* Constrained width container for Outline/Report views */
.content-constrained {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px;
  background: #0a1220; /* Darker background for contrast with cards */
  border-radius: 12px;
  min-height: 400px;
}

/* Markdown rendered preview styles */
.markdown-rendered h1 {
  font-size: 1.75em;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a3f5f;
}

.markdown-rendered h2 {
  font-size: 1.4em;
  margin: 24px 0 12px 0;
  color: #e2e8f0;
}

.markdown-rendered h3 {
  font-size: 1.15em;
  margin: 20px 0 8px 0;
  color: #d1d9e3;
}

.markdown-rendered p {
  margin: 0 0 12px 0;
}

.markdown-rendered ul, .markdown-rendered ol {
  margin: 0 0 12px 0;
  padding-left: 24px;
}

.markdown-rendered li {
  margin: 4px 0;
}

.markdown-rendered code {
  background: #1a2332;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}

.markdown-rendered pre {
  background: #1a2332;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
}

.markdown-rendered pre code {
  background: none;
  padding: 0;
}

.markdown-rendered blockquote {
  border-left: 3px solid #6366f1;
  margin: 12px 0;
  padding-left: 16px;
  color: #9fb1c9;
}

.markdown-rendered hr {
  border: none;
  border-top: 1px solid #2a3f5f;
  margin: 24px 0;
}

.markdown-rendered a {
  color: #6366f1;
  text-decoration: none;
}

.markdown-rendered a:hover {
  text-decoration: underline;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--card-strong);
  border-radius: 12px;
  border: 2px dashed #2f456b;
}

.empty-state h2 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.empty-state p {
  max-width: 400px;
  margin: 0 auto 20px;
}

/* Thinking pulse animation */
.thinking-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Segmented control for length weight */
.segment-control {
  display: flex;
  background: #0f1724;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  border: 1px solid #2f456b;
}

.segment-btn {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--muted);
  transition: all 0.15s;
  font-weight: 500;
}

.segment-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.segment-btn.active {
  background: var(--primary);
  color: #0b1020;
  font-weight: 600;
}

/* Slide picker */
.slide-picker-trigger {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px dashed #2f456b;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  transition: all 0.15s;
  background: #0f1724;
}

.slide-picker-trigger:hover {
  background: rgba(255,255,255,0.02);
  border-color: var(--primary);
}

.slide-chip {
  background: var(--primary);
  color: #0b1020;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.slide-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
  padding: 12px;
  background: #0f1724;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid var(--border);
}

.slide-toggle {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.15s;
}

.slide-toggle:hover {
  border-color: var(--primary);
  color: var(--text);
}

.slide-toggle.selected {
  background: var(--success);
  color: #0b1323;
  border-color: var(--success);
  font-weight: 700;
}

/* Section title input - bigger */
.section-title-input {
  font-size: 16px;
  font-weight: 600;
  padding: 10px 12px;
}

/* Modal overlay and transcription modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.transcription-modal {
  background: #0d1525;
  border: 1px solid #2a3f5f;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.transcription-modal .modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #2a3f5f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0a1220;
}

.transcription-modal .modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.transcription-modal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.transcription-modal .modal-close:hover {
  color: var(--text);
}

.transcription-modal .modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.transcription-modal .summary-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1f2a3d;
}

.transcription-modal .summary-section p {
  margin: 8px 0 0 0;
}

.transcription-modal .full-text-section strong {
  display: block;
  margin-bottom: 8px;
}

.transcription-modal .transcription-text {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.7;
  background: #0a1220;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #1f2a3d;
  margin: 0;
  color: #c9d1d9;
  max-height: 400px;
  overflow-y: auto;
}









