*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #1a1a1e;
  --bg-secondary: #24242a;
  --bg-elevated: #2e2e36;
  --bg-surface: #3a3a44;
  --text-primary: #e8e8ec;
  --text-secondary: #a0a0aa;
  --text-muted: #6e6e78;
  --accent: #6c8cff;
  --border: #383840;
  --white: #ffffff;
  --black: #1a1a1e;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  /* Allow scrolling for admin */
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* ---------- LOGIN ---------- */
#login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
  /* Lock scroll for app sections */
  padding: 24px;
  background: var(--bg-primary);
}

#login-screen h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  margin-bottom: 32px;
  text-transform: uppercase;
}

#login-screen input {
  width: 100%;
  max-width: 320px;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-secondary);
  outline: none;
  transition: border-color 0.2s;
}

#login-screen input:focus {
  border-color: var(--accent);
}

#login-screen button:not(.pw-toggle) {
  width: 100%;
  max-width: 320px;
  height: 50px;
  margin-top: 16px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--accent);
  cursor: pointer;
  transition: opacity 0.2s;
}

#login-screen button:not(.pw-toggle):active {
  opacity: 0.7;
}

#login-error {
  margin-top: 12px;
  font-size: 13px;
  color: #ef5350;
  min-height: 20px;
}

/* Shared: gap between stacked inputs */
#login-screen input + input,
#register-screen input + input {
  margin-top: 12px;
}

/* ---------- PASSWORD TOGGLE ---------- */
.pw-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin-top: 12px;
}

.pw-wrap input {
  width: 100%;
  max-width: 100%;
  padding-right: 44px; /* room for the eye button */
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.pw-toggle:hover,
.pw-toggle:focus {
  color: var(--text-secondary);
  outline: none;
}

.pw-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ---------- REGISTER SCREEN ---------- */
#register-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-primary);
}

#register-screen h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  margin-bottom: 32px;
  text-transform: uppercase;
}

#register-screen input {
  width: 100%;
  max-width: 320px;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-secondary);
  outline: none;
  transition: border-color 0.2s;
}

#register-screen input:focus {
  border-color: var(--accent);
}

#register-screen textarea {
  width: 100%;
  max-width: 320px;
  min-height: 90px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-secondary);
  outline: none;
  resize: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

#register-screen textarea:focus {
  border-color: var(--accent);
}

#register-screen textarea::placeholder {
  color: var(--text-muted);
}

#register-screen button:not(.pw-toggle) {
  width: 100%;
  max-width: 320px;
  height: 50px;
  margin-top: 16px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--accent);
  cursor: pointer;
  transition: opacity 0.2s;
}

#register-screen button:not(.pw-toggle):active {
  opacity: 0.7;
}

#register-error {
  margin-top: 12px;
  font-size: 13px;
  color: #ef5350;
  min-height: 20px;
  max-width: 320px;
  text-align: center;
}

/* ---------- WAITING SCREEN ---------- */
#waiting-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 32px;
  background: var(--bg-primary);
  text-align: center;
  gap: 20px;
}

#waiting-screen h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  text-transform: uppercase;
}

#waiting-msg {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 280px;
  line-height: 1.6;
}

/* ---------- SHARED AUTH HELPERS ---------- */
.auth-link-row {
  margin-top: 6px;
}

.auth-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.auth-link:hover {
  color: var(--text-primary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}



/* ---------- APP SCREEN ---------- */
#app-screen {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  /* Lock scroll for app sections */
  background: var(--bg-primary);
}

/* ---------- TABS ---------- */
.tab-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: calc(var(--safe-top) + 9px) 16px 9px 16px;
  /* Reduced by 25% */
  min-height: 0;
  flex-shrink: 0;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  padding: 6px 16px;
  /* Reduced vertical padding */
  border-radius: 8px;
}

.tab-btn.active {
  color: var(--accent);
  background: var(--bg-primary);
}

/* ---------- PREVIEW ---------- */
.preview-area {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#capture-canvas {
  display: none;
}

/* ---------- GRID OVERLAY ---------- */
.grid-overlay {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.grid-overlay.visible {
  display: block;
}

.grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
}

.grid-line.vertical {
  width: 1px;
  height: 100%;
  top: 0;
}

.grid-line.vertical.line-1 {
  left: 33.33%;
}

.grid-line.vertical.line-2 {
  left: 66.66%;
}

.grid-line.horizontal {
  width: 100%;
  height: 1px;
  left: 0;
}

.grid-line.horizontal.line-1 {
  top: 33.33%;
}

.grid-line.horizontal.line-2 {
  top: 66.66%;
}

/* ---------- FOCUS INDICATOR ---------- */
.focus-ring {
  position: absolute;
  width: 70px;
  height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.4);
  opacity: 0;
  z-index: 15;
  transition: none;
}

.focus-ring.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.25s ease-out, opacity 0.15s;
}

.focus-ring.fade {
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

/* ---------- ZOOM SLIDER ---------- */
.zoom-panel {
  display: none;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 0 20px;
  height: 48px;
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.zoom-panel.visible {
  display: flex;
}

.zoom-label {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  min-width: 30px;
  text-align: center;
}

.zoom-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 48px;
  background: transparent;
  outline: none;
  margin: 0;
  cursor: pointer;
}

/* Make the invisible track massive (48px tall) but visually just a small gray line in the middle */
.zoom-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 48px;
  background: linear-gradient(to bottom, transparent 22px, #888888 22px, #888888 26px, transparent 26px);
  border: none;
}

.zoom-slider::-moz-range-track {
  width: 100%;
  height: 48px;
  background: linear-gradient(to bottom, transparent 22px, #888888 22px, #888888 26px, transparent 26px);
  border: none;
}

/* Center the thumb on the 48px invisible track */
.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  /* 48/2 = 24. 20/2 = 10. Margin = 24 - 10 = 14px */
  margin-top: 14px; 
}

.zoom-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ---------- WAVEFORM ---------- */
#waveform-container {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

#waveform-canvas {
  width: 90%;
  height: 120px;
}

/* ---------- FILE AREA ---------- */
#file-area {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  padding: 16px;
  background: var(--bg-primary);
  overflow-y: auto;
  gap: 16px;
  z-index: 10;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 160px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  padding: 24px;
  text-align: center;
  flex-shrink: 0;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.drop-zone p {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 500;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

.upload-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
}

.upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.upload-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.upload-status {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.upload-status.error {
  color: #ef5350;
}

.upload-status.completed {
  color: #4CAF50;
}

.upload-progress-container {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s;
}

.upload-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.upload-speed {
  font-variant-numeric: tabular-nums;
}

.upload-cancel-btn {
  background: transparent;
  border: none;
  color: #ef5350;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.upload-cancel-btn:hover {
  background: rgba(239, 83, 80, 0.1);
}

/* ---------- TIMER ---------- */
#rec-timer {
  display: none;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: #ff4444;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  z-index: 10;
}

/* ---------- CONTROLS ---------- */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 0 16px;
  /* Removed vertical padding */
  height: 68px;
  /* Set a fixed smaller height (e.g. 48px, about 40% less than original padded height) */
  overflow: visible;
  /* Allow the large 64px buttons to spill out */
  flex-shrink: 0;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  /* Increased by 100% */
  height: 48px;
  /* Increased by 100% */
  border: none;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 26px;
  /* Scaled up icon equivalent */
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.ctrl-btn:active {
  background: var(--bg-surface);
}

.ctrl-btn svg {
  width: 22px;
  /* Increased by 100% */
  height: 22px;
  /* Increased by 100% */
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Record button */
#btn-record {
  width: 64px;
  /* Increased by 100% */
  height: 64px;
  /* Increased by 100% */
  border-radius: 50%;
  border: 3px solid var(--bg-surface);
  /* Scaled border */
  background: transparent;
  position: relative;
  cursor: pointer;
}

#btn-record::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #e53935;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: border-radius 0.2s, transform 0.2s;
}

#btn-record:active::after {
  transform: translate(-50%, -50%) scale(0.92);
}

#btn-record.recording::after {
  border-radius: 12px;
  transform: translate(-50%, -50%) scale(0.5);
  /* Shrinks by 25% while staying a square */
}

/* Capture button (photo) */
#btn-capture {
  width: 64px;
  /* Increased by 100% */
  height: 64px;
  /* Increased by 100% */
  border-radius: 50%;
  border: 3px solid var(--bg-surface);
  /* Scaled border */
  background: transparent;
  position: relative;
}

#btn-capture::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  /* Increased by 100% */
  height: 52px;
  /* Increased by 100% */
  border-radius: 50%;
  background: var(--white);
  border: none;
}

#btn-capture:active::after {
  opacity: 0.6;
}

/* ---------- TOAST ---------- */
#toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 100;
}

#toast.show {
  opacity: 1;
}

/* ---------- STEALTH ---------- */
body.stealth-active #app-screen {
  background: #000000 !important;
}

body.stealth-active .tab-bar,
body.stealth-active .controls-bar,
body.stealth-active .preview-area,
body.stealth-active #waveform-container,
body.stealth-active #rec-timer,
body.stealth-active #toast {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ---------- ADMIN DASHBOARD ---------- */
.admin-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #e8e8ec;
  -webkit-user-select: text;
  user-select: text;
}

.admin-container h1 {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #383840;
  color: #e8e8ec;
}

.user-folder {
  margin-bottom: 8px;
}

.folder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #24242a;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
  min-height: 44px;
  color: #e8e8ec;
}

.folder-header:hover {
  background: #3a3a44;
}

.folder-header .arrow {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid #e8e8ec;
  border-bottom: 2px solid #e8e8ec;
  transform: rotate(-45deg);
  transition: transform 0.2s;
}

.folder-header.open .arrow {
  transform: rotate(45deg);
}

.folder-files {
  display: none;
  padding-left: 20px;
}

.folder-header.open+.folder-files {
  display: block;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #2e2e36;
  font-size: 13px;
  min-height: 44px;
  color: #e8e8ec;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  word-break: break-all;
}

.file-meta {
  font-size: 11px;
  color: #a0a0aa;
}

.file-actions {
  margin-left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn {
  padding: 6px 14px;
  border: 1px solid #383840;
  border-radius: 4px;
  background: #2e2e36;
  font-size: 12px;
  font-weight: 500;
  color: #e8e8ec;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 32px;
}

.download-btn:hover {
  background: #3a3a44;
}

.file-row.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.file-row.locked .download-btn:not(.btn-force-stop) {
  pointer-events: none;
  opacity: 0.4;
}

.file-row.locked .btn-force-stop {
  pointer-events: auto;
  opacity: 1;
}

/* Blinking green dot */
.lock-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #43a047;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.admin-empty {
  text-align: center;
  padding: 48px 16px;
  color: #a0a0aa;
  font-size: 14px;
}

.admin-status {
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #24242a;
  border-radius: 6px;
  font-size: 12px;
  color: #a0a0aa;
}

/* ---------- MODAL ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-content {
  background: var(--bg-elevated);
  width: 100%;
  max-width: 340px;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.modal-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-row label {
  font-size: 13px;
  color: var(--text-secondary);
}

.setting-row select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
}

.modal-close-btn {
  margin-top: 12px;
  height: 48px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.modal-close-btn:active {
  opacity: 0.8;
}

/* ---------- ADMIN ACTIONS ---------- */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}

.btn-icon:hover {
  background: #2e2e36;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #a0a0aa;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.15s;
}

.btn-icon.delete:hover svg {
  stroke: #ff4444;
}

.folder-actions {
  margin-left: auto;
  margin-right: 8px;
}

/* ---------- MEDIA PREVIEW ---------- */
#preview-container video,
#preview-container audio,
#preview-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}

/* ---------- RESPONSIVE LAYOUT SCALING (LANDSCAPE) ---------- */
@media (orientation: landscape) and (max-height: 600px) {
  .tab-bar {
    padding: calc(var(--safe-top) + 6px) 16px 6px 16px;
    gap: 12px;
  }

  .tab-btn {
    font-size: 11px;
    padding: 6px 12px;
  }

  .controls-bar {
    padding: 0px 16px;
    height: 50.6px;
    /* Increased by 25% from 40.5px */
    overflow: visible;
    /* Let buttons spill out */
    align-items: center;
  }

  .ctrl-btn {
    width: 35px;
    /* Increased by 75% from 20px */
    height: 35px;
    /* Increased by 75% from 20px */
    margin: 0 4px;
    /* Restore gap as margin so they space out */
  }

  .ctrl-btn svg {
    width: 16px;
    /* Increased by 75% from 9px */
    height: 16px;
    /* Increased by 75% from 9px */
  }

  #btn-record,
  #btn-capture {
    width: 45.5px;
    height: 45.5px;
    margin: 0 4px;
  }

  /* Make sure landscape recording button animation works */
  #btn-record.recording::after {
    transform: translate(-50%, -50%) scale(0.75);
  }

  /* Record button pseudo-element inherits 100% width/height and 50% scaling natively */

  #btn-capture::after {
    width: 37px;
    height: 37px;
  }

  .zoom-panel {
    min-width: 200px;
    padding: 6px 16px;
    bottom: 8px;
  }
}

/* ---------- RESUME DIALOG ---------- */
#resume-dialog {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: resumeFadeIn 0.2s ease-out;
}

#resume-dialog.visible {
  display: flex;
}

@keyframes resumeFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.resume-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.resume-card-danger {
  border-color: rgba(239, 83, 80, 0.4);
}

.resume-icon {
  font-size: 32px;
  margin-bottom: 4px;
  line-height: 1;
}

.resume-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin: 0;
}

.resume-msg {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.55;
  margin: 4px 0 8px;
}

.resume-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.resume-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.resume-btn:active {
  opacity: 0.75;
  transform: scale(0.98);
}

.resume-btn-yes {
  background: var(--accent);
  color: #fff;
}

.resume-btn-no {
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.resume-btn-danger {
  background: #c62828;
  color: #fff;
}

.resume-btn-secondary {
  background: var(--bg-surface);
  color: var(--text-secondary);
}