:root {
  --bg: #12083a;
  --bg-soft: #23105a;
  --card: rgba(24, 11, 63, 0.88);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f3f1ff;
  --muted: #c7b8db;
  --accent: #ef3340;
  --accent-2: #ff5f61;
  --focus: #ff6aa7;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 72% 12%, rgba(255, 0, 92, 0.24), transparent 24%),
    radial-gradient(circle at 22% 18%, rgba(107, 72, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #1b0b58 0%, var(--bg) 38%, #0c0527 100%);
  color: var(--text);
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
}

.app-shell {
  width: min(1120px, 95vw);
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  margin-bottom: 22px;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(13, 7, 51, 0.96) 0%, rgba(34, 13, 85, 0.96) 48%, rgba(121, 0, 60, 0.9) 100%);
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -18% -8% auto auto;
  width: 48%;
  height: 180%;
  background: linear-gradient(180deg, rgba(255, 0, 89, 0.16), rgba(255, 0, 89, 0.04));
  transform: rotate(38deg);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -34% -10%;
  width: 34%;
  height: 140%;
  background: linear-gradient(180deg, rgba(255, 0, 89, 0.12), rgba(255, 0, 89, 0.03));
  transform: rotate(38deg);
  pointer-events: none;
}

.hero-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(110px, 16vw, 170px);
  margin: 0 auto 18px;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.85rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-title-muted {
  color: var(--text);
}

.hero-title-accent {
  color: var(--accent);
}

.hero-pills {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #f3f6ff;
  font-size: 0.96rem;
  backdrop-filter: blur(10px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.layout {
  display: grid;
  grid-template-columns: 1.28fr 0.72fr;
  gap: 16px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.preview-column {
  padding: 14px;
}

.preview-wrap {
  position: relative;
  background:
    linear-gradient(45deg, #201351 25%, transparent 25%),
    linear-gradient(-45deg, #201351 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #201351 75%),
    linear-gradient(-45deg, transparent 75%, #201351 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  min-height: 620px;
  display: grid;
  place-items: center;
}

.preview-canvas {
  width: 100%;
  max-width: 680px;
  border-radius: 10px;
  display: block;
  cursor: grab;
  background: #0d0d14;
}

.preview-canvas:active {
  cursor: grabbing;
}

.preview-canvas:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.empty-hint {
  position: absolute;
  top: 16px;
  left: 16px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  background: rgba(9, 10, 15, 0.82);
  color: #ffffff;
  pointer-events: none;
}

.drag-tip {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.status {
  min-height: 1.2em;
  margin: 0;
  color: #e0c6f0;
  font-size: 0.88rem;
}

.controls-column {
  padding: 18px;
}

.controls-column h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
}

.subhead {
  margin: 8px 0 18px;
  color: var(--muted);
}

.control-block {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.control-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.file-input {
  width: 100%;
  margin-bottom: 8px;
}

.upload-btn {
  width: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #eef2ff;
  border-radius: 10px;
  min-height: 52px;
  font-size: 1.02rem;
  cursor: pointer;
}

.upload-btn.drag {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 31, 91, 0.2);
}

.file-name {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.range {
  width: 100%;
}

.value-pill {
  min-width: 60px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.actions {
  display: flex;
  gap: 10px;
}

.btn {
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0 14px;
}

.btn-soft {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 9px 18px rgba(255, 31, 91, 0.26);
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .preview-wrap {
    min-height: 480px;
  }

  .controls-column h2 {
    font-size: 1.6rem;
  }
}

.select-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

.select-input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.file-input,
.range,
#blurToggle {
  accent-color: var(--accent);
}

@media (max-width: 720px) {
  .hero {
    padding-inline: 16px;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero-copy {
    max-width: 28ch;
    margin-inline: auto;
  }

  .actions {
    flex-direction: column;
  }
}
