/* Base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9fafb;
  color: #111827;
}

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

h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

/* Upload area */
.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.upload-area:hover {
  border-color: #3b82f6;
}

/* Settings */
.settings {
  margin-bottom: 1.5rem;
}

select, button {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  background-color: white;
  font-size: 1rem;
  cursor: pointer;
}

button {
  background-color: #3b82f6;
  color: white;
  border: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #2563eb;
}

button:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
}

/* Results */
.results {
  margin-top: 2rem;
}

.image-comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.image-container {
  flex: 1;
  min-width: 300px;
  background-color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-card {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 0.5rem;
}

.metric-label {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
  width: 100%;
  background-color: #f9fafb;
}

.tab {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition: all 0.2s ease;
  flex: 1;
  text-align: center;
  color: #6b7280;
}

.tab:hover {
  color: #3b82f6;
  background-color: #f3f4f6;
}

.tab.active {
  border-bottom-color: #3b82f6;
  color: #3b82f6;
  background-color: white;
}

/* Custom tab buttons for the results section */
.results-tabs {
  display: flex;
  width: 100%;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
  overflow: hidden;
}

.results-tab-button {
  flex: 1;
  padding: 1rem 1.5rem;
  font-weight: 500;
  text-align: center;
  color: #6b7280;
  background-color: #f9fafb;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.results-tab-button:hover {
  color: #3b82f6;
  background-color: #f3f4f6;
}

.results-tab-button.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background-color: white;
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 3px solid #3b82f6;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alert/Notice styling */
.alert {
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

.alert-warning {
  background-color: #fff7ed;
  border-color: #f97316;
  color: #9a3412;
}

.alert-error {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
}

.alert-success {
  background-color: #f0fdf4;
  border-color: #22c55e;
  color: #166534;
}

/* Compression Notice styling */
.compression-notice {
  background-color: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #92400e;
  display: flex;
  align-items: flex-start;
}

.compression-notice::before {
  content: "⚠️";
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

/* Responsive layout */
@media (max-width: 768px) {
  .image-comparison {
    flex-direction: column;
  }
  
  .metrics {
    grid-template-columns: 1fr;
  }
}

/* Fallback for Tailwind classes */
.min-h-screen { min-height: 100vh; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.max-w-5xl { max-width: 64rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.mb-12 { margin-bottom: 3rem; }
.text-4xl { font-size: 2.25rem; }
.font-bold { font-weight: 700; }
.text-gray-900 { color: #111827; }
.mb-2 { margin-bottom: 0.5rem; }
.text-lg { font-size: 1.125rem; }
.text-gray-600 { color: #4b5563; }
.bg-white { background-color: white; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.rounded-lg { border-radius: 0.5rem; }
.p-6 { padding: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-8 { gap: 2rem; }
.text-xl { font-size: 1.25rem; }
.font-semibold { font-weight: 600; }
.text-gray-800 { color: #1f2937; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.space-x-4 > * + * { margin-left: 1rem; }
.w-full { width: 100%; }
.mt-8 { margin-top: 2rem; }
.text-red-500 { color: #ef4444; }

@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}
