/* Reusable Components CSS - Following Plan Structure */

/* Control Panel Styles (for specialized pages) */
.control-panel, .tips-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.control-panel:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08); /* Subtle */
  /* No transform scale/translateY for functional pages */
}

/* Drag & Drop Zone Styles */
.drag-zone {
  border: 2px dashed #e0e0e0;
  border-radius: 20px;
  transition: all 0.3s ease;
  padding: 3rem;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
}

.drag-zone:hover {
  border-color: #007AFF; /* iOS Blue */
  transform: scale(1.005); /* Very light feedback */
  background: rgba(0, 122, 255, 0.02);
}

.drag-zone.dragover {
  border-color: #007AFF;
  background: rgba(0, 122, 255, 0.05);
  transform: scale(1.01);
}

/* File Button Styles */
.file-button {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  color: #007AFF;
}

.file-button:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #007AFF;
  /* No excessive animation for functional elements */
}

/* Progress Bar Styles */
.progress-container {
  background: #f0f0f0;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar {
  background: linear-gradient(90deg, #007AFF 0%, #5AC8FA 100%);
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
  width: 0%;
}

/* File List Styles */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease;
}

.file-item:hover {
  transform: translateY(-1px);
}

.file-thumbnail {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #f8f9fa;
}

.file-info {
  flex-grow: 1;
}

.file-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.file-size {
  color: #666;
  font-size: 0.85rem;
}

.file-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.file-status.waiting {
  background: #f8f9fa;
  color: #666;
}

.file-status.processing {
  background: #e3f2fd;
  color: #1976d2;
}

.file-status.complete {
  background: #e8f5e8;
  color: #2e7d2e;
}

.file-status.error {
  background: #ffebee;
  color: #d32f2f;
}

/* Download Button */
.download-button {
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.download-button:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.download-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Tips Widget Styles */
.tips-widget {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.tips-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 1.1rem;
}

.tips-list {
  list-style: none;
}

.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.tips-list li::before {
  content: "✓";
  color: #34c759;
  font-weight: bold;
  margin-top: 2px;
}

/* Platform-specific tip colors */
.tips-widget.instagram {
  border-left: 4px solid #e4405f;
}

.tips-widget.facebook {
  border-left: 4px solid #1877f2;
}

.tips-widget.twitter {
  border-left: 4px solid #14171A; /* X (Twitter) dark brand color */
}

.tips-widget.linkedin {
  border-left: 4px solid #0077b5;
}

.tips-widget.youtube {
  border-left: 4px solid #ff0000;
}

.tips-widget.pinterest {
  border-left: 4px solid #bd081c;
}

.tips-widget.wordpress {
  border-left: 4px solid #21759b;
}

.tips-widget.resize {
  border-left: 4px solid #069494;
}

/* FAQ Section - Full-width section style */
.faq-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

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

.faq-item {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  border-left: 4px solid #e4405f; /* Default Instagram pink */
}

/* FAQ Items - Platform Colors */
.faq-item.facebook {
  border-left: 4px solid #1877f2; /* Facebook blue */
}

.faq-item.instagram {
  border-left: 4px solid #e4405f; /* Instagram pink */
}

.faq-item.youtube {
  border-left: 4px solid #ff0000; /* YouTube red */
}

.faq-item.wordpress {
  border-left: 4px solid #21759b; /* WordPress blue */
}

.faq-item.linkedin {
  border-left: 4px solid #0077b5; /* LinkedIn blue */
}

.faq-item.twitter {
  border-left: 4px solid #14171A; /* X (Twitter) dark brand color */
}

.faq-item.pinterest {
  border-left: 4px solid #bd081c; /* Pinterest red */
}

.faq-item.resize {
  border-left: 4px solid #069494; /* Resize teal */
}

.faq-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.faq-answer {
  font-size: 1rem;
  line-height: 1.6;
  color: #4a5568;
}

/* Mobile responsiveness for FAQ */
@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .faq-item {
    padding: 1.5rem;
  }
  
  .faq-question {
    font-size: 1rem;
  }
  
  .faq-answer {
    font-size: 0.95rem;
  }
}

/* Features Page Styles */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Smart Limits section - 4 boxes in one row on desktop */
#smart-limits .features-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

#smart-limits .feature-card {
  padding: 2rem 1.5rem 2.5rem 1.5rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Smart Processing section - 4 boxes in one row on desktop */
#smart-processing .features-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

#smart-processing .feature-card {
  padding: 2rem 1.5rem 2.5rem 1.5rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* WebP Converter section - 4 boxes in one row on desktop */
#webp-converter .features-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

#webp-converter .feature-card {
  padding: 2rem 1.5rem 2.5rem 1.5rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: white;
}

.feature-card h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.feature-card p {
  color: #6c757d;
  line-height: 1.6;
  margin: 0;
}

/* Platform Cards Grid */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.platform-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.platform-card:hover {
  transform: translateY(-5px);
}

.platform-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

.platform-card.instagram .platform-icon { color: #e4405f; }
.platform-card.facebook .platform-icon { color: #1877f2; }
.platform-card.twitter .platform-icon { color: #000000; }
.platform-card.linkedin .platform-icon { color: #0077b5; }
.platform-card.youtube .platform-icon { color: #ff0000; }
.platform-card.pinterest .platform-icon { color: #bd081c; }
.platform-card.wordpress .platform-icon { color: #21759b; }
.platform-card.resize .platform-icon { color: #007AFF; }

.formats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.format-tag {
  background: #f8f9fa;
  color: #495057;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.platform-card h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.platform-card p {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Quality Grid */
.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.quality-option {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  transition: transform 0.3s ease;
}


.quality-option.featured {
  border: 2px solid #007AFF;
  transform: scale(1.05);
}

.quality-option.featured::before {
  content: "Recommended";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #007AFF;
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.quality-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.quality-badge.light { background: #d1ecf1; color: #0c5460; }
.quality-badge.medium { background: #d4edda; color: #155724; }
.quality-badge.heavy { background: #f8d7da; color: #721c24; }

.quality-option h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.quality-option p {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.quality-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quality-stats span {
  background: #f8f9fa;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Benefits Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.benefit-item {
  text-align: center;
  padding: 1.5rem;
}

.benefit-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
}

.benefit-item h4 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.benefit-item p {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #007AFF, #5856D6);
  color: white;
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Section Alternating Backgrounds */
.section-alt {
  background: #f8f9fa;
}

/* Features page section spacing */
.features-page .section {
  padding: 5rem 0;
}

/* Reduce spacing around benefits section on features page */
.features-page .section:nth-of-type(2) {
  padding: 2.5rem 0;
}

.features-page .section:nth-of-type(3) {
  padding-top: 2.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Reset Smart Limits to stacked layout on mobile */
  #smart-limits .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  #smart-limits .feature-card {
    min-height: auto;
    padding: 2rem;
  }
  
  /* Reset Smart Processing to stacked layout on mobile */
  #smart-processing .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #smart-processing .feature-card {
    min-height: auto;
    padding: 2rem;
  }

  /* Reset WebP Converter to stacked layout on mobile */
  #webp-converter .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #webp-converter .feature-card {
    min-height: auto;
    padding: 2rem;
  }

  .platforms-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .quality-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .quality-option.featured {
    transform: none;
  }
  
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cta-content h2 {
    font-size: 2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-lg {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .formats-list {
    flex-direction: column;
    align-items: center;
  }
}

/* Privacy Policy Content Styles */
.privacy-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.privacy-content h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin: 2.5rem 0 1rem 0;
  font-weight: 600;
}

.privacy-content h3 {
  color: #34495e;
  font-size: 1.3rem;
  margin: 1.5rem 0 0.75rem 0;
  font-weight: 600;
}

.privacy-content p {
  margin-bottom: 1.2rem;
  color: #4a5568;
  font-size: 1rem;
}

.privacy-content ul {
  margin: 1rem 0 1.5rem 0;
  padding-left: 2rem;
}

.privacy-content li {
  margin-bottom: 0.5rem;
  color: #4a5568;
  line-height: 1.5;
}

.privacy-content a {
  color: #007AFF;
  text-decoration: none;
}

.privacy-content a:hover {
  text-decoration: underline;
}

.privacy-content .last-updated {
  margin-top: 3rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #6c757d;
}

/* Contact Form Styles */
.contact-form-container {
  max-width: 600px;
  margin: 3rem auto;
}

.contact-form {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007AFF;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-submit-btn {
  background: #007AFF;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
}

.contact-submit-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3);
}

.contact-submit-btn i {
  font-size: 0.9rem;
}

/* Success/Error Messages */
.contact-message {
  max-width: 600px;
  margin: 0 auto 2rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

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

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

/* Mobile responsiveness */
@media (max-width: 768px) {
  .contact-form {
    padding: 1.5rem;
    margin: 0 1rem;
  }
  
  .contact-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Cross-Platform Navigation Bar */
.cross-platform-nav {
  background: #f8f9fa;
  padding: 2.5rem 0;
  border-top: 1px solid #e9ecef;
}

.cross-platform-nav .container {
  text-align: center;
}

.cross-platform-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.cross-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.cross-platform-card {
  background: white;
  border-radius: 12px;
  padding: 1rem 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-height: 80px;
}

.cross-platform-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.cross-platform-icon {
  font-size: 1.5rem;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cross-platform-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
  line-height: 1.2;
}

/* Platform-specific colors for cross-platform nav */
.cross-platform-card.instagram .cross-platform-icon { 
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); 
}
.cross-platform-card.facebook .cross-platform-icon { 
  background: #1877f2; 
}
.cross-platform-card.twitter .cross-platform-icon { 
  background: #000000; 
}
.cross-platform-card.linkedin .cross-platform-icon { 
  background: #0077b5; 
}
.cross-platform-card.youtube .cross-platform-icon { 
  background: #ff0000; 
}
.cross-platform-card.pinterest .cross-platform-icon { 
  background: #bd081c; 
}
.cross-platform-card.wordpress .cross-platform-icon { 
  background: #21759b; 
}
.cross-platform-card.resize .cross-platform-icon {
  background: linear-gradient(135deg, #007AFF, #5856D6);
}
.cross-platform-card.webp .cross-platform-icon {
  background: linear-gradient(135deg, #00C9A7, #00B4D8);
}

/* Desktop layout - 1 row */
@media (min-width: 769px) {
  .cross-platform-grid {
    grid-template-columns: repeat(9, 1fr);
    gap: 0.75rem;
  }
  
  .cross-platform-card {
    padding: 0.75rem 0.5rem;
    min-height: 75px;
  }
  
  .cross-platform-icon {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }
  
  .cross-platform-name {
    font-size: 0.8rem;
  }
}

/* Mobile layout - 2 rows */
@media (max-width: 768px) {
  .cross-platform-nav {
    padding: 2rem 0;
  }
  
  .cross-platform-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
  }
  
  .cross-platform-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
  }
}

/* Specialized Page Styles - Following Plan Layout */

/* Instagram Hero Styling */
.instagram-hero {
  background: linear-gradient(135deg, #E4405F 0%, #C13584 100%);
}

/* YouTube Hero Styling */
.hero.youtube-hero {
  background: linear-gradient(135deg, #ff0000 0%, #b00000 100%);
}

/* Pinterest Hero Styling */
.hero.pinterest-hero {
  background: linear-gradient(135deg, #E60023 0%, #BD081C 100%);
}

/* WordPress Hero Styling */
.hero.wordpress-hero {
  background: linear-gradient(135deg, #00749C 0%, #005A7A 100%);
}

.hero.resize-hero {
  background: linear-gradient(135deg, #069494 0%, #005660 100%);
}

.instagram-hero .hero-title i {
  margin-right: 0.5rem;
}

/* Control Section - 70%/25% Layout as specified in plan */
.control-section {
  padding: 3rem 0;
  background: white;
}

.control-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* Control Panel - 70% */
.control-panel {
  flex: 0 0 70%;
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.control-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.preset-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.preset-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-option:hover {
  border-color: #E4405F;
  background: rgba(228, 64, 95, 0.02);
}

.preset-option input[type="radio"] {
  margin-right: 0.75rem;
  accent-color: #E4405F;
}

.preset-option input[type="radio"]:checked + .preset-label {
  color: #E4405F;
}

.preset-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.preset-dimensions {
  font-size: 0.85rem;
  color: #666;
}

.quality-controls h4 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.quality-slider {
  margin-bottom: 1rem;
}

.quality-slider label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.slider-container {
  position: relative;
  margin-bottom: 1rem;
}

.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E4405F;
  cursor: pointer;
}

/* Slider Markers */
.slider-markers {
  position: relative;
  margin-top: 0.5rem;
}

.optimal-marker {
  position: absolute;
  left: calc((85 - 60) / (95 - 60) * 100%); /* Exact 85% position: (85-60)/(95-60) = 25/35 = 71.43% */
  transform: translateX(-50%);
}

.marker-line {
  display: block;
  width: 2px;
  height: 20px;
  background: #E4405F;
  margin: 0 auto 0.25rem;
}

.marker-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #E4405F;
  white-space: nowrap;
}

/* Slider Extremes */
.slider-extremes {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.8rem;
}

.extreme-left,
.extreme-right {
  display: flex;
  flex-direction: column;
  max-width: 45%;
}

.extreme-left {
  align-items: flex-start;
  text-align: left;
}

.extreme-right {
  align-items: flex-end;
  text-align: right;
}

.extreme-value {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.extreme-desc {
  color: #666;
  font-size: 0.75rem;
  line-height: 1.3;
}

.compression-options {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.compression-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compression-selector select {
  padding: 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
}

.compression-explanations {
  flex: 1;
}

.compression-desc {
  font-size: 14px;
  color: #666;
}

/* Tips Widget - 25% */
.tips-widget {
  flex: 0 0 25%;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Upload Section Styles */
.upload-section {
  padding: 3rem 0;
  background: #f8f9fa;
}

.drag-zone {
  border: 2px dashed #e0e0e0;
  border-radius: 20px;
  transition: all 0.3s ease;
  padding: 3rem;
  text-align: center;
  background: white;
  cursor: pointer;
}

.drag-zone:hover {
  border-color: #E4405F;
  transform: scale(1.005);
  background: rgba(228, 64, 95, 0.02);
}

.drag-zone i {
  font-size: 3rem;
  color: #E4405F;
  margin-bottom: 1rem;
}

.drag-zone h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.drag-zone p {
  color: #666;
  margin-bottom: 1rem;
}

.supported-formats {
  color: #999;
  font-size: 0.85rem;
}

/* File Section */
.file-section {
  padding: 2rem 0;
  background: white;
}

.file-controls {
  text-align: center;
  margin-bottom: 2rem;
}

.file-gallery {
  min-height: 200px;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  background: #fafbfc;
  position: relative;
}

.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  color: #666;
}

.gallery-placeholder i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ccc;
}

/* Gallery Items Display */
.gallery-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  min-height: 200px;
}

.gallery-item {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: white;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  background: #f8f9fa;
}

.gallery-info {
  padding: 0.5rem;
  font-size: 0.75rem;
}

.gallery-filename {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-filesize {
  color: #666;
  font-size: 0.7rem;
}

.gallery-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #666;
  transition: all 0.2s ease;
}

.gallery-remove:hover {
  background: #ff4757;
  color: white;
  transform: scale(1.1);
}

/* Tips Section */
.tips-section {
  padding: 4rem 0;
  background: #f8f9fa;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.tip-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}


.tip-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.tip-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.tip-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Responsive Specialized Pages */
@media (max-width: 768px) {
  .control-layout {
    flex-direction: column;
  }
  
  .control-panel {
    flex: none;
    margin-bottom: 1rem;
  }
  
  .tips-widget {
    flex: none;
    width: 100%;
  }
  
  .preset-options {
    grid-template-columns: 1fr;
  }
  
  .control-panel, .tips-card {
    padding: 16px;
  }
  
  .drag-zone {
    padding: 2rem 1rem;
  }
  
  .file-item {
    padding: 12px;
  }
  
  .file-thumbnail {
    width: 40px;
    height: 40px;
  }

  /* Fix quality slider text overlap on mobile */
  .marker-line {
    height: 12px; /* Reduced from 20px to bring text up */
    margin: 0 auto 0.15rem; /* Reduced margin too */
  }
  
  .marker-text {
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .slider-extremes {
    margin-top: 0.75rem;
    font-size: 0.75rem;
  }

  .extreme-left,
  .extreme-right {
    max-width: 48%;
  }

  .extreme-desc {
    color: #666;
    font-size: 0.7rem;
    line-height: 1.2;
    margin-top: 0.25rem;
  }

  .extreme-value {
    font-size: 0.8rem;
  }

  /* Mobile button layout for gallery controls */
  .gallery-controls {
    flex-direction: column; /* Stack buttons vertically */
    gap: 1rem; /* Space between clear all and download buttons */
    margin-top: 1rem; /* Add some space above the buttons */
  }

  .clear-all-btn {
    width: 100%; /* Full width for clear all button */
  }

  .download-buttons {
    display: flex; /* Make download buttons side-by-side */
    width: 100%; /* Occupy full width */
    gap: 0.5rem; /* Space between download buttons */
  }

  .download-all-btn,
  .download-zip-btn {
    flex: 1; /* Each takes 50% width */
  }
}