:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #0f172a;
  line-height: 1.7;
}

.cj-hero .container,
.cj-main .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.cj-hero {
  background: linear-gradient(120deg, #8b5cf6, #6366f1);
  color: #fff;
  padding: 48px 0;
}

.cj-hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cj-eyebrow {
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cj-hero-text h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin: 0 0 12px;
}

.cj-hero-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cj-hero-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.cj-main {
  padding: 36px 0 50px;
}

.cj-grid {
  display: flex;
  justify-content: center;
}

.cj-tool-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 15px 45px rgba(15, 23, 42, 0.08);
}

.cj-upload {
  border: 2px dashed #cbd5f5;
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  background: #f9fbff;
  cursor: pointer;
  margin: 18px 0;
}

.cj-upload input[type='file'] {
  display: none;
}

.cj-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  text-align: center;
}

.cj-preview img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 14px;
  border: 1px solid #e5eaf9;
  display: none;
}

.cj-label {
  font-weight: 600;
  display: block;
  margin-top: 16px;
}

#cj-quality {
  width: 100%;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: #f1f5f9;
  color: #111827;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #cbd5f5;
  color: #6366f1;
}

.cj-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.cj-section {
  margin-top: 34px;
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 15px 45px rgba(15, 23, 42, 0.05);
}

.cj-section ul {
  padding-left: 18px;
  margin: 0;
}

@media (max-width: 700px) {
  .cj-button-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

.cj-input-row {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cj-input-row input[type='number'] {
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid #d6deef;
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
}

.cj-helper {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 600;
  margin-left: 6px;
}

.cj-hint {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.cj-status {
  margin-top: 10px;
  font-weight: 600;
  color: #0f172a;
}

.cj-status.cj-status-error {
  color: #dc2626;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .cj-grid {
    padding: 0 8px;
  }

  .cj-preview {
    grid-template-columns: 1fr;
  }

  .cj-button-row {
    flex-direction: column;
  }

  .cj-button-row .btn {
    width: 100%;
  }

  .cj-tool-card {
    padding: 20px;
  }
}
