:root {
  --bg: #060606;
  --text: #f3f0f8;
  --muted: #b5adc8;
  --blue-a: #b5ebff;
  --blue-b: #177eff;
  --line: rgba(199, 228, 255, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(126, 73, 255, 0.14), transparent 24%),
    radial-gradient(circle at 78% 35%, rgba(30, 110, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #0a0a0a 0%, #030303 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 2px,
      transparent 2px,
      transparent 88px
    );
  opacity: 0.08;
  pointer-events: none;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 60% 80%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.5px);
  background-size: 180px 180px, 220px 220px, 260px 260px;
  mix-blend-mode: screen;
}

.layout {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 560px);
  gap: 40px;
  align-items: center;
  padding: 48px 0;
}

.hero {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.32em;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-a);
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 0.94;
  text-transform: uppercase;
}

.hero h1 span {
  color: #5ea9c8;
}

.description {
  width: min(100%, 540px);
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.description code {
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 20px;
}

.upload-button,
.ghost-button,
.download-button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.upload-button,
.download-button {
  color: #071225;
  background: linear-gradient(135deg, #ebf8ff 0%, #a2daff 100%);
  box-shadow: 0 10px 24px rgba(113, 185, 255, 0.22);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.upload-button:hover,
.ghost-button:hover,
.download-button:hover,
.dropzone:hover,
.dropzone.is-dragover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(69, 128, 255, 0.2);
}

.dropzone,
.adjustments {
  width: min(100%, 540px);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(33, 39, 61, 0.65), rgba(18, 21, 34, 0.5)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(186, 225, 255, 0.18);
}

.dropzone {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 26px;
  border-style: dashed;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.dropzone.is-dragover {
  border-color: rgba(178, 226, 255, 0.95);
}

.dropzone input {
  display: none;
}

.dropzone-title {
  font-size: 1rem;
  font-weight: 700;
}

.adjustments {
  margin-top: 20px;
  padding: 18px 18px 8px;
}

.field {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.field span {
  font-size: 0.95rem;
  font-weight: 600;
}

.field input[type="range"] {
  width: 100%;
}

.preview-panel {
  display: flex;
  justify-content: center;
}

.canvas-frame {
  width: min(100%, 560px);
  padding: 18px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(31, 42, 82, 0.8), rgba(10, 14, 24, 0.92)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(186, 225, 255, 0.22);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#card-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  background: #0a0a0a;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 36px;
  }

  .hero {
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .layout {
    width: min(100% - 28px, 560px);
    gap: 26px;
    padding-bottom: 28px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .controls {
    flex-direction: column;
  }

  .upload-button,
  .ghost-button,
  .download-button {
    width: 100%;
    text-align: center;
  }
}
