/* Global styles - Modern dark theme */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background: #000000;
  min-height: 100vh;
  font-size: 14px;
  overflow-x: hidden;
  padding-top: 70px;
  /* Space for fixed navbar */
}

/* Navigation styles moved to common.css */

/* Contact Section */
.contact-section {
  background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
  border: 1px solid #333333;
  padding: 32px;
  margin: 32px 0;
  box-shadow: 0 8px 32px rgba(42, 219, 92, 0.08),
    inset 0 1px 0 rgba(42, 219, 92, 0.1);
  position: relative;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.3),
    transparent
  );
}

.contact-section h3 {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  margin-bottom: 24px;
  font-size: 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid #333333;
  padding-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.contact-item {
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.contact-item:hover {
  border-color: #2adb5c;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(42, 219, 92, 0.15);
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
}

.contact-item:hover::before {
  left: 100%;
}

.contact-icon {
  font-size: 2rem;
  color: #2adb5c;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 8px rgba(42, 219, 92, 0.3));
}

.contact-item h4 {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  margin-bottom: 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-item p {
  color: #cccccc;
  font-size: 0.875rem;
  line-height: 1.5;
}

.contact-item a {
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-item a:hover {
  color: #2adb5c;
  text-shadow: 0 0 8px rgba(42, 219, 92, 0.3);
}

/* Responsive navigation styles moved to common.css */

/* Minimalist flowing background with organic patterns */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
        /* Flowing wave pattern */ linear-gradient(
      45deg,
      transparent 0%,
      rgba(42, 219, 92, 0.015) 20%,
      transparent 40%,
      rgba(42, 219, 92, 0.01) 60%,
      transparent 80%
    ),
    /* Organic blob shapes */
      radial-gradient(
        ellipse 600px 400px at 10% 30%,
        rgba(42, 219, 92, 0.025) 0%,
        transparent 50%
      ),
    radial-gradient(
      ellipse 500px 700px at 90% 70%,
      rgba(42, 219, 92, 0.02) 0%,
      transparent 45%
    ),
    radial-gradient(
      ellipse 800px 300px at 50% 10%,
      rgba(42, 219, 92, 0.015) 0%,
      transparent 60%
    ),
    /* Subtle noise texture */
      repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(42, 219, 92, 0.003) 1px,
        transparent 2px
      ),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      rgba(42, 219, 92, 0.002) 1px,
      transparent 2px
    ),
    /* Base gradient */
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.2) 100%
      );
  background-size: 200% 200%, 120% 80%, 110% 90%, 130% 60%, 3px 3px, 3px 3px,
    100% 100%;
  background-position: 0% 0%, 0% 0%, 100% 100%, 50% 0%, 0px 0px, 1px 1px, center;
  pointer-events: none;
  z-index: -1;
  animation: organic-flow 45s ease-in-out infinite;
}

@keyframes organic-flow {
  0%,
  100% {
    background-position: 0% 0%, 0% 0%, 100% 100%, 50% 0%, 0px 0px, 1px 1px,
      center;
    transform: scale(1) rotate(0deg);
  }
  33% {
    background-position: 50% 50%, -10% 10%, 110% 90%, 40% -5%, 1px 0px, 0px 2px,
      center;
    transform: scale(1.01) rotate(0.5deg);
  }
  66% {
    background-position: 100% 100%, 10% -10%, 90% 110%, 60% 5%, 0px 1px, 2px 0px,
      center;
    transform: scale(0.99) rotate(-0.5deg);
  }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* Header styles */
header {
  text-align: center;
  margin-bottom: 48px;
  padding: 32px 0;
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2adb5c, transparent);
}

header h1 {
  font-family: "Montserrat", sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #2adb5c 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  font-size: 1rem;
  color: #cccccc;
  font-weight: 400;
}
/* Section titles */
section h3 {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  margin-bottom: 24px;
  font-size: 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid #333333;
  padding-bottom: 12px;
}

/* Tab styles */
.tabs-section {
  margin-bottom: 32px;
}

.tabs-nav {
  display: flex;
  background: #111111;
  border: 1px solid #333333;
  padding: 4px;
  margin-bottom: 32px;
  overflow-x: auto;
  gap: 2px;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #cccccc;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 100px;
}

.tab-btn:hover {
  background: #222222;
  color: #ffffff;
}

.tab-btn.active {
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(42, 219, 92, 0.25),
    inset 0 1px 0 rgba(42, 219, 92, 0.2);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Filter category styles */
.filter-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.filter-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.filter-category:hover {
  border-color: #2adb5c;
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(42, 219, 92, 0.1),
    0 8px 25px rgba(42, 219, 92, 0.15);
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
}

.filter-category:hover::before {
  left: 100%;
}

.filter-category h4 {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid #333333;
  padding-bottom: 12px;
  position: relative;
}

.filter-category h4::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #2adb5c 0%, transparent 100%);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.advanced-options > .filter-category + .filter-category {
  margin-top: 16px;
}

.filter-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 16px;
  transition: all 0.3s ease;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  background: linear-gradient(
    145deg,
    rgba(17, 17, 17, 0.8) 0%,
    rgba(26, 26, 26, 0.6) 100%
  );
  border: 1px solid transparent;
}

/* Special styling for labels with multi-parameter containers */
.filter-options label:has(.multi-param-container) {
  flex-direction: column;
  align-items: stretch;
  padding: 16px 20px;
  min-height: auto;
  gap: 0;
}

/* Header section with checkbox and title */
.filter-options label:has(.multi-param-container) > input[type="checkbox"] {
  align-self: flex-start;
  margin-bottom: 8px;
}

/* Ensure the filter title appears inline with checkbox */
.filter-options label:has(.multi-param-container) {
  position: relative;
}

.filter-options label:has(.multi-param-container) > input[type="checkbox"] + * {
  display: inline-block;
}

.filter-options label:hover {
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
  border-color: #333333;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(42, 219, 92, 0.15);
}

.filter-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2adb5c;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #333333;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
}

.filter-options input[type="checkbox"]:hover {
  border-color: #2adb5c;
  transform: scale(1.05);
}

.range-container > label {
  padding: 0;
  border: 0;
  background: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.edgedetect-controls {
  flex: 1;
}

.range-container > input {
  max-width: 65%;
  margin-right: 5%;
}

.filter-options input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  border-color: #2adb5c;
  box-shadow: 0 2px 8px rgba(42, 219, 92, 0.3);
}

.filter-options input[type="range"] {
  margin-left: 5px;
  flex: 1;
  accent-color: #2adb5c;
}

/* Slider styles - Optimized styles */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(90deg, #333333 0%, #444444 100%);
  outline: none;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid #333333;
}

input[type="range"]:hover {
  background: linear-gradient(90deg, #444444 0%, #555555 100%);
  border-color: #2adb5c;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #000000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(42, 219, 92, 0.3),
    0 2px 4px rgba(42, 219, 92, 0.2) inset;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(42, 219, 92, 0.4),
    0 2px 4px rgba(42, 219, 92, 0.3) inset;
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(42, 219, 92, 0.4),
    0 1px 2px rgba(42, 219, 92, 0.2) inset;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(42, 219, 92, 0.15),
    0 4px 12px rgba(42, 219, 92, 0.3);
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #000000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(42, 219, 92, 0.3);
}

.slider-value {
  color: #cccccc;
  font-size: 0.75rem;
  min-width: 32px;
  text-align: right;
}

/* Color effect styles */
.color-effects {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
}

.color-effects h4 {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 600;
}

/* Preset effect styles */
.preset-filters {
  margin-top: 24px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.preset-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(42, 219, 92, 0.08) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.preset-btn:hover {
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
  border-color: #2adb5c;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(42, 219, 92, 0.1),
    0 6px 16px rgba(42, 219, 92, 0.15);
}

.preset-btn:hover::before {
  transform: translateX(100%);
}

.preset-btn:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 0 rgba(42, 219, 92, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.preset-btn.active {
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  color: #000000;
  border-color: #2adb5c;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(42, 219, 92, 0.2),
    0 4px 15px rgba(42, 219, 92, 0.3);
  transform: translateY(-1px);
}

.preset-btn.active:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 6px 20px rgba(42, 219, 92, 0.4);
}

/* Preview section styles */
.preview-section {
  margin-bottom: 32px;
}

/* .preview-container {
    background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
    border: 1px solid #333333;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(42, 219, 92, 0.08),
        inset 0 1px 0 rgba(42, 219, 92, 0.1);
} */

.preview-item {
  margin-bottom: 20px;
}

.preview-item h4 {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid #333333;
  padding-bottom: 8px;
}

.image-dimensions-overlay {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(42, 219, 92, 0.9);
  color: #000000;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  z-index: 10;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(42, 219, 92, 0.2);
}

.single-image-overlay {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(42, 219, 92, 0.9);
  color: #000000;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  z-index: 10;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(42, 219, 92, 0.2);
}

#originalImage {
  width: 100%;
  max-width: 400px;
  height: auto;
  border: 1px solid #333333;
  box-shadow: 0 4px 12px rgba(42, 219, 92, 0.08);
  margin: 0 auto;
  display: block;
}

.image-info {
  background: #111111;
  border: 1px solid #333333;
  padding: 16px;
  margin-top: 16px;
  color: #ffffff;
  font-size: 0.875rem;
}

.image-info p {
  margin-bottom: 8px;
}

.image-info p:last-child {
  margin-bottom: 0;
}

.image-info ul {
  margin: 8px 0;
  padding-left: 20px;
}

.image-info li {
  margin-bottom: 4px;
  color: #cccccc;
}

.upload-area {
  border: 2px dashed #444444;
  padding: 48px 24px;
  text-align: center;
  background: #111111;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-area:hover {
  border-color: #555555;
  background: #1a1a1a;
}

.upload-area.dragover {
  border-color: #555555;
  background: #0a2e0a;
}

.upload-icon {
  font-size: 3rem;
  color: #555555;
  margin-bottom: 16px;
}

.upload-text {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.upload-hint {
  color: #cccccc;
  font-size: 0.875rem;
}

#fileInput {
  display: none;
}

/* Button styles */
.btn {
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.2),
    transparent
  );
  transition: left 0.3s ease;
}

/* .btn-primary:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(42, 219, 92, 0.3);
} */

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:disabled {
  pointer-events: none;
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #333333;
}

.btn-secondary:hover {
  background: #222222;
  border-color: #2adb5c;
}

.process-btn {
  padding: 16px 32px;
  border: 1px solid #2adb5c;
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(42, 219, 92, 0.2),
    0 4px 15px rgba(42, 219, 92, 0.3);
}

.process-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.25),
    transparent
  );
  transition: left 0.4s ease;
}

.process-btn:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-color: #22c55e;
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 8px 25px rgba(42, 219, 92, 0.4);
}

.process-btn:hover::before {
  left: 100%;
}

.process-btn:active {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 15px rgba(42, 219, 92, 0.3);
}

.process-btn:disabled {
  background: linear-gradient(135deg, #444444 0%, #555555 100%);
  border-color: #444444;
  color: #888888;
  cursor: not-allowed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.1);
  transform: none;
}

.reset-btn {
  padding: 14px 28px;
  border: 1px solid #ef4444;
  background: linear-gradient(145deg, #2a0a0a 0%, #3a1010 100%);
  color: #ef4444;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(239, 68, 68, 0.05),
    0 2px 8px rgba(239, 68, 68, 0.15);
}

.reset-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(239, 68, 68, 0.15),
    transparent
  );
  transition: left 0.4s ease;
}

.reset-btn:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 25px rgba(239, 68, 68, 0.4);
}

.reset-btn:hover::before {
  left: 100%;
}

.reset-btn:active {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(239, 68, 68, 0.2);
}

.download-btn {
  padding: 14px 28px;
  border: none;
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  color: #000000;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(42, 219, 92, 0.3);
}

.download-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.3s ease;
}

.download-btn:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(42, 219, 92, 0.4);
}

.download-btn:hover::before {
  left: 100%;
}

.download-btn:disabled {
  background: #444444;
  color: #888888;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Action button container */
.action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  padding: 24px;
  border-top: 1px solid #333333;
}

.download-area {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .download-area {
    flex-direction: column;
    align-items: center;
  }

  .select-btn,
  .process-btn,
  .reset-btn,
  .download-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* Settings area */
.settings-section {
  margin-bottom: 32px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.setting-group {
  background: #1a1a1a;
  border: 1px solid #333333;
  padding: 20px;
}

.setting-group h4 {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 600;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-item label {
  display: block;
  color: #ffffff;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.setting-item select,
.setting-item input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  color: #ffffff;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.setting-item select:hover,
.setting-item input[type="number"]:hover {
  border-color: #2adb5c;
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
}

/* Select option styles */
.setting-item select option {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 8px 12px;
}

.setting-item select option:hover {
  background-color: #222222;
}

.setting-item select option:checked {
  background-color: #22c55e;
}

/* Quality slider */
.quality-slider {
  margin-top: 8px;
}

.quality-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.quality-value {
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
}

/* Filter category textarea styles - Optimized styles */
.filter-category textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  color: #ffffff;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.filter-category textarea:focus {
  outline: none;
  border-color: #2adb5c;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(42, 219, 92, 0.1);
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
}

.filter-category textarea::placeholder {
  color: #666666;
  font-style: italic;
}

.filter-category textarea:hover {
  border-color: #2adb5c;
}

.filter-category small {
  display: block;
  color: #cccccc;
  font-size: 0.75rem;
  line-height: 1.4;
  margin-top: 8px;
  padding: 8px 12px;
  background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
  border: 1px solid #333333;
  font-style: italic;
}

.filter-category small a {
  color: #2adb5c;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.filter-category small a:hover {
  color: #22c55e;
  border-bottom-color: #2adb5c;
}

/* Custom filters - Optimized styles */
.custom-filters {
  margin-top: 24px;
}

.custom-filters textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  color: #ffffff;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.custom-filters textarea:focus {
  outline: none;
  border-color: #2adb5c;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(42, 219, 92, 0.1);
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
}

.custom-filters textarea::placeholder {
  color: #666666;
  font-style: italic;
}

.custom-filters textarea:hover {
  border-color: #2adb5c;
}

/* Output filename inputs - Optimized styles */
#outputPrefix,
#outputSuffix {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-top: 8px;
}

#outputPrefix:focus,
#outputSuffix:focus {
  outline: none;
  border-color: #2adb5c;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(42, 219, 92, 0.1);
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
}

#outputPrefix:hover,
#outputSuffix:hover {
  border-color: #2adb5c;
}

#outputPrefix::placeholder,
#outputSuffix::placeholder {
  color: #666666;
  font-style: italic;
}

/* Optimize label styles containing these input boxes */
label:has(#outputPrefix),
label:has(#outputSuffix) {
  display: block;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 12px;
}

/* Memory Limit numeric input box optimized styles */
#memoryLimit {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-left: 12px;
  min-width: 100px;
  max-width: 120px;
}

#memoryLimit:focus {
  outline: none;
  border-color: #2adb5c;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(42, 219, 92, 0.1);
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
}

#memoryLimit:hover {
  border-color: #2adb5c;
}

/* Optimize label styles containing Memory Limit */
label:has(#memoryLimit) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px;
  transition: background 0.2s ease;
}

label:has(#memoryLimit):hover {
  background: #222222;
}

/* Progress bar */
.progress-section {
  display: none;
  margin: 24px 0;
  padding: 24px;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: linear-gradient(90deg, #333333 0%, #444444 100%);
  overflow: hidden;
  margin: 16px 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.progress-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.8),
    transparent
  );
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 50%, #2adb5c 100%);
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
  box-shadow: 0 0 10px rgba(42, 219, 92, 0.3);
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  color: #ffffff;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.progress-percentage {
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
}

/* Results area */
.result-section {
  display: none;
  margin-top: 32px;
  padding: 32px;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  box-shadow: 0 8px 32px rgba(42, 219, 92, 0.1),
    inset 0 1px 0 rgba(42, 219, 92, 0.1);
  position: relative;
  overflow: hidden;
}

.result-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.1),
    transparent
  );
}

.result-section h3 {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  margin-bottom: 24px;
  font-size: 1.25rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-item {
  padding: 20px;
  text-align: center;
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
}

.stat-label {
  color: #cccccc;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-value {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
}

.compression-ratio {
  color: #2adb5c;
}

/* Performance information */
#performanceInfo {
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  padding: 16px;
  margin-bottom: 16px;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  font-size: 0.875rem;
  position: relative;
  overflow: hidden;
}

#performanceInfo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.1),
    transparent
  );
}

#performanceInfo strong {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* #performanceInfo strong::before {
    content: '⚡';
    font-size: 1.1rem;
} */

/* Removed disabled filter styles - all filters are now freely selectable */

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes slide {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* Animation effects */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(42, 219, 92, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(42, 219, 92, 0.4);
  }
}

/* Add animations to main elements */
main {
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  padding: 32px;
  margin-bottom: 24px;
  /* box-shadow: rgba(42, 219, 92, 0.09) 0px 3px 12px; */
  backdrop-filter: blur(10px);
  position: relative;
  animation: fadeIn 0.6s ease-out;
}

.filter-category {
  background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
  border: 1px solid #333333;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: slideIn 0.4s ease-out;
}

.filter-category:nth-child(2) {
  animation-delay: 0.1s;
}

.filter-category:nth-child(3) {
  animation-delay: 0.2s;
}

.preset-btn {
  padding: 10px 12px;
  border: 1px solid #333333;
  background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.3s ease-out;
}

.preset-btn:nth-child(2) {
  animation-delay: 0.05s;
}

.preset-btn:nth-child(3) {
  animation-delay: 0.1s;
}

.preset-btn:nth-child(4) {
  animation-delay: 0.15s;
}

.preset-btn:nth-child(5) {
  animation-delay: 0.2s;
}

.preset-btn:nth-child(6) {
  animation-delay: 0.25s;
}

.preset-btn:nth-child(7) {
  animation-delay: 0.3s;
}

.preset-btn:nth-child(8) {
  animation-delay: 0.35s;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  main {
    padding: 20px;
  }

  header h1 {
    font-size: 1.875rem;
  }

  .filter-categories {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .tabs-nav {
    flex-direction: column;
  }

  .tab-btn {
    min-width: auto;
  }

  .preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #originalImage {
    max-width: 300px;
  }

  /* Mobile optimized animations */
  .filter-category {
    animation-duration: 0.3s;
  }
}

@media (max-width: 480px) {
  .result-stats {
    grid-template-columns: 1fr;
  }

  .upload-area {
    padding: 32px 16px;
  }

  .upload-icon {
    font-size: 2rem;
  }
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2adb5c 0%, #22c55e 100%);
  transition: all 0.3s ease;
  border: 1px solid #333333;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 0 8px rgba(42, 219, 92, 0.3);
}

/* Text selection styles */
::selection {
  background: rgba(42, 219, 92, 0.3);
  color: #ffffff;
}

::-moz-selection {
  background: rgba(42, 219, 92, 0.3);
  color: #ffffff;
}

/* Notification animation */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* New feature indicator */
.filter-options label:has(input[data-filter="deflicker"]),
.filter-options label:has(input[data-filter="oscilloscope"]),
.filter-options label:has(input[id="extractExif"]),
.filter-options label:has(input[id="animatedJpegXL"]),
.filter-options label:has(input[id="vulkanAccel"]),
.filter-options label:has(input[id="amdFsr"]) {
  position: relative;
}

.filter-options label:has(input[data-filter="deflicker"])::after,
.filter-options label:has(input[data-filter="oscilloscope"])::after,
.filter-options label:has(input[id="extractExif"])::after,
.filter-options label:has(input[id="animatedJpegXL"])::after,
.filter-options label:has(input[id="vulkanAccel"])::after,
.filter-options label:has(input[id="amdFsr"])::after {
  content: "NEW";
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  font-size: 8px;
  font-weight: bold;
  padding: 2px 4px;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

/* Focus styles */
input:focus,
button:focus,
select:focus {
  outline: 2px solid rgba(42, 219, 92, 0.3);
  outline-offset: 2px;
}

/* Loading state */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 219, 92, 0.1),
    transparent
  );
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

footer p {
  text-align: center;
}

#errorText {
  margin-bottom: 24px;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  border: 1px solid #333333;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(42, 219, 92, 0.1);
  color: #ffffff;
}

.modal-content h3 {
  color: #ffffff;
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-content p {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border: 1px solid #333333;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modal-btn-primary {
  background: linear-gradient(135deg, #2adb5c 0%, #22c55e 100%);
  color: #000000;
  border-color: #2adb5c;
}

.modal-btn-primary:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 219, 92, 0.3);
}

.modal-btn-secondary {
  background: linear-gradient(145deg, #1a1a1a 0%, #111111 100%);
  color: #ffffff;
}

.modal-btn-secondary:hover {
  background: linear-gradient(145deg, #222222 0%, #1a1a1a 100%);
  border-color: #2adb5c;
}

/* Responsive modal styles */
@media (max-width: 768px) {
  .modal-content {
    padding: 20px;
    margin: 10px;
  }

  .modal-buttons {
    flex-direction: column;
  }

  .modal-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Error styles */
.error-message {
  background: linear-gradient(45deg, #ef4444, #dc2626);
  color: #ffffff;
  padding: 16px;
  margin: 16px 0;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.error-message h3 {
  color: #fff !important;
}

/* Footer gradient */
.footer-gradient {
  background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
  padding: 40px 0;
  margin-top: 60px;
  position: relative;
}

.footer-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #333333, transparent);
}

.footer-content {
  text-align: center;
  color: #ffffff;
  max-width: 800px;
  margin: 0 auto;
}

.footer-content h3 {
  color: #ffffff;
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 600;
}

.footer-content p {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #2adb5c;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #22c55e;
  text-shadow: 0 0 8px rgba(42, 219, 92, 0.3);
}
