:root { 
  --bg: #fafafa; 
  --panel: #ffffff; 
  --text: #1a1a1a; 
  --muted: #666666; 
  --brand: #0080ff; 
  --brand-hover: #0066cc; 
  --border: #e0e0e0; 
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { 
  margin: 0; 
  background: var(--bg); 
  color: var(--text); 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
  line-height: 1.6; 
}

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 2rem 1.5rem; 
}

/* Top Header */
.top-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.header-icon {
  width: 48px;
  height: 48px;
  background: var(--text);
  color: white;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.header-icon svg {
  width: 28px;
  height: 28px;
}

.header-text {
  max-width: 700px;
}

.header-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.header-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Hero Two-Column Layout */
.hero-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 4rem;
  align-items: start;
  min-height: 80vh;
  padding-top: 3rem;
}

@media (max-width: 960px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 2rem;
  }
}

/* LEFT SIDE: Before/After Images + Text */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.before-after-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 600px;
}

.hero-image-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: repeating-conic-gradient(#e8e8e8 0% 25%, #f5f5f5 0% 50%) 50% / 16px 16px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.hero-sample-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-label {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hero-title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 2rem;
  max-width: 500px;
}

.hero-features li {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: center;
}

@media (max-width: 600px) {
  .hero-features {
    grid-template-columns: 1fr;
  }
}

/* RIGHT SIDE: Upload Area */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.uploader {
  border: 2px dashed var(--border);
  border-radius: 16px;
  background: var(--panel);
  padding: 4rem 2rem;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  min-height: 400px;
}

.uploader:hover {
  border-color: var(--brand);
  background: #f8fbff;
}

.uploader.dragover {
  border-color: var(--brand);
  background: #f0f7ff;
  box-shadow: 0 0 0 4px rgba(0,128,255,0.1);
}

.uploader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.btn-upload {
  appearance: none;
  border: none;
  background: var(--brand);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.05s ease;
  box-shadow: 0 2px 8px rgba(0,128,255,0.25);
}

.btn-upload:hover {
  background: var(--brand-hover);
  box-shadow: 0 4px 12px rgba(0,128,255,0.35);
}

.btn-upload:active {
  transform: translateY(1px);
}

.upload-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Standard Buttons */
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f5f5f5;
  border-color: #ddd;
}

/* Preview Grid */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 800px) {
  .preview-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: repeating-conic-gradient(#e8e8e8 0% 25%, #f5f5f5 0% 50%) 50% / 16px 16px;
}

.output-wrap {
  position: relative;
}

.loading {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.9);
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0,128,255,0.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* How To Section */
.how-to-section {
  background: #f8f9fa;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  margin-top: 2rem;
  border: 1px solid var(--border);
}

.how-to-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2.5rem;
  color: var(--text);
}

.how-to-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .how-to-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.step-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.step-description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.step-description strong {
  font-weight: 600;
  color: var(--text);
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 1.5rem 0;
  color: var(--muted);
  text-align: center;
}
