:root {
  color-scheme: dark;
  --bg: #050716;
  --surface: rgba(18, 24, 56, 0.92);
  --surface-strong: #11152c;
  --text: #f7f8ff;
  --muted: #9aa3db;
  --blue: #6c73ff;
  --purple: #bc5cff;
  --accent: #00e5ff;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 40px 120px rgba(24, 30, 68, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, rgba(108, 115, 255, 0.25), transparent 28%),
    radial-gradient(circle at 20% 20%, rgba(188, 92, 255, 0.14), transparent 20%),
    linear-gradient(180deg, #03040b 0%, #070918 55%, #050715 100%);
  color: var(--text);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 80% 10%, rgba(0, 229, 255, 0.08), transparent 18%),
    radial-gradient(circle at 10% 90%, rgba(188, 92, 255, 0.08), transparent 16%);
  pointer-events: none;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  position: relative;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: rgba(5, 7, 22, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  font-size: 1rem;
}

.site-header .btn {
  min-width: 120px;
}

main {
  padding: 0 24px 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
  gap: 32px;
  padding: 48px 0 32px;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.9rem, 4vw, 4.5rem);
  line-height: 0.95;
  max-width: 10ch;
}

.hero p {
  margin: 24px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  border: none;
  border-radius: 16px;
  padding: 16px 24px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  letter-spacing: 0.01em;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  box-shadow: 0 20px 50px rgba(108, 115, 255, 0.24);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-panel {
  position: relative;
}

.dashboard-card {
  border-radius: 32px;
  padding: 32px;
  background: rgba(11, 15, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.small-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 1.75rem;
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(108, 115, 255, 0.18), rgba(0, 229, 255, 0.15));
  color: #d8e0ff;
  font-weight: 600;
}

.upload-dropzone {
  margin: 28px 0 18px;
  min-height: 220px;
  border-radius: 28px;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.upload-dropzone.dragover {
  border-color: rgba(108, 115, 255, 0.7);
  background: rgba(108, 115, 255, 0.08);
}

.upload-dropzone strong {
  color: #fff;
}

.dropzone-preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-preview {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
}

.clear-image-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10;
}

.clear-image-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.08);
}

.dropzone-preview-container.hidden {
  display: none;
}

.dropzone-content.hidden {
  display: none;
}


.process-options {
  display: grid;
  gap: 18px;
}

.checkbox-group {
  display: grid;
  gap: 12px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.checkbox-group input[type='checkbox'] {
  width: 18px;
  height: 18px;
}

.upscale-settings {
  display: grid;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.radio-group input[type='radio'] {
  width: 18px;
  height: 18px;
}

.btn-full {
  width: 100%;
}

#process-btn {
  margin-top: 12px;
}

.status-bar {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.hidden {
  display: none !important;
}

.features,
.how-it-works,
.pricing {
  margin-top: 60px;
}

.section-title {
  display: inline-flex;
  margin-bottom: 24px;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.4rem;
}

.section-title::before {
  content: '';
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card,
.step-card,
.pricing-card,
.history-card {
  border-radius: 24px;
  padding: 28px;
  background: rgba(15, 20, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-card h3,
.step-card h3 {
  margin: 0 0 12px;
}

.feature-card p,
.step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--accent);
  font-weight: 700;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step-card {
  position: relative;
}

.step-number {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: 3rem;
  line-height: 1;
  color: rgba(108, 115, 255, 0.15);
}

.preview-panel {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
}

.preview-card,
.history-card {
  border-radius: 32px;
  background: rgba(12, 16, 36, 0.92);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.preview-card h3,
.history-card h3 {
  margin-top: 0;
}

.preview-image-wrap {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 320px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-image-wrap img {
  width: 100%;
  display: block;
  object-fit: contain;
}

.compare-slider {
  position: relative;
  margin-top: 24px;
}

.compare-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.compare-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.15), transparent 35%);
}

.compare-range {
  width: 100%;
  margin-top: 14px;
}

.preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.preview-meta p {
  margin: 0;
  color: var(--muted);
}

.history-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.history-card li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.history-card button {
  min-width: auto;
  padding: 10px 14px;
}

.pricing-card {
  min-height: 220px;
  display: grid;
  place-content: center;
  text-align: center;
}

.pricing-card h3 {
  margin: 0 0 12px;
}

.pricing-card p {
  margin: 0;
  color: var(--muted);
}

footer {
  margin-top: 60px;
  padding: 28px 0 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(2, 4, 16, 0.78);
}

.modal-panel {
  width: min(520px, calc(100% - 36px));
  padding: 32px;
  border-radius: 32px;
  background: rgba(10, 14, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.modal-panel h2 {
  margin: 0 0 10px;
}

.modal-panel p {
  margin: 0 0 24px;
  color: var(--muted);
}

.modal-panel form {
  display: grid;
  gap: 16px;
}

.modal-panel label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.modal-panel input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.modal-actions .discreet {
  background: transparent;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(10, 14, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 950px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .site-header,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1 {
    font-size: 2.9rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .compare-overlay {
    position: relative;
  }
}
