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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Enhanced Loading and Animation Styles */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

.loading-circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 25;
  animation: spin 1.5s linear infinite;
}

/* Landing Page Styles */
.landing-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.landing-page::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 1px,
    transparent 1px
  );
  background-size: 50px 50px;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 100;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideInDown 0.6s ease-out;
}

.logo-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.nav-logo:hover .logo-icon {
  transform: scale(1.1) rotate(5deg);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
  animation: slideInDown 0.6s ease-out 0.2s both;
}

.nav-btn {
  padding: 0.5rem 1.5rem;
  border: 1px solid #e1e5e9;
  background: transparent;
  color: #333;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-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.5s;
}

.nav-btn:hover::before {
  left: 100%;
}

.nav-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.nav-btn.primary {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.nav-btn.primary:hover {
  background: #5a6fd8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hero-section {
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  animation: slideInUp 0.8s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
}

.hero-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.3));
  animation: expand 1s ease-out 0.5s both;
}

@keyframes expand {
  to {
    width: 100px;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  line-height: 1.6;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

.hero-features {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  animation: slideInUp 0.8s ease-out 0.4s both;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  color: white;
}

.feature-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon {
  transform: scale(1.2);
}

.cta-button {
  background: white;
  color: #667eea;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  animation: scaleIn 0.6s ease-out 0.6s both;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(102, 126, 234, 0.1),
    transparent
  );
  transition: left 0.6s;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: slideInUp 0.8s ease-out 0.2s both;
}

.demo-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  transition: all 0.3s ease;
}

.demo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.demo-header {
  background: #f8f9fa;
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.demo-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.dot:hover {
  transform: scale(1.2);
}

.dot.red {
  background: #ff5f56;
}

.dot.yellow {
  background: #ffbd2e;
}

.dot.green {
  background: #27ca3f;
}

.demo-content {
  padding: 1.5rem;
}

.demo-image-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.demo-original,
.demo-compressed {
  text-align: center;
}

.demo-label {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.demo-image-placeholder {
  width: 100%;
  height: 80px;
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  border: 2px dashed #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  transition: all 0.3s ease;
}

.demo-image-placeholder:hover {
  border-color: #667eea;
  color: #667eea;
}

.demo-image-placeholder.compressed {
  background: linear-gradient(45deg, #e8f5e8, #d4edda);
  border-color: #c3e6cb;
  color: #28a745;
}

.demo-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #667eea;
}

/* Ad Sections */
.ad-section {
  padding: 2rem 0;
  display: flex;
  justify-content: center;
}

.ad-section.app-ad {
  padding: 1rem 0;
  background: #f8f9fa;
}

.ad-container {
  max-width: 1200px;
  width: 100%;
  padding: 0 2rem;
}

.features-section {
  background: white;
  padding: 4rem 2rem;
  position: relative;
}

.features-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e9ecef, transparent);
}

.features-section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 3rem;
  animation: fadeIn 0.8s ease-out;
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.6s ease-out;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(102, 126, 234, 0.05),
    transparent
  );
  transition: left 0.6s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  background: white;
}

.feature-card .feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
}

/* Enhanced Authentication Styles */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.auth-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.4s ease-out;
}

.auth-form {
  padding: 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: #666;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid {
  border-color: #dc3545;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.forgot-link {
  color: #667eea;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.forgot-link:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

/* Enhanced Auth Button */
.auth-btn {
  width: 100%;
  padding: 0.75rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-btn:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-loading {
  display: none;
}

.auth-btn.loading .btn-text {
  display: none;
}

.auth-btn.loading .btn-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.auth-footer p {
  color: #666;
  font-size: 0.9rem;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-footer a:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

.close-auth {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-auth:hover {
  background: #f8f9fa;
  color: #333;
  transform: scale(1.1);
}

/* Main App Styles */
.main-app {
  min-height: 100vh;
  background: #f8f9fa;
  animation: fadeIn 0.5s ease-out;
}

.app-navbar {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 90;
}

.app-navbar .nav-container {
  padding: 1rem 2rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-name {
  color: #333;
  font-weight: 500;
}

.backToHome-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #e1e5e9;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.backToHome-btn:hover {
  background: #f8f9fa;
  color: #dc3545;
  border-color: #dc3545;
}

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

.app-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: slideInDown 0.6s ease-out;
}

.app-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

.app-header p {
  font-size: 1.1rem;
  color: #666;
}

/* Enhanced Upload Section */
.upload-section {
  margin-bottom: 3rem;
  animation: slideInUp 0.6s ease-out 0.2s both;
}

.upload-area {
  border: 3px dashed #dee2e6;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upload-area::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(102, 126, 234, 0.05),
    transparent
  );
  transition: left 0.6s;
}

.upload-area:hover::before {
  left: 100%;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
}

.upload-icon {
  margin-bottom: 1rem;
  color: #667eea;
  transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
  transform: scale(1.1);
  color: #5a6fd8;
}

.upload-area h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.upload-area p {
  color: #666;
  margin-bottom: 1rem;
}

.upload-limits {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Enhanced Compression Controls */
.compression-controls {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  animation: slideInUp 0.6s ease-out 0.3s both;
}

.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.controls-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

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

.batch-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #e1e5e9;
  background: white;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.batch-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.batch-btn.secondary {
  color: #dc3545;
  border-color: #dc3545;
}

.batch-btn.secondary:hover {
  background: #f8d7da;
}

.quality-control {
  margin-bottom: 2rem;
}

.quality-slider-container label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 1rem;
}

.quality-slider-container input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e9ecef;
  outline: none;
  margin-bottom: 1rem;
  appearance: none;
}

.quality-slider-container input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.quality-slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.quality-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #e1e5e9;
  background: white;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.preset-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.preset-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.compression-actions {
  text-align: center;
}

.compress-btn {
  padding: 0.75rem 2rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.compress-btn:hover {
  background: #5a6fd8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.compress-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Enhanced Images Grid */
.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.image-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: slideInUp 0.4s ease-out;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.image-actions {
  position: relative;
  padding: 0.5rem;
  display: flex;
  justify-content: flex-end;
}

.remove-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.image-preview-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.preview-section {
  text-align: center;
}

.preview-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.image-preview {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.image-preview:hover {
  border-color: #667eea;
  transform: scale(1.02);
}

.comparison-tools {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.comparison-btn,
.zoom-btn,
.analysis-btn {
  flex: 1;
  min-width: 100px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #e1e5e9;
  background: white;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.comparison-btn:hover,
.zoom-btn:hover,
.analysis-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.image-info {
  padding: 1rem;
  border-top: 1px solid #e9ecef;
}

.image-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.image-size {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.preview-size {
  margin-top: 0.25rem;
}

.compression-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffc107;
  transition: all 0.3s ease;
}

.status-indicator.ready {
  background: #6c757d;
}

.status-indicator.processing {
  background: #667eea;
  animation: pulse 1.5s infinite;
}

.status-indicator.completed {
  background: #28a745;
}

.status-indicator.error {
  background: #dc3545;
}

.individual-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compression-presets {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.compression-presets .preset-btn {
  flex: 1;
  min-width: 60px;
  padding: 0.3rem 0.5rem;
  font-size: 0.7rem;
}

.quality-control {
  margin-bottom: 0.75rem;
}

.quality-control label {
  display: block;
  font-size: 0.8rem;
  color: #333;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.quality-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #e9ecef;
  outline: none;
  margin-bottom: 0.5rem;
  appearance: none;
}

.quality-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quality-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.image-buttons {
  display: flex;
  gap: 0.5rem;
}

.compress-single-btn,
.download-single-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.compress-single-btn {
  background: #667eea;
  color: white;
}

.compress-single-btn:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.download-single-btn {
  background: #28a745;
  color: white;
}

.download-single-btn:hover {
  background: #218838;
  transform: translateY(-1px);
}

/* Enhanced Download Section */
.download-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  animation: slideInUp 0.6s ease-out;
}

.download-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #28a745;
  margin-bottom: 1rem;
}

.compression-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.summary-item {
  text-align: center;
}

.summary-label {
  display: block;
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
}

.download-btn {
  padding: 0.75rem 2rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.download-btn:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Enhanced Progress Indicators */
.batch-progress {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  animation: slideInDown 0.4s ease-out;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.progress-text {
  font-size: 0.85rem;
  color: #6c757d;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.3s ease;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: 200px 0;
  }
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6c757d;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: white;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: slideInDown 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #28a745;
}

.toast.error::before {
  background: #dc3545;
}

.toast.warning::before {
  background: #ffc107;
}

.toast.info::before {
  background: #17a2b8;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.9rem;
  color: #666;
}

.toast-close {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.toast-close:hover {
  background: #f8f9fa;
  color: #333;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1200;
  animation: fadeIn 0.3s ease-out;
}

.loading-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  max-width: 300px;
  animation: scaleIn 0.4s ease-out;
}

.loading-spinner-large {
  margin-bottom: 1rem;
  color: #667eea;
}

.loading-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.loading-content p {
  color: #666;
  font-size: 0.9rem;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  animation: scaleIn 0.4s ease-out;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #f8f9fa;
  color: #333;
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.comparison-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.comparison-side {
  text-align: center;
}

.comparison-side h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
}

.comparison-image-container {
  position: relative;
}

.comparison-image {
  max-width: 300px;
  max-height: 300px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

.comparison-info {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
}

.comparison-info span {
  display: block;
  margin-bottom: 0.25rem;
}

.comparison-divider {
  width: 2px;
  height: 300px;
  background: #e9ecef;
  margin: 0 1rem;
}

.comparison-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 6rem 1rem 3rem;
    gap: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-features {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-container {
    padding: 1rem;
  }

  .nav-buttons {
    gap: 0.5rem;
  }

  .nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .container {
    padding: 1rem;
  }

  .images-grid {
    grid-template-columns: 1fr;
  }

  .controls-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .batch-actions {
    justify-content: center;
  }

  .quality-presets {
    justify-content: center;
  }

  .comparison-container {
    grid-template-columns: 1fr;
  }

  .comparison-divider {
    width: 100%;
    height: 2px;
    margin: 1rem 0;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
  }

  .toast {
    min-width: auto;
  }

  .auth-container {
    margin: 1rem;
  }

  .form-options {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .upload-area {
    padding: 2rem 1rem;
  }

  .compression-controls {
    padding: 1rem;
  }

  .image-preview-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .comparison-tools {
    flex-direction: column;
  }

  .compression-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-item {
    grid-column: 1 / -1;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .auth-overlay,
  .ad-section,
  .batch-actions,
  .toast-container,
  .loading-overlay {
    display: none !important;
  }

  .main-app {
    background: white;
  }

  .image-card {
    break-inside: avoid;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .upload-area {
    border-color: #000;
  }

  .image-preview {
    border-color: #000;
  }

  .nav-btn,
  .batch-btn,
  .preset-btn {
    border-color: #000;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
