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

:root {
  /* Colors */
  --primary:           #FF5A14;
  --primary-hover:     #FF7236;
  --background:        #EEF2F8;
  --bg-card:           rgba(255, 255, 255, 0.95);
  --surface-secondary: #E8EDF5;
  --text-primary:      #1E293B;
  --text-secondary:    #64748B;
  --glass-border:      rgba(255, 255, 255, 0.7);
  
  /* Radii */
  --radius-small:      12px;
  --radius-medium:     18px;
  --radius-large:      24px;
  --radius-xlarge:     30px;

  /* Shadows (Light Mode Spec) */
  --shadow-light:      rgba(255, 255, 255, 0.8);
  --shadow-dark:       rgba(174, 174, 192, 0.2);
  
  --neo-raised:        -8px -8px 20px var(--shadow-light), 8px 8px 20px var(--shadow-dark);
  --neo-raised-sm:     -4px -4px 10px var(--shadow-light), 4px 4px 10px var(--shadow-dark);
  --neo-raised-lg:     -12px -12px 30px var(--shadow-light), 12px 12px 30px var(--shadow-dark);
  --neo-inset:         inset -4px -4px 10px var(--shadow-light), inset 4px 4px 10px var(--shadow-dark);
  --neo-inset-deep:    inset -6px -6px 15px var(--shadow-light), inset 6px 6px 15px var(--shadow-dark);

  --btn-secondary-bg:  #E8EDF5;
  --btn-secondary-bg-hover: #DCE3EE;
  --select-arrow:      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FF5A14' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  --error:             #ef4444;
}

[data-theme="dark"] {
  --background:        #0B0D14;
  --bg-card:           #171A24;
  --surface-secondary: #1E2230;
  --text-primary:      #F4F4F5;
  --text-secondary:    #9AA4BF;
  --glass-border:      rgba(255, 255, 255, 0.03);
  
  /* Shadows (Dark Mode Spec) */
  --shadow-light:      rgba(30, 34, 48, 0.3);
  --shadow-dark:       rgba(0, 0, 0, 0.65);
  
  --neo-raised:        8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
  --neo-raised-sm:     4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  --neo-raised-lg:     12px 12px 30px var(--shadow-dark), -12px -12px 30px var(--shadow-light);
  --neo-inset:         inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
  --neo-inset-deep:    inset 6px 6px 15px var(--shadow-dark), inset -6px -6px 15px var(--shadow-light);

  --btn-secondary-bg:  #1E2230;
  --btn-secondary-bg-hover: #262b3d;
}

/* ── Reset & Transitions ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--background);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  transition: background-color 200ms ease, color 200ms ease;
}

/* ── Layout ──────────────────────────────────────────────────────── */
.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px; /* Compact space */
}

/* ── SVG Icons ───────────────────────────────────────────────────── */
.svg-icon {
  width: 1.25em;
  height: 1.25em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2px;
  display: inline-block;
  vertical-align: middle;
  transition: transform 200ms ease;
}

/* ── Header ──────────────────────────────────────────────────────── */
.header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 8px; /* Extremely small padding to reduce empty space gap */
}
.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header__icon {
  width: 64px;
  height: 64px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--neo-raised-sm);
  color: var(--text-primary);
  flex-shrink: 0;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.header__icon .svg-icon {
  width: 32px;
  height: 32px;
}
.header__title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary) 0%, #FF7A41 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header__subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.5;
  margin-top: 4px;
}
.theme-toggle-btn {
  border-radius: var(--radius-medium);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
}

/* ── Cards (Neumorphic Spec) ─────────────────────────────────────── */
.neo-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
  padding: 26px;
  box-shadow: var(--neo-raised);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.neo-card:hover {
  transform: translateY(-2px); /* Spec hover transform */
  box-shadow: var(--neo-raised-lg);
}
.neo-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.neo-card__icon {
  width: 40px; height: 40px;
  background: var(--surface-secondary);
  border-radius: var(--radius-small);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--neo-inset);
  color: var(--text-primary);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.neo-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

/* Custom Search Card height reduction */
#urlCard {
  padding: 24px;
}

/* ── URL / Search Input Group ────────────────────────────────────── */
.url-input-group {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.url-input-group .neo-input {
  flex: 1;
}
.url-input-group .btn {
  flex-shrink: 0;
  padding: 14px 28px;
  font-weight: 700;
}

.neo-input {
  width: 100%; padding: 14px 20px;
  background: var(--background);
  border: 1px solid var(--glass-border); border-radius: var(--radius-large);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 500;
  outline: none;
  box-shadow: var(--neo-inset);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.neo-input::placeholder { color: var(--text-secondary); opacity: 0.6; }
.neo-input:focus {
  box-shadow: var(--neo-inset-deep);
  border-color: var(--primary);
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-medium);
  font-family: 'Inter', sans-serif; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; border: none; outline: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--btn-secondary-bg);
  color: var(--text-primary);
  box-shadow: var(--neo-raised-sm);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--neo-raised-lg);
}
.btn:active {
  transform: translateY(0) scale(1);
  box-shadow: var(--neo-inset);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--neo-inset) !important;
}

.btn--primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: var(--neo-raised-sm);
}
.btn--primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.btn--success {
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: var(--neo-raised-sm);
}
.btn--success:hover {
  background: var(--primary-hover);
}

.btn--danger {
  background: var(--error);
  color: #ffffff;
  border: none;
  box-shadow: var(--neo-raised-sm);
}
.btn--danger:hover {
  filter: brightness(1.1);
}

.btn--secondary {
  background: var(--btn-secondary-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}
.btn--secondary:hover {
  background: var(--btn-secondary-bg-hover);
}

.btn--full { width: 320px; max-width: 100%; margin: 0 auto; display: flex; justify-content: center; }
.btn--sm { padding: 8px 16px; font-size: 0.8rem; border-radius: var(--radius-small); }

.spinner {
  display: inline-block;
  vertical-align: middle;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Checkboxes ───────────────────────────────────────────────────── */
.neo-checkbox {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary);
  user-select: none;
}
.neo-checkbox input { display: none; }
.neo-checkbox__mark {
  width: 18px; height: 18px;
  background: var(--background);
  border: 1px solid var(--glass-border); border-radius: 6px;
  box-shadow: var(--neo-inset);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  transition: all 200ms ease;
}
.neo-checkbox__mark::after {
  content: ""; width: 5px; height: 9px;
  border: solid #ffffff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  position: absolute; top: 2px;
  transition: transform 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.neo-checkbox input:checked ~ .neo-checkbox__mark {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--neo-raised-sm);
}
.neo-checkbox input:checked ~ .neo-checkbox__mark::after {
  transform: rotate(45deg) scale(1);
}
.neo-checkbox input:checked ~ span:not(.neo-checkbox__mark) {
  color: var(--text-primary);
}

/* ── Selection & Batch Bar ────────────────────────────────────────── */
.batch-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 24px; margin-bottom: 18px;
  background: var(--surface-secondary);
  border: 1px solid var(--glass-border); border-radius: var(--radius-medium);
  box-shadow: var(--neo-inset);
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; margin-bottom: 0;
}
.batch-bar.show {
  opacity: 1; transform: translateY(0); pointer-events: auto;
  height: auto; padding-top: 18px; padding-bottom: 18px; margin-bottom: 18px;
}
.batch-bar__count {
  font-size: 0.88rem; font-weight: 700; color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
}
.batch-bar__selectall { flex-shrink: 0; }
#batchDownloadBtn { margin-left: auto; }

/* ── Search Results & Items ───────────────────────────────────────── */
.search-results-section { display: none; animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.search-results-section.show { display: block; }
.search-count { margin-left: auto; font-size: 0.78rem; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }
.search-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.search-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-large);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--neo-raised-sm);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}
.search-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  z-index: 2;
}
.search-item.selected {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 90, 20, 0.35);
  transform: scale(1.01);
  position: relative !important;
  z-index: 99 !important;
}
[data-theme="dark"] .search-item.selected {
  background: #12151e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 90, 20, 0.45);
}

.search-item:has(.und-dropdown-menu.show) {
  z-index: 999 !important;
}

.search-item__header {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.search-item__options {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 24px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
  animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.search-item.selected .search-item__options {
  display: grid;
}

.item-opt-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-item__checkbox {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-checkbox {
  align-self: center;
  flex-shrink: 0;
}
.search-item__thumb {
  width: 160px; height: 90px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--neo-raised-sm);
  background: var(--surface-secondary);
  position: relative;
  flex-shrink: 0;
  align-self: flex-start;
  transition: all 0.3s ease;
}
.search-item.playing-preview .search-item__header {
  flex-wrap: wrap;
}
.search-item.playing-preview .search-item__thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  order: -1;
  margin-bottom: 12px;
}
.search-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-item__duration {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.75); color: #ffffff;
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
}
.search-item__info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; max-width: 650px; }
.search-item__title {
  font-size: 0.92rem; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item__channel { font-size: 0.78rem; color: var(--primary); font-weight: 600; margin-top: 6px; }
.search-item__views { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }
.search-item__actions { flex-shrink: 0; align-self: center; }
.search-select-btn {
  width: 140px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Custom Dropdown (Universal Dropdown / und-dropdown) ─────────── */
.und-dropdown {
  position: relative;
  width: 100%;
}
.und-dropdown-wrapper {
  position: relative;
  width: 100%;
}
.und-dropdown-button {
  width: 100%;
  min-height: 42px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.und-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999 !important; /* Stack context fix */
  display: none;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-medium);
  box-shadow: var(--neo-raised-lg);
  overflow: hidden;
  max-height: 250px;
  overflow-y: auto;
}
.und-dropdown-menu.show {
  display: block;
  animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.und-dropdown-item {
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.und-dropdown-item:hover {
  background-color: var(--surface-secondary);
  color: var(--primary);
}
.und-dropdown-item.selected {
  background-color: var(--surface-secondary);
  color: var(--primary);
  font-weight: 600;
}

.neo-select {
  width: 100%;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-secondary) var(--select-arrow) no-repeat right 16px center;
  border: 1px solid var(--glass-border); border-radius: var(--radius-medium);
  box-shadow: var(--neo-raised-sm);
  cursor: pointer; outline: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none; -webkit-appearance: none;
  padding-right: 36px;
}
.neo-select:hover { box-shadow: var(--neo-raised-lg); }
.neo-select:active { box-shadow: var(--neo-inset); }

/* ── Single Video Info & Selection ───────────────────────────────── */
.video-info { 
  display: flex; flex-direction: column; gap: 16px;
  margin: 20px 0; padding: 16px;
  background: var(--surface-secondary); 
  border-radius: var(--radius-medium); 
  border: 1px solid var(--glass-border);
}
.video-thumb {
  width: 100%; height: auto; aspect-ratio: 16/9; max-height: 380px;
  border-radius: var(--radius-large); overflow: hidden;
  box-shadow: var(--neo-raised-sm);
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-thumb img, .video-thumb iframe, .video-thumb video {
  width: 100%; height: 100%; object-fit: contain; background: #000; border-radius: var(--radius-large);
}
.video-thumb__loader {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  z-index: 10;
}
.video-meta { min-width: 0; flex: 1; margin-top: 4px; }
.video-meta__title { font-size: 1.12rem; font-weight: 700; margin-bottom: 6px; line-height: 1.4; color: var(--text-primary); }
.video-meta__channel { font-size: 0.9rem; color: var(--primary); font-weight: 600; margin-bottom: 12px; }
.video-meta__stats { display: flex; gap: 16px; }
.video-meta__stat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--text-secondary); font-weight: 500;
}

.format-section { display: none; animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.format-section.show { display: block; }
.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.format-group { display: flex; flex-direction: column; gap: 8px; }
.format-group label { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.mode-toggle {
  display: flex; padding: 6px; background: var(--surface-secondary);
  border-radius: var(--radius-medium); box-shadow: var(--neo-inset);
  margin-top: 22px;
  margin-bottom: 20px;
}
.mode-toggle__btn {
  flex: 1; padding: 12px; border-radius: var(--radius-small);
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
  color: var(--text-secondary); border: none; background: transparent;
  cursor: pointer; transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mode-toggle__btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--neo-raised-sm);
}

/* ── Progress Section ─────────────────────────────────────────────── */
.progress-section { display: none; animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.progress-section.show { display: block; }
.progress-bar-container {
  width: 100%; height: 12px; background: var(--surface-secondary);
  border-radius: 99px; box-shadow: var(--neo-inset);
  overflow: hidden; margin: 18px 0; border: 1px solid var(--glass-border);
}
.progress-bar {
  width: 0%; height: 100%; background: linear-gradient(90deg, var(--primary) 0%, #FF7A41 100%);
  border-radius: 99px; transition: width 0.15s linear;
}
.progress-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.progress-percent { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.progress-details { display: flex; gap: 18px; }
.progress-detail {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
}
.progress-status { font-size: 0.88rem; color: var(--text-secondary); text-align: center; font-weight: 500; }

/* ── Batch Queue ─────────────────────────────────────────────────── */
.batch-progress-section { display: none; animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.batch-progress-section.show { display: block; }
.batch-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.batch-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.batch-header-left .neo-card__icon {
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}
.batch-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}
.batch-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.batch-queue { display: flex; flex-direction: column; gap: 14px; }
.batch-item {
  padding: 24px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; gap: 16px;
  transition: all 200ms ease;
}
.batch-item.active {
  border-color: rgba(255, 122, 65, 0.4);
  box-shadow: 0 0 0 1px var(--primary), 0 6px 20px rgba(255, 122, 65, 0.08);
}
.batch-summary-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-secondary); padding: 12px 18px;
  border-radius: var(--radius-medium); margin-top: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--neo-inset);
}
.batch-summary-stats { display: flex; align-items: center; gap: 16px; }
.batch-summary-stat { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); }
.batch-summary-stat-text { display: flex; flex-direction: column; line-height: 1.1; }
.batch-summary-num { font-size: 1.1rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.batch-summary-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.batch-summary-divider { width: 1px; height: 30px; background: var(--glass-border); margin: 0 4px; }
.batch-progress-details { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.batch-progress-stats { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.batch-progress-stat { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.batch-progress-stat-stack { display: flex; flex-direction: column; line-height: 1.3; }
.batch-progress-stat-stack span:first-child { color: var(--text-primary); font-weight: 700; }
.batch-progress-stat-stack span:last-child { font-size: 0.7rem; color: var(--text-tertiary); text-transform: uppercase; font-family: 'Inter', sans-serif; letter-spacing: 0.5px; }
.batch-item__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.batch-item__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.batch-item__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-secondary);
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  flex-shrink: 0;
}
.batch-item__thumb {
  width: 68px;
  height: 40px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-small);
  overflow: hidden;
  position: relative;
  background: #000;
  flex-shrink: 0;
  box-shadow: var(--neo-raised-sm);
}
.batch-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.batch-item__type-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: 3px;
  padding: 1px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.batch-item__type-badge .svg-icon {
  width: 10px;
  height: 10px;
}
.batch-item__text {
  min-width: 0;
  flex: 1;
}
.batch-item__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.batch-item__meta-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.batch-item__badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
.batch-item__badge--mode {
  color: var(--primary);
  font-weight: 700;
}
.batch-item__badge--clip {
  color: #ff9800;
}
.batch-item__actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.batch-item__status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 200ms ease;
}
.batch-item__status.pending {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}
.batch-item__status.downloading {
  background: rgba(255, 90, 31, 0.12);
  color: var(--primary);
  border: 1px solid rgba(255, 90, 31, 0.3);
  animation: pulseStatus 1.5s infinite ease-in-out;
}
.batch-item__status.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.batch-item__status.failed {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.batch-item__save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--neo-raised-sm);
  transition: all 150ms ease;
}
.batch-item__save-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--neo-raised-md);
}
.batch-item__progress { width: 100%; height: 8px; background: var(--bg-card); border-radius: 99px; overflow: hidden; }
.batch-item__progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--primary) 0%, #FF7A41 100%); border-radius: 99px; transition: width 0.15s linear; }

@keyframes pulseStatus {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

/* ── Dialog Overlays / Screens ────────────────────────────────────── */
.download-complete { display: none; text-align: center; padding: 36px 20px; animation: slideUp 250ms cubic-bezier(0.4, 0, 0.2, 1); }
.download-complete.show { display: block; }
.complete-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: #10b981; color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: bold;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}
.complete-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; color: var(--text-primary); }
.complete-filename { font-size: 0.88rem; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; margin-bottom: 24px; padding: 10px 16px; background: var(--surface-secondary); border-radius: var(--radius-small); display: inline-block; word-break: break-all; max-width: 100%; }

.cancelled-section { display: none; text-align: center; padding: 36px 20px; }
.cancelled-section.show { display: block; }
.cancelled-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--text-secondary); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto 16px;
}
.cancelled-title { font-weight: 700; font-size: 1.15rem; margin-bottom: 4px; }
.cancelled-subtitle { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 14px; }

.error-section { display: none; animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.error-section.show { display: block; }
.error-box { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: var(--background); border-radius: var(--radius-large); border: 1px solid var(--glass-border); box-shadow: var(--neo-inset); }
.error-box__icon { color: var(--error); flex-shrink: 0; }
.error-box__message { font-size: 0.9rem; color: var(--error); line-height: 1.5; font-weight: 500; }

/* ── History List ────────────────────────────────────────────────── */
.history-section {
  display: block;
}
.history-list {
  list-style: none;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--glass-border);
}
.history-item:last-child {
  border-bottom: none;
}
.history-item__info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.history-item__icon {
  width: 44px; height: 44px; border-radius: var(--radius-small);
  background: var(--surface-secondary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--neo-raised-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
  font-size: 1.1rem; flex-shrink: 0;
}
.history-item__text {
  min-width: 0;
  flex: 1;
}
.history-item__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item__meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.history-item__btn {
  width: auto;
  min-width: 110px;
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}

.history-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.history-empty__icon {
  font-size: 1.8rem;
  opacity: 0.4;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

/* ── Toast ────────────────────────────────────────────────────────── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-medium);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--neo-raised-lg);
  color: var(--text-primary);
  font-size: 0.88rem; font-weight: 500;
  animation: toastIn 200ms cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 360px;
}
.toast.removing { animation: toastOut 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ── Scrollbars ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-hover); }

/* ── Responsive Animations & Grid ────────────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Clip / Duration Section ───────────────────────────────────────── */
.duration-cut-section {
  margin-top: 20px;
  margin-bottom: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-border);
}

.clip-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.clip-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: color 150ms ease;
  letter-spacing: 0.2px;
}

.clip-section-title:hover {
  color: var(--primary);
}

/* ── Modern Horizontal Toggle Switch ───────────────────────────────── */
.modern-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 28px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.modern-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.modern-toggle__track {
  position: relative;
  width: 48px;
  height: 28px;
  background: var(--surface-secondary);
  border-radius: 99px;
  box-shadow: var(--neo-inset);
  border: 1px solid var(--glass-border);
  transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms ease, border-color 200ms ease;
  display: flex;
  align-items: center;
}

.modern-toggle__thumb {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: #64748B; /* Dark/gray knob when OFF */
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), background-color 300ms ease, box-shadow 300ms ease;
}

[data-theme="dark"] .modern-toggle__thumb {
  background: #94A3B8;
}

/* Toggle ON State */
.modern-toggle__input:checked + .modern-toggle__track {
  background: #FF5A1F; /* orange #ff5a1f track */
  border-color: #FF5A1F;
}

.modern-toggle__input:checked + .modern-toggle__track .modern-toggle__thumb {
  transform: translate(20px, -50%);
  background: #FFFFFF; /* White circular knob shifted right */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

.modern-toggle__input:focus-visible + .modern-toggle__track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── Collapsible Clip Controls Container ────────────────────────────── */
.duration-cut-inputs {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
  max-height: 600px;
  opacity: 1;
  overflow: visible;
  transition: max-height 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease, margin-top 200ms ease;
}



/* ── Dual Range Slider & Floating Badges ───────────────────────────── */
.range-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 6px 8px;
}

.range-slider-container {
  position: relative;
  width: 100%;
  padding: 8px 0;
}

.range-slider {
  position: relative;
  width: 100%;
  height: 8px;
  background: #E2E8F0; /* Unselected light gray */
  border-radius: 99px;
  box-shadow: var(--neo-inset);
}

[data-theme="dark"] .range-slider {
  background: #1E2230;
}

.range-slider__track {
  position: absolute;
  height: 100%;
  background: #FF5A1F; /* Selected orange range */
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(255, 90, 31, 0.4);
}

.range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 0;
  -webkit-appearance: none;
  appearance: none;
  background: none;
  pointer-events: none;
  margin: 0;
  top: 50%;
  transform: translateY(-50%);
  outline: none;
  z-index: 4;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF; /* Circular white drag handle */
  border: 2.5px solid #FF5A1F;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(255, 255, 255, 0.8);
  cursor: grab;
  pointer-events: auto;
  transition: transform 150ms ease, box-shadow 150ms ease;
  z-index: 5;
  position: relative;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255, 90, 31, 0.35);
}

.range-slider input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.22);
  box-shadow: 0 4px 14px rgba(255, 90, 31, 0.5), 0 0 0 4px rgba(255, 90, 31, 0.25);
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid #FF5A1F;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(255, 255, 255, 0.8);
  cursor: grab;
  pointer-events: auto;
  transition: transform 150ms ease, box-shadow 150ms ease;
  z-index: 5;
  position: relative;
}

.range-slider input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255, 90, 31, 0.35);
}

.range-slider input[type="range"]::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.22);
  box-shadow: 0 4px 14px rgba(255, 90, 31, 0.5), 0 0 0 4px rgba(255, 90, 31, 0.25);
}

/* Floating Handle Badges */
.slider-handle-badge {
  position: absolute;
  top: -28px;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--neo-raised-sm);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 6;
  transition: left 60ms linear, transform 150ms ease;
}

.slider-handle-badge::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--bg-card);
}

.slider-handle-badge--start {
  color: #FF5A1F;
}

.slider-handle-badge--end {
  color: #FF5A1F;
}

.range-slider__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0 2px;
}

.range-slider__label-item {
  font-family: 'JetBrains Mono', monospace;
}

.range-slider__duration-badge {
  background: var(--surface-secondary);
  border: 1px solid var(--glass-border);
  padding: 3px 10px;
  border-radius: 99px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--neo-inset);
}

/* ── Neumorphic Time Inputs Row & Steppers ───────────────────────────── */
.clip-time-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  margin-top: 6px;
}

.clip-time-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clip-time-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.clip-time-label__format {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.75;
}

.clip-input-card {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-medium);
  box-shadow: var(--neo-inset);
  border: 1.5px solid var(--glass-border);
  padding: 4px 6px 4px 12px;
  transition: all 200ms ease;
  position: relative;
}

.clip-input-card:focus-within {
  border-color: #FF5A1F;
  box-shadow: var(--neo-inset-deep), 0 0 0 3px rgba(255, 90, 31, 0.15);
}

.clip-input-icon {
  color: var(--primary);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clip-input-icon .svg-icon {
  width: 18px;
  height: 18px;
}

.clip-time-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  padding: 8px 4px;
  letter-spacing: 0.5px;
}

.clip-input-stepper {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 26px;
  background: var(--surface-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.stepper-btn {
  background: transparent;
  border: none;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: background-color 150ms ease, color 150ms ease;
}

.stepper-btn:first-child {
  border-bottom: 1px solid var(--glass-border);
}

.stepper-btn svg {
  width: 10px;
  height: 10px;
}

.stepper-btn:hover {
  background: rgba(255, 90, 31, 0.12);
  color: var(--primary);
}

.stepper-btn:active {
  background: var(--primary);
  color: #FFFFFF;
}

/* ── Download Action Button ────────────────────────────────────────── */
.download-action-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
}

.btn--download {
  background: linear-gradient(135deg, #FF5A1F 0%, #FF7236 100%);
  color: #FFFFFF;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 13px 32px;
  border-radius: var(--radius-medium);
  width: 280px;
  max-width: 100%;
  box-shadow: 0 8px 20px rgba(255, 90, 31, 0.28), 0 2px 6px rgba(255, 90, 31, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--download:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #FF6A2F 0%, #FF8046 100%);
  box-shadow: 0 12px 28px rgba(255, 90, 31, 0.38), 0 4px 10px rgba(255, 90, 31, 0.22);
}

.btn--download:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(255, 90, 31, 0.22);
}

.btn--download:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  filter: grayscale(20%);
}

.btn--download .download-icon {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .app-container { padding: 16px 14px 36px; gap: 16px; }
  .header__title { font-size: 1.5rem; }
  .header__icon { width: 52px; height: 52px; border-radius: var(--radius-medium); }
  .header__icon .svg-icon { width: 26px; height: 26px; }
  .neo-card { padding: 18px; }
  #urlCard { padding: 16px; }
  .url-input-group { flex-direction: column; align-items: stretch; }
  .url-input-group .btn { width: 100%; }
  .video-info { flex-direction: column; }
  .video-thumb { width: 100%; min-width: unset; height: auto; aspect-ratio: 16/9; }
  .format-grid { grid-template-columns: 1fr; }
  .btn--download { width: 100%; }
  .clip-time-inputs-row { gap: 12px; }
  .clip-section-title { font-size: 0.92rem; }
  .clip-section-desc { font-size: 0.78rem; }
  .search-item__header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
  }
  .search-item__checkbox {
    flex: 0 0 auto;
    align-self: center;
  }
  .search-item__thumb {
    flex: 1 1 calc(100% - 40px);
    width: auto;
    height: 160px;
    border-radius: 14px;
    order: 0;
  }
  .search-item__info {
    flex: 1 1 100%;
    min-width: 0;
  }
  .search-item__title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.4;
  }
  .search-item__actions {
    flex: 1 1 100%;
  }
  .search-select-btn {
    width: 100% !important;
    height: 42px;
  }
  .search-item__options { grid-template-columns: 1fr; }
  .batch-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  #batchDownloadBtn { margin-left: 0; width: 100%; }
  .toast-container { top: 12px; right: 12px; left: 12px; }
  .toast { max-width: 100%; }
  .progress-info { flex-direction: column; gap: 8px; align-items: flex-start; }
  
  /* Stacking history button under details on mobile devices */
  .history-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .history-item__btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .clip-time-inputs-row { grid-template-columns: 1fr; }
}