@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Syne:wght@400;600;700;800&display=swap");

body {
  --ifv-bg: #eee;
  --surface: #dedede;
  --surface2: #fff;
  --border: #666;
  --accent: #f00;
  --accent2: #2ad501;
  --accent-hover:#ff5a5a;
  --text: #444;
  --muted: #292937;
  --danger: #ff4d6d;
  --radius: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --icon-color:#292937;
  --btn-color:#fff;
}
body.dark {
  --ifv-bg: #0a0a0f;
  --surface: #111118;
  --surface2: #1a1a24;
  --border: #2a2a3a;
  --accent: #f00;
  --accent2: #2ad501;
  --accent-hover:#ff5a5a;
  --text: #e8e8f0;
  --muted: #9d9daf;
  --danger: #ff4d6d;
  --radius: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --icon-color:#9d9daf;
  --btn-color:#eee;
}
@media (prefers-color-scheme:dark) {
  body {
    --ifv-bg: #0a0a0f;
    --surface: #111118;
    --surface2: #1a1a24;
    --border: #2a2a3a;
    --accent: #f00;
    --accent2: #2ad501;
    --accent-hover:#ff5a5a;
    --text: #e8e8f0;
    --muted: #9d9daf;
    --danger: #ff4d6d;
    --radius: 10px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
    --icon-color:#9d9daf;
    --btn-color:#eee;
  }
  body.light {
    --ifv-bg: #eee;
    --surface: #dedede;
    --surface2: #fff;
    --border: #666;
    --accent: #f00;
    --accent2: #2ad501;
    --accent-hover:#ff5a5a;
    --text: #444;
    --muted: #292937;
    --danger: #ff4d6d;
    --radius: 10px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
    --icon-color:#292937;
    --btn-color:#fff;
  }
}


html,
body {
  touch-action: manipulation;
}

/* ═══════════════════════════════
     HEADER
  ═══════════════════════════════ */
.app-div{
  display:none;
  background: var(--ifv-bg);
  color: var(--text);
}
.app-div .header-a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 20px;
  padding-top: calc(2px + var(--safe-top));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}
.app-logo {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.app-logo span {
  color: var(--accent);
}
.badge {
  font-size: 0.6rem;
  background: var(--accent2);
  color: #fff;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════
     APP LAYOUT
  ═══════════════════════════════ */
.app-div{
  position:fixed;
  top:0;
  left:0;
  width:100vw;
  height:100vh;
  overflow:hidden;
  z-index: 16550;
}
.app {
  display: flex;
  width:100vw;
  height: calc(100vh - 29px);
  height: calc(100dvh - 29px);
  font-family: "DM Mono", monospace;
}
.app * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.main-a {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ═══════════════════════════════
     SIDEBAR SECTIONS
  ═══════════════════════════════ */
.s-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.s-label {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: "Syne", sans-serif;
  font-weight: 600;
}

/* ═══════════════════════════════
     BUTTONS
  ═══════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-weight: 500;
  user-select: none;
  -webkit-user-select: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--btn-color);
  width: 100%;
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
}
.btn-accent2 {
  background: var(--accent2);
  color: var(--btn-color);
  width: 100%;
}
.btn-danger {
  width: 30px;
  height: 30px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  font-size: 0.7rem;
  padding: 7px 7px 9px 7px;
  border-radius: 15px;
}
.btn:disabled {
  opacity: 0.32;
  pointer-events: none;
}
.btn:active {
  transform: scale(0.97);
  filter: brightness(1.1);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
  }
  .btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .btn-accent2:hover {
    background: #249e05;
  }
  .btn-danger:hover {
    background: var(--danger);
    color: #fff;
  }
}

/* ═══════════════════════════════
     INPUTS
  ═══════════════════════════════ */
.input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.input:focus {
  border-color: var(--accent2);
}
.input::placeholder {
  color: var(--muted);
}
select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b85' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ═══════════════════════════════
     SIZE GRID
  ═══════════════════════════════ */
.size-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 10px;
}
.size-btn {
  padding: 8px 5px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  line-height: 1.4;
}
.size-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 245, 62, 0.06);
}
.custom-size {
  display: flex;
  gap: 6px;
  align-items: center;
}
.custom-size .input {
  flex: 1;
  min-width: 0;
}
.custom-size span {
  color: var(--muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.url-row {
  display: flex;
  gap: 6px;
}
.url-row .input {
  flex: 1;
  min-width: 0;
}
.url-row .btn {
  width: auto;
  padding: 10px 12px;
  flex-shrink: 0;
}

/* ═══════════════════════════════
     VIDEO AREA
  ═══════════════════════════════ */
.video-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ifv-bg);
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 28px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  max-width: 360px;
  width: 90%;
}
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(200, 245, 62, 0.04);
}
.drop-icon {
  font-size: 2.5rem;
}
.drop-title {
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}
.drop-sub {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}
#videoEl {
  max-width: 100%;
  max-height: 100%;
  display: none;
  border-radius: 4px;
}

/* ═══════════════════════════════
     VIDEO CONTROLS
  ═══════════════════════════════ */
.controls {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
  flex-direction: column;
}
.controls.hidden {
  display: none;
}
.controls-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.controls-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-display {
  margin-top: -5px;
  font-size: 0.7rem;
  color: var(--muted);
  min-width: 100px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
#seekBar {
  width: 100%;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 2px;
}
.markers-track {
  position: relative;
  height: 7px;
  background: transparent;/*var(--surface2);*/
  border-radius: 4px;
  overflow: hidden;
}
.marker-dot {
  position: absolute;
  width: 3px;
  height: 100%;
  background: var(--accent);
  top: 0;
  transform: translateX(-50%);
  border-radius: 2px;
}

.ctrl-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
  flex-shrink: 0;
  user-select: none;
}
.ctrl-btn:active {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(0.92);
}
@media (hover: hover) {
  .ctrl-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}
.ctrl-btn.capture {
  background: var(--accent);
  color: var(--btn-color);
  border-color: var(--accent);
  width: auto;
  padding: 0 14px;
  gap: 6px;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
}
.ctrl-btn.capture:active {
  background: #d90f0f;
  transform: scale(0.96);
}
.ctrl-btn.capture:disabled {
  opacity: 0.35;
  pointer-events: none;
}
.frame-counter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--muted);
  flex-shrink: 0;
}
.frame-counter .num {
  color: var(--accent);
  font-weight: 500;
}

/* ═══════════════════════════════
     THUMBNAILS
  ═══════════════════════════════ */
.thumbs-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.thumb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.thumb-item img {
  width: 60px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.thumb-meta {
  flex: 1;
  overflow: hidden;
}
.thumb-time {
  font-size: 0.62rem;
  color: var(--accent);
  font-weight: 500;
}
.thumb-idx {
  font-size: 0.58rem;
  color: var(--muted);
}
.empty-thumbs {
  text-align: center;
  color: var(--muted);
  font-size: 0.68rem;
  padding: 20px 8px;
  line-height: 1.9;
}

/* ═══════════════════════════════
     SIDEBAR ACTIONS
  ═══════════════════════════════ */
.sidebar-actions {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  background: var(--surface);
}
.sidebar-actions .btn {
  flex: 1;
}

/* ═══════════════════════════════
     PREVIEW MODAL
  ═══════════════════════════════ */
.modal-overlay-v {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.87);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay-v.open {
  display: flex;
}
.modal-v {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: var(--safe-bottom);
  position: relative;
}
/* drag handle */
.modal-v::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
@media (min-width: 721px) {
  .modal-overlay-v {
    align-items: center;
  }
  .modal-v {
    border-radius: 16px;
    width: min(960px, 92vw);
    max-height: 88vh;
    padding-bottom: 0;
  }
  .modal-v::before {
    display: none;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-header-v {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title-v {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.modal-sub-v {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
}
.modal-close-v {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-body-v {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.preview-grid-v {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.preview-card-v {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: border-color 0.15s;
  position: relative;
}
.preview-card-v.selected {
  border-color: var(--accent);
}
.preview-card-v.selected::after {
  content: "✓";
  position: absolute;
  top: 7px;
  right: 7px;
  background: var(--accent);
  color: #0a0a0f;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.preview-card-v canvas {
  width: 100%;
  height: auto;
  display: block;
}
.preview-info-v {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-time-v {
  font-size: 0.65rem;
  color: var(--accent);
}
.preview-size-label-v {
  font-size: 0.58rem;
  color: var(--muted);
}
.modal-footer-v {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.footer-info-v {
  font-size: 0.7rem;
  color: var(--muted);
}
.footer-btns-v {
  display: flex;
  gap: 8px;
}
.footer-btns-v .btn {
  width: auto;
  font-size: 0.75rem;
  padding: 9px 14px;
}

/* ═══════════════════════════════
     TOAST
  ═══════════════════════════════ */
.toast {
  position: fixed;
  bottom: calc(20px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 20px;
  border-radius: 30px;
  font-size: 0.75rem;
  z-index: 300;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast.ok {
  border-color: var(--accent);
  color: var(--accent);
}
.toast.err {
  border-color: var(--danger);
  color: var(--danger);
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* ═══════════════════════════════
     QUICK CAPTURE BUTTON
  ═══════════════════════════════ */
.ctrl-btn.quick-capture {
  background: linear-gradient(135deg, #ff6b35, #ff4d6d);
  color: #fff;
  border-color: transparent;
  width: auto;
  padding: 0 14px;
  gap: 6px;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.ctrl-btn.quick-capture::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity 0.15s;
}
.ctrl-btn.quick-capture:hover::before {
  opacity: 1;
}
.ctrl-btn.quick-capture:active {
  transform: scale(0.96);
}
.ctrl-btn.quick-capture:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ── QUICK PREVIEW MODAL ── */
.qmodal-overlay-v {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 250;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.qmodal-overlay-v.open {
  display: flex;
}

.qmodal-v {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: min(480px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.qmodal-header-v {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.qmodal-title-v {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qmodal-title-v .pill {
  font-size: 0.58rem;
  background: linear-gradient(135deg, #ff6b35, #ff4d6d);
  color: #fff;
  padding: 2px 7px;
  border-radius: 20px;
  font-family: "DM Mono", monospace;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.qmodal-close-v {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qmodal-body-v {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.qmodal-preview-v {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--ifv-bg);
  position: relative;
}
.qmodal-preview-v canvas {
  width: 100%;
  height: auto;
  display: block;
}
.qmodal-meta-v {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.68rem;
  color: var(--muted);
}
.qmodal-meta-v .qtime {
  color: var(--accent);
  font-weight: 500;
}
.qmodal-meta-v .qsize {
  color: var(--muted);
}

.qmodal-footer-v {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 991px) and (orientation: landscape) {
  .qmodal-footer-v {
    position: fixed;
    top: 60px;
    right: 0;
    width: 100px;
    flex-direction: column;
    padding: 12px 6px;
  }
}

.qmodal-footer-v .btn {
  flex: 1;
}
.btn-save-quick {
  background: linear-gradient(135deg, #ff6b35, #ff4d6d);
  color: #fff;
  border: none;
}
.btn-save-quick:active {
  transform: scale(0.97);
  filter: brightness(1.1);
}
.btn-also-add {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.72rem;
}
.btn-also-add:active {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 720px) {
  .ctrl-btn.quick-capture {
    padding: 0 10px;
  }
  .qmodal-v {
    border-radius: 16px;
  }
}

/* ══════════════════════════════════════════════════════
     MOBILE (≤ 720px)  —  sidebar becomes a bottom panel
  ══════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .badge {
    display: none;
  }
  .app-div header-a {
    padding: 11px 16px;
    padding-top: calc(11px + var(--safe-top));
  }
  .logo {
    font-size: 1.05rem;
  }

  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    overflow: hidden;
    order: 2;
    flex-shrink: 0;
  }
  .main-a {
    order: 1;
    flex: 1;
    min-height: 0;
  }

  /* ── TAB NAV ── */
  .tab-nav {
    display: flex;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .tab-btn {
    flex: 1;
    padding: 10px 4px;
    font-family: "DM Mono", monospace;
    font-size: 0.58rem;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    letter-spacing: 0.04em;
    user-select: none;
  }
  .tab-btn .tab-icon {
    font-size: 1.05rem;
  }
  .tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  /* ── TAB PANELS ── */
  .tab-panel {
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 36vh;
  }
  .tab-panel.active {
    display: block;
  }

  /* ── CONTROLS mobile ── */
  .controls {
    padding: 10px 12px;
    gap: 8px;
  }
  .controls-top {
    width: 100%;
    order: 0;
    flex: none;
  }
  .controls-bottom {
    width: 100%;
    order: 1;
  }

  .ctrl-btn {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .ctrl-btn.capture {
    flex: 1;
    height: 44px;
    font-size: 0.82rem;
    padding: 0 10px;
  }
  .frame-counter {
    font-size: 0.62rem;
    min-width: 34px;
  }
  .time-display {
    min-width: 76px;
    font-size: 0.62rem;
  }

  /* drop zone */
  .drop-zone {
    padding: 24px 20px;
    gap: 10px;
  }
  .drop-icon {
    font-size: 2rem;
  }
  .drop-title {
    font-size: 0.9rem;
  }

  /* sidebar actions */
  .sidebar-actions {
    margin-top: 0;
    padding: 10px 12px;
  }

  /* preview grid 2 cols on small screens */
  .preview-grid-v {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* desktop: no tab nav, panels always visible */
@media (min-width: 721px) {
  .tab-nav {
    display: none;
  }
  .tab-panel {
    display: block !important;
    max-height: none;
    overflow: visible;
  }
  .controls-top {
    flex: 1;
  }
  .controls-bottom {
    flex: none;
  }
  .sidebar-actions {
    margin-top: auto;
  }
}


@media (min-width: 992px){
  #continueVideoDiv {
      padding: 20px;
      font-size: 24px;
  }
}
#continueVideoDiv {
    display:none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    z-index: 2;
    font-size: 14px;
    text-align: center;
    flex-direction: column;
    align-items: center;
}
.btn-new-video{
  padding: 10px 20px;
  border: none;
  font-size: 16px;
  background-color: #09f;
  color: #fff;
  border-radius: 10px;
}