.results-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.back-button {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.back-button:hover {
  background: #0056b3;
}

.header h1 {
  margin: 0;
  color: #333;
  font-size: 2rem;
}

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

.loading {
  text-align: center;
  font-size: 18px;
  color: #666;
  margin: 50px 0;
}

.no-results {
  text-align: center;
  margin: 50px 0;
  color: #666;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.image-comparison {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 15px;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.image-comparison:hover {
  border-color: #007bff;
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
}

.image-comparison.selected {
  border-color: #007bff;
  background: #f8f9ff;
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.25);
}

.image-info {
  margin-bottom: 15px;
}

.image-info h3 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 1.1rem;
}

.size-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #666;
}

.compression-ratio {
  font-weight: bold;
  color: #28a745 !important;
}

.compressed-name {
  font-style: italic;
  color: #6c757d !important;
  font-size: 11px;
}

.images-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

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

.image-section h4 {
  margin: 0 0 10px 0;
  color: #555;
  font-size: 14px;
  font-weight: 600;
}

.image-section img {
  max-width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.detailed-view {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.detailed-view h2 {
  margin: 0 0 15px 0;
  color: #333;
  text-align: center;
  font-size: 1.5rem;
}

.filename-comparison {
  text-align: center;
  margin: 0 0 25px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  color: #555;
  font-size: 14px;
}

.side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.image-detail {
  text-align: center;
}

.image-detail h3 {
  margin: 0 0 15px 0;
  color: #555;
  font-size: 1.2rem;
}

.detail-image {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid #ddd;
  margin-bottom: 15px;
}

.image-stats {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.image-stats p {
  margin: 5px 0;
  color: #555;
  font-size: 14px;
}

.diagnostics-section {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.diagnostics-section h3 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1.2rem;
}

.diagnostics-text {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 15px;
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #495057;
  overflow-x: auto;
}

/* Success indicator for diagnostics */
.diagnostics-text:contains("✅") {
  border-left: 4px solid #28a745;
}

/* Warning indicator for diagnostics */
.diagnostics-text:contains("⚠️") {
  border-left: 4px solid #ffc107;
}

/* Error indicator for diagnostics */
.diagnostics-text:contains("❌") {
  border-left: 4px solid #dc3545;
}

/* Settings Page Styles */
.settings-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.setting-group {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.setting-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #495057;
  font-size: 16px;
}

.setting-group input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  margin: 10px 0;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
}

.setting-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: none;
}

.setting-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  margin: 10px 0;
}

.setting-value {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  margin-left: 10px;
}

.setting-group small {
  display: block;
  color: #6c757d;
  font-size: 12px;
  margin-top: 5px;
  font-style: italic;
}

.save-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  display: block;
  margin: 30px auto 0 auto;
}

.save-button:hover {
  background: #218838;
}

.settings-info {
  max-width: 600px;
  margin: 40px auto 0 auto;
  padding: 20px;
  background: #e9ecef;
  border-radius: 8px;
  border-left: 4px solid #17a2b8;
}

.settings-info h3 {
  margin: 0 0 15px 0;
  color: #495057;
}

.settings-info ul {
  list-style: disc;
  padding-left: 20px;
  color: #495057;
}

.settings-info li {
  margin: 8px 0;
  line-height: 1.5;
}

/* Responsive design */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .images-grid {
    grid-template-columns: 1fr;
  }
  
  .side-by-side {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .images-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .results-page {
    padding: 10px;
  }
  
  .detailed-view {
    padding: 20px;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
}
