@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap");

.download-btn {
  display: inline-block;
  margin-bottom: 8px;
}
.download-btn button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease-in-out;
  margin-bottom: 6px;
}
.download-btn button:hover {
  background-color: #d9469f; /* Darker shade of new accent */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.photography-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.container {
  position: relative;
  z-index: 1;
}
.photography-bg .icon {
  position: absolute;

  z-index: 0;

  pointer-events: none;
}
.icon1 {
  left: 6vw;
  top: 10vh;
  animation: floatCamera 12s ease-in-out infinite alternate;
  animation-delay: 0s;
}
.icon2 {
  left: 80vw;
  top: 18vh;
  animation: floatCamera2 13s ease-in-out infinite alternate-reverse;
  animation-delay: 1s;
}
.icon3 {
  left: 18vw;
  bottom: 12vh;
  animation: floatPhoto 16s ease-in-out infinite alternate;
  animation-delay: 2s;
}
.icon4 {
  right: 10vw;
  top: 38vh;
  animation: floatPhoto2 14s ease-in-out infinite alternate-reverse;
  animation-delay: 0.5s;
}
.icon5 {
  left: 55vw;
  bottom: 7vh;
  animation: floatLens 18s ease-in-out infinite alternate;
  animation-delay: 1.5s;
}
.icon6 {
  right: 22vw;
  top: 62vh;
  animation: floatLens2 15s ease-in-out infinite alternate;
  animation-delay: 2.5s;
}
@keyframes floatCamera {
  0% {
    transform: translateY(0) rotate(-10deg) scale(1);
  }
  100% {
    transform: translateY(60px) rotate(10deg) scale(1.15);
  }
}
@keyframes floatCamera2 {
  0% {
    transform: translateY(0) rotate(12deg) scale(1);
  }
  100% {
    transform: translateY(-50px) rotate(-12deg) scale(1.12);
  }
}
@keyframes floatPhoto {
  0% {
    transform: translateY(0) rotate(8deg) scale(1);
  }
  100% {
    transform: translateY(-70px) rotate(-12deg) scale(1.18);
  }
}
@keyframes floatPhoto2 {
  0% {
    transform: translateY(0) rotate(-7deg) scale(1);
  }
  100% {
    transform: translateY(55px) rotate(10deg) scale(1.2);
  }
}
@keyframes floatLens {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    transform: translateY(50px) scale(1.2) rotate(5deg);
  }
}
@keyframes floatLens2 {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    transform: translateY(-60px) rotate(18deg) scale(1.16);
  }
}

/* Global Styles */
:root {
  --primary-color: #6366f1; /* Vibrant indigo */
  --primary-color-rgb: 99, 102, 241;
  --primary-color-muted: #818cf8; /* Used for disabled states */
  --secondary-color: #1f2937; /* Dark gray-blue */
  --accent-color: #ec4899; /* Modern pink/magenta */
  --accent-color-rgb: 236, 72, 153;
  --text-color: #e5e7eb; /* Light gray for text */
  --text-color-muted: #9ca3af; /* Muted gray for sub-text */
  --background-color: #111827; /* Very dark gray/black */
  --card-background-color: #1f2937; /* Dark gray for cards */
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --font-family-main: "Space Grotesk", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-main);
  line-height: 1.6;
  background: var(--background-color);
  background-attachment: fixed;
  color: var(--text-color);
  padding: 20px;
  min-height: 100vh;
}

.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.18;
  background: #fff;
}
.circle1 {
  width: 320px;
  height: 320px;
  left: 8vw;
  top: 10vh;
  background: #7ffcff;
}
.circle2 {
  width: 300px;
  height: 300px;
  right: -80px;
  bottom: 8vh;
  background: #9f5fff;
}
.bg-bar {
  position: absolute;
  border-radius: 100px;
  filter: blur(2px);
  opacity: 0.23;
}
.bar1 {
  width: 500px;
  height: 60px;
  left: 2vw;
  top: 17vh;
  background: #7ffcff;
  transform: rotate(-30deg);
}
.bar2 {
  width: 440px;
  height: 60px;
  right: -120px;
  top: 30vh;
  background: #5a8fff;
  transform: rotate(-30deg);
}
.bar3 {
  width: 420px;
  height: 60px;
  left: 18vw;
  bottom: 9vh;
  background: #9f5fff;
  transform: rotate(-30deg);
}
.bar4 {
  width: 390px;
  height: 40px;
  left: 40vw;
  top: 8vh;
  background: #ffffff;
  opacity: 0.1;
  filter: blur(3px);
  transform: rotate(-30deg);
}
.bar5 {
  width: 350px;
  height: 50px;
  right: 10vw;
  bottom: 20vh;
  background: #7ffcff;
  opacity: 0.16;
  filter: blur(2px);
  transform: rotate(-30deg);
}
.bar6 {
  width: 300px;
  height: 38px;
  left: 10vw;
  top: 60vh;
  background: #5a8fff;
  opacity: 0.13;
  filter: blur(2px);
  transform: rotate(-30deg);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Styles */
header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
}

.logo-container {
  margin-bottom: 20px;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: 20%;
  overflow: hidden;
  background: var(--card-background-color);
  box-shadow: var(--box-shadow);
}

.app-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.app-logo:hover {
  transform: scale(1.05);
}

header p {
  /* font-family will be inherited from body */
  color: var(--text-color);
  font-size: 1.5rem;
  font-weight: 600;
}

h1 {
  /* font-family will be inherited from body */
  color: var(--text-color);
  font-size: 2.8rem;
  margin-bottom: 2px;
  font-weight: 600;
  letter-spacing: -0.5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Keep or adjust shadow for dark theme */
}

/* Upload Section */
.upload-section {
  background: var(--card-background-color);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
  text-align: center;
}

.upload-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.options-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px; /* Add some space before the submit button */
}

.options-group label {
  color: var(--text-color-muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.options-group input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.options-group input[type="checkbox"]:disabled {
  cursor: not-allowed;
  accent-color: var(--secondary-color);
}

.options-group input[type="checkbox"]:disabled + label {
  opacity: 0.6;
  cursor: not-allowed;
}

.quality-slider-group {
  flex-direction: column; /* Stack label and slider vertically */
  align-items: flex-start; /* Align items to the start */
  width: 100%;
  max-width: 400px; /* Match file input wrapper */
}

.quality-slider-group label {
  margin-bottom: 8px; /* Space between label and slider */
  font-size: 0.9rem;
  color: var(--text-color-muted);
  transition: opacity 0.3s ease; /* Smooth transition for opacity */
}

.quality-slider-group input[type="range"] {
  width: 100%;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.quality-slider-group input[type="range"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.quality-slider-group input[type="range"]:disabled + label, /* If label is after */
.quality-slider-group label[for="jpeg-quality"]:has(+ input[type="range"]:disabled) {
  /* If label is before and modern CSS is supported */
  opacity: 0.6;
  cursor: not-allowed;
}

/* Fallback for older browsers if :has is not supported, target the label directly or wrap it */
.quality-slider-group input[type="range"]:disabled ~ span, /* For the quality value span */
.quality-slider-group:has(input[type="range"]:disabled) label {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Custom styling for range input track and thumb (optional, browser-specific) */
input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px; /* Increased height */
  cursor: pointer;
  background: var(--border-color); /* Lighter background */
  border-radius: var(--border-radius);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  margin-top: -5px; /* Adjusted for 10px track height: (10-20)/2 = -5px */
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 10px; /* Increased height */
  cursor: pointer;
  background: var(--border-color); /* Lighter background */
  border-radius: var(--border-radius);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: none; /* Reset default border */
}

input[type="range"]::-ms-track {
  width: 100%;
  height: 10px; /* Increased height */
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

input[type="range"]::-ms-fill-lower {
  background: var(--border-color); /* Lighter background */
  border-radius: var(--border-radius);
}

input[type="range"]::-ms-fill-upper {
  background: var(--border-color); /* Lighter background */
  border-radius: var(--border-radius);
}

input[type="range"]::-ms-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  margin-top: 0px; /* Adjust thumb position */
}

.file-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 30px; /* Increased padding for better drop target area */
  border: 2px dashed var(--primary-color);
  border-radius: var(--border-radius);
  background-color: rgba(99, 102, 241, 0.05); /* Lighter initial background */
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex; /* For centering text */
  flex-direction: column; /* For centering text */
  justify-content: center; /* For centering text */
  align-items: center; /* For centering text */
  min-height: 150px; /* Ensure it has some height */
}

#drop-zone-text {
  color: var(--text-color-muted);
  font-size: 1rem;
  text-align: center;
}

.file-input-wrapper:hover {
  background-color: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-color);
}

.file-input-wrapper.drag-over {
  background-color: rgba(
    var(--accent-color-rgb, 236, 72, 153),
    0.2
  ); /* Use accent color with alpha */
  border-style: solid;
  border-color: var(--accent-color);
}

.file-input {
  width: 100%;
  padding: 15px;
  border: 2px dashed var(--primary-color);
  border-radius: var(--border-radius);
  background-color: rgba(
    99,
    102,
    241,
    0.1
  ); /* Primary color with alpha - This specific comment is now part of .file-input-wrapper */
  color: var(--text-color-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-input:hover {
  background-color: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-color);
}

.upload-btn {
  background-color: var(--primary-color);
  color: white; /* Primary buttons usually have white text */
  padding: 12px 30px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease-in-out;
}

.upload-btn:hover {
  background-color: #4f46e5; /* Darker shade of new primary */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.upload-btn:disabled,
.upload-btn:disabled:hover {
  background-color: var(--primary-color-muted);
  color: var(--text-color-muted);
  cursor: not-allowed;
  opacity: 0.7;
  border: 1px solid var(--border-color); /* Add a border to make it look more disabled */
  transform: none; /* Reset transform */
  box-shadow: none; /* Reset box-shadow */
}

/* Image Display Section */
.image-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 30px;
  background: var(--card-background-color);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.image-container h3 {
  color: var(--text-color);
  text-align: center;
  font-size: 1.2rem;
}

.image-preview {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.image-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 10px;
  background-color: rgba(74, 144, 226, 0.05);
  border-radius: var(--border-radius);
  width: 100%;
}

.file-size {
  font-size: 0.9rem;
  color: var(--text-color-muted);
  font-weight: 500;
}

.compression-ratio {
  font-size: 0.8rem;
  color: var(--accent-color);
  font-weight: 500;
}

/* Status Messages */
.status-message {
  padding: 15px;
  border-radius: var(--border-radius);
  margin: 20px 0;
  text-align: center;
}

.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Loading Animation */
.loading {
  display: none;
  text-align: center;
  margin: 20px 0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(74, 144, 226, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto;
}
.landing-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem; /* Creates space between the cards */
}

.feature-card {
  /* Add your card-specific styles here */
  padding: 1rem;
}



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

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  h1 {
    font-size: 2rem;
  }

  .upload-section {
    padding: 20px;
  }

  .image-display {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .image-preview {
    max-height: 300px;
  }
}
