:root {
  --bg: #06080f;
  --gradient: radial-gradient(1000px 700px at 50% -10%, #182032 0%, #0a0f1a 60%, #06080f 100%);
  --panel: rgba(17, 22, 34, 0.8);
  --panel-2: rgba(12, 17, 28, 0.75);
  --text: #e8ecf4;
  --muted: #9aa7bd;
  --brand: #7cc4ff;
  --brand-2: #4a9ffd;
  --ok: #1de5a0;
  --warn: #ffd166;
  --err: #ff5d66;
  --border: rgba(124,196,255,0.18);
  --glow: 0 0 24px rgba(124,196,255,0.25);
  --shadow: 0 24px 60px rgba(0,0,0,0.45);
  --glass-blur: saturate(140%) blur(10px);
}

html[data-theme="light"] {
  --bg: #edf2ff;
  --gradient: radial-gradient(1000px 700px at 50% -10%, #e8f0ff 0%, #edf2ff 60%, #f5f7ff 100%);
  --panel: rgba(255,255,255,0.9);
  --panel-2: rgba(255,255,255,0.85);
  --text: #0c1220;
  --muted: #4b5563;
  --brand: #3b82f6;
  --brand-2: #2563eb;
  --ok: #0ea5a0;
  --warn: #f59e0b;
  --err: #ef4444;
  --border: rgba(59,130,246,0.25);
  --glow: 0 0 16px rgba(59,130,246,0.25);
  --shadow: 0 24px 50px rgba(0,0,0,0.12);
  --glass-blur: saturate(120%) blur(8px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: var(--gradient), var(--bg);
}

.container { 
  max-width: 1150px; 
  margin: 40px auto; 
  padding: 5px 20px 40px;
  transition: all 0.3s ease;
  position: relative;
}

.main-content {
  width: 100%;
  transition: all 0.3s ease;
}

.header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  padding: 14px 20px;
}
.header-actions { display: flex; gap: 10px; }

h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: 0.2px; }
h2 { margin: 0 0 12px; font-size: 18px; }
h3 { margin: 10px 0; }

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

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.card { padding: 18px; }
.panel {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: var(--glass-blur);
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.field input[type="url"], .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 12px;
  background: transparent; color: var(--text); padding: 10px 12px; outline: none;
}

.required { color: var(--err); }

.dropzone {
  width: 100%;
  border: 2px dashed var(--border);
  border-radius: 14px; padding: 18px; outline: none;
  transition: 0.2s border, 0.2s background, 0.2s box-shadow, 0.2s transform;
  cursor: pointer;
  box-sizing: border-box;
}
.dropzone:hover,
.dropzone:has(.link:hover) {
  border-color: var(--brand);
  box-shadow: 0 0 24px rgba(124,196,255,0.4), 0 0 48px rgba(124,196,255,0.2);
  background: rgba(124,196,255,0.08);
  transform: translateY(-2px);
}
.dropzone.drag { border-color: var(--brand); box-shadow: var(--glow); background: rgba(124,196,255,0.06); }
.dz-body { 
  display: flex; 
  align-items: center; 
  /* justify-content: center; */
  gap: 12px; 
  width: 100%;
}
.dz-icon { font-size: 28px; }
.dz-title { font-weight: 700; }
.dz-sub { color: var(--muted); }
.dz-file { margin-top: 10px; font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }

.divider { margin: 14px 0; text-align: center; color: var(--muted); position: relative; }
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border);
}
.divider::before { left: 0; } .divider::after { right: 0; }
.divider span { background: var(--panel-2); padding: 0 8px; }

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

.btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 9px 14px; border-radius: 12px; cursor: pointer;
}
.btn.primary { background: linear-gradient(180deg, var(--brand), var(--brand-2)); color: #061019; border: none; font-weight: 700; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.link { background: none; border: none; color: var(--brand-2); cursor: pointer; text-decoration: underline; padding: 0; }

.progress-label { margin-top: 4px; font-size: 12px; color: var(--muted); }
.progress {
  width: 100%; height: 12px; border-radius: 999px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--ok));
  box-shadow: var(--glow); transition: width 0.2s ease;
}
.progress-info { margin-top: 8px; color: var(--muted); }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

.stepper { list-style: none; padding-left: 0; margin: 12px 0 0; }
.step { position: relative; padding-left: 28px; margin: 6px 0; color: var(--muted); }
.step::before { content: "•"; position: absolute; left: 6px; top: 0; font-size: 20px; color: var(--muted); }
.step.done { color: var(--ok); }
.step.done::before { content: "✓"; color: var(--ok); }
.step.active { color: var(--text); }
.step.active::before { content: "●"; color: var(--brand); }

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Creates two equal columns */
  gap: 1rem; /* Adds some space between the list and the log box */
  align-items: start; /* Aligns both items to the top */
}

.status-log .log {
  margin: 10px 0 0; padding: 10px; height: 160px; overflow: auto;
  background: transparent; border: 1px solid var(--border); border-radius: 12px;
}

.results-pre {
  white-space: pre-wrap; word-wrap: break-word; margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  min-height: 200px; max-height: 50vh; overflow: auto;
  background: transparent; border: 1px solid var(--border); border-radius: 12px; padding: 10px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 16px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  font-size: 14px;
  max-width: 320px;
  line-height: 1.4;
}

.toast.toast-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast.toast-error {
  background: rgba(255, 93, 102, 0.15);
  border-color: var(--err);
  color: var(--err);
  box-shadow: 0 12px 30px rgba(255, 93, 102, 0.25);
}

.chip {
  border: 1px solid var(--border); background: transparent; border-radius: 999px;
  padding: 6px 10px; font-size: 12px; color: var(--muted); cursor: pointer; margin-right: 6px;
}
.chip:hover { color: var(--text); border-color: var(--brand); }

.tabs { 
  display: flex; 
  gap: 6px; 
  margin-bottom: 16px; 
}
/* body.history-panel-open .tabs {
  justify-content: center;
} */
.tab {
  padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: all 0.2s ease; font-weight: 500;
}
.tab:hover { color: var(--text); border-color: var(--brand); }
.tab.active { color: var(--text); border-color: var(--brand); box-shadow: var(--glow); background: rgba(124,196,255,0.08); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.table-wrap { margin-top: 6px; }
.table {
  width: 100%; border-collapse: collapse; font-size: 14px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
}
.table th, .table td { padding: 10px; border-bottom: 1px solid var(--border); }
.table th { text-align: left; color: var(--muted); }
.table tr:hover { background: rgba(124,196,255,0.06); }

.summary { white-space: pre-wrap; }


.hidden {
  display: none !important;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: 1.5rem;
  margin-top: 1rem;
}

.video-container {
  width:100%;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-container {
  max-height: 60vh;
  overflow-y: auto;

  padding-right: 10px; 
}

.summary .error-card {
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

html[data-theme="dark"] .summary .error-card {
  background: rgba(30, 35, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary .error-card:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .summary .error-card:hover {
  background: rgba(35, 40, 50, 1);
}

.error-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 0;
  height: 30px;
}

.error-card-header-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 30px;
}

.error-card-header-content .mono {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
}

html[data-theme="dark"] .error-card-header-content .mono {
  color: #fff;
}

.error-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
  height: 60px;
}

.error-card-timestamp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Error Tag/Pill Component */
.error-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: transparent;
  border: 2px solid rgba(59, 130, 246, 0.5);
  font-size: 12px;
  font-weight: 500;
  color: #3b82f6;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.error-tag:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.7);
}

.error-tag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: transparent;
  font-size: 12px;
  flex-shrink: 0;
}

.error-tag-label {
  font-weight: 600;
  color: inherit;
}

.error-tag-value {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.error-tag-timestamp {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

/* Error Tag Variants */
.error-tag.error-type {
  background: transparent;
  border: 2px solid rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

.error-tag.error-type .error-tag-icon {
  background: transparent;
  color: #ef4444;
}

.error-tag.error-type .error-tag-label {
  color: #ef4444;
}

.error-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 0;
}

.error-card-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.error-card-column .error-label {
  font-size: 11px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

html[data-theme="dark"] .error-card-column .error-label {
  color: #fff;
}

.error-card-column .error-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  color: #000;
  min-height: 50px;
}

html[data-theme="dark"] .error-card-column .error-text {
  color: #fff;
}

.error-card-column.subtitle .error-text {
  background: rgba(255, 200, 200, 0.4);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

html[data-theme="dark"] .error-card-column.subtitle .error-text {
  background: rgba(255, 93, 102, 0.15);
  border: 1px solid rgba(255, 93, 102, 0.4);
}

.error-card-column.correction .error-text {
  background: rgba(200, 255, 220, 0.4);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

html[data-theme="dark"] .error-card-column.correction .error-text {
  background: rgba(29, 229, 160, 0.15);
  border: 1px solid rgba(29, 229, 160, 0.4);
}

.error-card-menu {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  height:70px;
}

.error-card-menu-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0 8px 0 6px; /* Rounded top-right corner matches card */
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.error-card-menu-btn:hover {
  background: rgba(124, 196, 255, 0.1);
  border-color: var(--brand);
  color: var(--brand);
}

.error-card-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  z-index: 1000;
  min-width: 110px;
  overflow: hidden;
  padding: 4px 0;
  white-space: nowrap;
}

.error-card-menu-dropdown.hidden {
  display: none;
}

.error-card-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.error-card-menu-item:hover {
  background: rgba(124, 196, 255, 0.1);
  color: var(--text);
}

.error-card-menu-item.edit-btn {
  color: #f97316;
}

.error-card-menu-item.edit-btn:hover {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.error-card-menu-item.delete-btn {
  color: var(--err);
}

.error-card-menu-item.delete-btn:hover {
  background: rgba(255, 93, 102, 0.1);
  color: var(--err);
}

.error-card-menu-item-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}

.error-card-menu-item.delete-btn .error-card-menu-item-icon {
  opacity: 1;
}

/* Edit Form Styles */
.error-edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.error-edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.error-edit-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.error-edit-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.error-edit-input:focus {
  border-color: var(--brand);
}

.error-edit-input textarea,
textarea.error-edit-input {
  min-height: 60px;
  resize: vertical;
}

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


@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: 1fr; 
  }
  .sidebar-container {
    max-height: 40vh; 
  }
  body.history-panel-open {
    padding-left: 0;
  }
  body.history-panel-open .container {
    max-width: 1150px;
  }
  .history-panel:not(.hidden) {
    width: 100%;
    max-width: 320px;
  }
}

/* History Panel Styles */
.history-panel {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s ease;
  opacity: 0;
  z-index: 100;
}

.history-panel.hidden {
  width: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
}

.history-panel:not(.hidden) {
  width: 280px;
  padding: 12px;
  opacity: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

body.history-panel-open {
  padding-left: 280px;
}

body.history-panel-open .container {
  max-width: 1150px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.history-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-tab {
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  position: relative;
  transition: color 0.2s ease;
}

.history-tab.active {
  color: var(--brand);
}

.history-tab.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.history-item:hover {
  background: rgba(124, 196, 255, 0.1);
  border-color: var(--brand);
}

.history-item-name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-menu {
  position: relative;
  z-index: 10;
}

.history-item-menu-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.history-item-menu-btn:hover {
  color: var(--text);
  background: rgba(124, 196, 255, 0.1);
}

.history-item-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: rgb(17, 22, 34);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 1000;
  min-width: 120px;
  overflow: hidden;
  padding: 4px 0;
  white-space: nowrap;
}

html[data-theme="light"] .history-item-menu-dropdown {
  background: rgb(255, 255, 255);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.history-item-menu-dropdown.hidden {
  display: none;
}

.history-item-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.history-item-menu-item:hover {
  background: rgba(124, 196, 255, 0.1);
  color: var(--text);
}

.history-item-menu-item.share-btn {
  color: var(--brand);
}

.history-item-menu-item.share-btn:hover {
  background: rgba(124, 196, 255, 0.15);
  color: var(--brand);
}

.history-item-menu-item.delete-btn {
  color: var(--err);
}

.history-item-menu-item.delete-btn:hover {
  background: rgba(255, 93, 102, 0.15);
  color: var(--err);
}

.history-item-menu-item-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.history-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.storage-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.storage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.storage-label {
  color: var(--text);
  font-weight: 500;
}

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

.storage-progress-container {
  width: 100%;
}

.storage-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.storage-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--ok));
  border-radius: 999px;
  transition: width 0.3s ease;
  box-shadow: 0 0 4px rgba(124, 196, 255, 0.4);
}

.storage-progress-bar.warning {
  background: linear-gradient(90deg, var(--warn), #ff8c42);
}

.storage-progress-bar.danger {
  background: linear-gradient(90deg, var(--err), #ff3333);
}

/* Particles Toggle */
.particles-toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-close-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.history-close-btn:hover {
  background: rgba(124, 196, 255, 0.1);
  border-color: var(--brand);
  color: var(--brand);
}

.particles-toggle-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.particles-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  outline: none;
}

.particles-toggle:focus {
  box-shadow: 0 0 0 2px rgba(124, 196, 255, 0.3);
}

.particles-toggle.active {
  background: var(--brand);
  border-color: var(--brand);
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text);
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.particles-toggle.active .toggle-slider {
  transform: translateX(20px);
}

/* Progress Modal */
.progress-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.progress-modal.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.progress-modal-content {
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.progress-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  text-align: center;
  position: relative;
}

.progress-modal-close-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  z-index: 10;
}

.progress-modal-close-btn:hover {
  background: rgba(255, 93, 102, 0.1);
  border-color: var(--err);
  color: var(--err);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(124, 196, 255, 0.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-modal-header h2 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.queue-info {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

.queue-info.hidden {
  display: none;
}

.progress-modal-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.overall-progress-section,
.analysis-progress-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--ok));
  transition: width 0.3s ease;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(124, 196, 255, 0.4);
}

/* Horizontal Stepper */
.stepper-horizontal {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  padding: 0;
  margin: 16px 0;
}

.stepper-horizontal::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.step-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.stepper-step.active .step-indicator {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 12px rgba(124, 196, 255, 0.5);
}

.stepper-step.done .step-indicator {
  background: var(--ok);
  border-color: var(--ok);
}

.stepper-step.done .step-indicator::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.step-label {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

.stepper-step.active .step-label {
  color: var(--brand);
  font-weight: 600;
}

.stepper-step.done .step-label {
  color: var(--ok);
}

/* Status Message */
.status-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(29, 229, 160, 0.1);
  border-left: 3px solid var(--ok);
  border-radius: 8px;
  margin-top: 8px;
}

.status-icon {
  width: 20px;
  height: 20px;
  color: var(--ok);
  font-size: 18px;
  animation: spin 1.5s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-message span {
  color: var(--ok);
  font-size: 14px;
  font-weight: 500;
}

.transfer-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(18, 26, 40, 0.95), rgba(8, 12, 20, 0.92));
  border: 1px solid rgba(124, 196, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  min-width: 220px;
  text-align: center;
}

.transfer-speed {
  font-size: 20px;
  font-weight: 700;
  color: var(--ok);
}

.transfer-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.transfer-dot {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.25);
}















































