* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --primary: #ff2e54; /* Neon Red */
  --primary-hover: #e02446;
  --accent: #10b981; /* Neon Green */
  --bg-dark: #080c10;
  --card-dark: #0e1318;
  --card-dark-2: #151b22;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 46, 84, 0.4);
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  transition: opacity 0s;
}

body.loading { opacity: 0; }

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.inset-4 { inset: 1rem; }
.top-0 { top: 0; }
.top-3 { top: 0.75rem; }
.top-20 { top: 5rem; }
.right-3 { right: 0.75rem; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.left-3 { left: 0.75rem; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }
.z-\[60\] { z-index: 60; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.mt-auto { margin-top: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.-ml-5 { margin-left: -1.25rem; }
.block { display: block; }
.flex { display: flex; }
.hidden { display: none; }
.h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-56 { height: 14rem; }
.h-auto { height: auto; }
.h-full { height: 100%; }
.min-h-\[1\.25rem\] { min-height: 1.25rem; }
.min-h-\[400px\] { min-height: 400px; }
.min-h-screen { min-height: 100vh; }
.w-3\.5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-\[50\%\] { width: 50%; }
.w-auto { width: auto; }
.w-fit { width: fit-content; }
.w-full { width: 100%; }
.max-h-\[65vh\] { max-height: 65vh; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-full { max-width: 100%; }
.max-w-none { max-width: none; }
.flex-1 { flex: 1 1 0%; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.cursor-col-resize { cursor: col-resize; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.625rem; }
.overflow-hidden { overflow: hidden; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid; }
.border-2 { border: 2px solid; }
.border-b { border-bottom: 1px solid; }
.border-b-2 { border-bottom: 2px solid; }
.border-r-\[1\.5px\] { border-right: 1.5px solid; }
.border-dashed { border-style: dashed; }
.border-white { border-color: #fff; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-primary { border-color: var(--primary); }
.bg-white { background-color: #fff; }
.bg-white\/80 { background-color: rgba(255, 255, 255, 0.8); }
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.9); }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95); }
.bg-gray-50\/50 { background-color: rgba(249, 250, 251, 0.5); }
.bg-gray-50\/80 { background-color: rgba(249, 250, 251, 0.8); }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-900 { background-color: #111827; }
.bg-emerald-600 { background-color: #059669; }
.bg-primary { background-color: var(--primary); }
[class*="bg-[url("] {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2Y5ZmRmZCI+PHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiBmaWxsPSIjZjJmMmYyIi8+PHJlY3QgeD0iMTAiIHk9IjEwIiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIGZpbGw9IiNmMmYyZjIiLz48L3N2Zz4=");
}
.p-5 { padding: 1.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-12 { padding-top: 3rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-12 { padding-bottom: 3rem; }
.text-center { text-align: center; }
.font-mono { font-family: Consolas, "SFMono-Regular", monospace; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.tracking-tight { letter-spacing: -0.025em; }
.text-white { color: #fff; }
.text-emerald-100 { color: #d1fae5; }
.text-emerald-500 { color: #10b981; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-primary { color: var(--primary); }
.underline { text-decoration-line: underline; }
.underline-offset-2 { text-underline-offset: 2px; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-\[0_1px_3px_rgba\(0\,0\,0\,0\.2\)\] { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.shadow-\[1px_0_4px_rgba\(0\,0\,0\,0\.15\)\] { box-shadow: 1px 0 4px rgba(0, 0, 0, 0.15); }
.box-content { box-sizing: content-box; }
.backdrop-blur { backdrop-filter: blur(8px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.transition-all { transition-property: all; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; }
.transition-opacity { transition-property: opacity; }
.transition-transform { transition-property: transform; }
.transition-all,
.transition-colors,
.transition-opacity,
.transition-transform {
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.duration-100 { transition-duration: 100ms; }
.duration-200 { transition-duration: 200ms; }
.object-contain { object-fit: contain; }
.object-right-bottom { object-position: right bottom; }
.pointer-events-none { pointer-events: none; }
.hover\:bg-black:hover { background-color: #000; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-primary-hover:hover { background-color: var(--primary-hover); }
.hover\:text-black:hover { color: #000; }
.hover\:text-primary:hover,
.hover\:text-primary-hover:hover { color: var(--primary-hover); }
.hover\:text-white:hover { color: #fff; }
.active\:scale-\[0\.98\]:active { transform: scale(0.98); }
.group:hover .group-hover\:border-gray-300 { border-color: #d1d5db; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:text-gray-700 { color: #374151; }
.animate-spin { animation: spin 1s linear infinite; }

.batch-list {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.batch-card {
  display: grid;
  grid-template-columns: minmax(320px, 42%) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 156px;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
}

.batch-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  min-width: 0;
}

.batch-pane {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 132px;
  border-radius: 0.5rem;
  background: #f9fafb;
  overflow: hidden;
}

.batch-pane-label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  padding: 0.125rem 0.375rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.9);
  color: #374151;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1rem;
}

.batch-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.batch-main {
  min-width: 0;
  text-align: left;
}

.batch-title {
  margin: 0 0 0.375rem;
  overflow: hidden;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-status {
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1rem;
}

.batch-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.batch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform 100ms, background-color 150ms;
}

.batch-button:active { transform: scale(0.98); }

.batch-button.primary {
  background: var(--primary);
  color: #fff;
}

.batch-button.secondary {
  background: #111827;
  color: #fff;
}

.batch-button svg {
  width: 1rem;
  height: 1rem;
}

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

@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 768px) {
  .md\:inline-block { display: inline-block; }
  .md\:flex-row { flex-direction: row; }
  .md\:w-64 { width: 16rem; }
  .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
}

@media (max-width: 767px) {
  .batch-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .batch-pane {
    height: 116px;
  }

  .batch-actions {
    justify-content: flex-end;
  }
}

@media (min-width: 1024px) {
  .lg\:w-72 { width: 18rem; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Pixel Black Neon Dark Mode Overrides */
body {
  background-color: var(--bg-dark) !important;
  color: #f3f4f6 !important;
}

header.bg-white\/95 {
  background-color: rgba(8, 12, 16, 0.95) !important;
  border-color: var(--border-dark) !important;
}

.border-gray-100 {
  border-color: var(--border-dark) !important;
}

.border-gray-200 {
  border-color: var(--border-dark) !important;
}

.bg-gray-50\/50 {
  background-color: #0b0f13 !important;
}

.bg-white {
  background-color: var(--card-dark) !important;
  border-color: var(--border-dark) !important;
}

.bg-gray-50\/80 {
  background-color: rgba(21, 27, 34, 0.95) !important;
  border-color: var(--border-dark) !important;
}

.bg-gray-100 {
  background-color: var(--card-dark-2) !important;
}

.text-gray-900 {
  color: #ffffff !important;
}

.text-gray-800 {
  color: #f3f4f6 !important;
}

.text-gray-700 {
  color: #e5e7eb !important;
}

.text-gray-600 {
  color: #9ca3af !important;
}

.text-gray-500 {
  color: #6b7280 !important;
}

.text-gray-400 {
  color: #4b5563 !important;
}

/* Accent overlays & handles */
.border-primary {
  border-color: var(--primary) !important;
}

.bg-primary {
  background-color: var(--primary) !important;
  color: #080c10 !important;
  font-weight: 600 !important;
}

.hover\:bg-primary-hover:hover {
  background-color: var(--primary-hover) !important;
  box-shadow: 0 0 12px rgba(255, 46, 84, 0.4) !important;
}

.hover\:bg-black:hover {
  background-color: #ffffff !important;
  color: #080c10 !important;
}

.bg-emerald-600 {
  background-color: var(--primary) !important;
}

.text-emerald-100 {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Checkerboard backdrop for transparent images in dark mode */
.select-none {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0iIzA4MGMxMCI+PHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiBmaWxsPSIjMGYxNDFhIi8+PHJlY3QgeD0iMTAiIHk9IjEwIiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIGZpbGw9IiMwZjE0MWEiLz48L3N2Zz4=") !important;
}

/* Image comparison border and slider handle */
#processedOverlay {
  border-right: 1.5px solid var(--primary) !important;
  box-shadow: 0 0 10px rgba(255, 46, 84, 0.5) !important;
}

#sliderHandle .bg-white {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 10px rgba(255, 46, 84, 0.6) !important;
}

#sliderHandle svg {
  color: #080c10 !important;
}

/* Dropzone hover */
#uploadArea:hover {
  background-color: rgba(255, 46, 84, 0.04) !important;
}
#uploadArea:hover .border-dashed {
  border-color: var(--primary) !important;
}

/* Batch cards dark styling */
.batch-card {
  background: var(--card-dark) !important;
  border-color: var(--border-dark) !important;
}
.batch-pane {
  background: #090d10 !important;
}
.batch-pane-label {
  background: rgba(8, 12, 16, 0.85) !important;
  color: #ffffff !important;
  border-color: var(--border-dark) !important;
}
.batch-title {
  color: #ffffff !important;
}
.batch-button.primary {
  background: var(--primary) !important;
  color: #080c10 !important;
  font-weight: 700 !important;
}
.batch-button.primary:hover {
  box-shadow: 0 0 12px rgba(255, 46, 84, 0.4) !important;
}
.batch-button.secondary {
  background: var(--accent) !important;
  color: #080c10 !important;
  font-weight: 700 !important;
}
.batch-button.secondary:hover {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}

/* Ad Wall Modal Styles */
.ad-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(6, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.ad-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ad-modal {
  background-color: #0e1318;
  border: 1px solid rgba(255, 46, 84, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(255, 46, 84, 0.15), 0 10px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.ad-overlay.active .ad-modal {
  transform: scale(1);
}

.ad-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #121820;
}

.ad-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ad-badge {
  background-color: #ff2e54;
  color: #080c10;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ad-title {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin: 0;
}

.ad-timer {
  font-size: 0.85rem;
  color: #ff2e54;
  font-weight: 600;
  font-family: monospace;
}

.ad-progress-container {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  width: 100%;
  position: relative;
}

.ad-progress-bar {
  height: 100%;
  background-color: #ff2e54;
  width: 100%;
  transition: width 1s linear;
}

.ad-body {
  padding: 0;
  background-color: #040608;
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-video-frame {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #9ca3af;
  text-align: center;
  padding: 40px;
}

.ad-placeholder svg {
  color: #ff2e54;
  filter: drop-shadow(0 0 8px rgba(255, 46, 84, 0.5));
}

.ad-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #121820;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ad-desc {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0;
  text-align: center;
}

.ad-action-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ad-action-btn:disabled {
  background-color: rgba(255, 255, 255, 0.05);
  color: #6b7280;
  cursor: not-allowed;
}

.ad-action-btn.unlocked {
  background-color: #10b981;
  color: #080c10;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.ad-action-btn.unlocked:hover {
  background-color: #059669;
}

/* Manual Selection Box Styles */
.manual-selection-box {
  position: absolute;
  border: 2px dashed #ff2e54;
  background-color: rgba(255, 46, 84, 0.15);
  box-shadow: 0 0 10px rgba(255, 46, 84, 0.4);
  pointer-events: none;
  z-index: 40;
}

.manual-select-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #ff2e54;
  background-color: rgba(255, 46, 84, 0.08);
  border: 1px solid rgba(255, 46, 84, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  margin-top: 8px;
}

