
:root {
  color-scheme: dark;
  --bg: #090a10;
  --panel: #12141e;
  --panel-raised: #181a27;
  --panel-soft: #0e1018;
  --border: #292c3d;
  --border-hover: #62518e;
  --text: #f5f5fc;
  --muted: #9b9fb4;
  --accent: #a58bff;
  --accent-strong: #8968f5;
  --success: #75e2af;
  --radius: 16px;
  --shadow: 0 16px 45px rgb(0 0 0 / 18%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(113 75 205 / 12%), transparent 40%),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: inherit;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  padding: 15px max(4%, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgb(9 10 16 / 88%);
  border-bottom: 1px solid rgb(255 255 255 / 7%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  margin-right: 4px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 11px;
  background: linear-gradient(145deg, #b39aff, #7650df);
  box-shadow: 0 5px 18px rgb(137 104 245 / 26%);
}

.purple {
  color: var(--accent);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgb(117 226 175 / 45%);
}

.container {
  width: min(100% - 40px, 960px);
  margin: 0 auto;
}

.hero {
  padding: 68px 0 36px;
}

.eyebrow {
  color: #b6a2ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.8px;
}

h1 {
  max-width: 820px;
  margin: 17px 0 15px;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.09;
  letter-spacing: -2.1px;
  font-weight: 800;
}

.gradient {
  background: linear-gradient(95deg, #b9a5ff 5%, #e0a8ff 52%, #a4b6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.hero p {
  max-width: 640px;
  margin: 0;
  font-size: 15px;
}

.panel {
  position: relative;
  margin: 18px 0;
  padding: clamp(20px, 3.5vw, 30px);
  overflow: hidden;
  background: linear-gradient(145deg, rgb(24 26 39 / 95%), rgb(16 18 27 / 98%));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.step {
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(165 139 255 / 22%);
  border-radius: 13px;
  background: linear-gradient(145deg, #302747, #211d34);
  color: #d1c2ff;
  font-size: 12px;
  font-weight: 800;
}

h2,
h3 {
  color: var(--text);
}

h2 {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.section-heading p {
  margin: 7px 0 0;
  font-size: 13px;
}

h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 750;
}

label {
  display: block;
  margin: 17px 0 9px;
  color: #e6e5f0;
  font-size: 12px;
  font-weight: 700;
}

input[type="text"],
select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background-color: var(--panel-soft);
  color: var(--text);
  font-size: 13px;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

input[type="text"]::placeholder {
  color: #777b90;
}

input[type="text"]:hover,
select:hover {
  border-color: #44465d;
}

input[type="text"]:focus,
select:focus {
  border-color: var(--accent);
  background-color: #12121e;
  box-shadow: 0 0 0 3px rgb(165 139 255 / 10%);
}

select {
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-grid > div {
  min-width: 0;
}

.upload-box {
  min-height: 155px;
  margin: 14px 0 0;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  text-align: center;
  border: 1px dashed #51486e;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at top, rgb(137 104 245 / 8%), transparent 65%),
    #10111a;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.upload-box:hover {
  border-color: var(--accent);
  background-color: #151321;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid rgb(165 139 255 / 22%);
  border-radius: 13px;
  background: #29223c;
  color: #cbbaff;
  font-size: 25px;
}

.upload-box strong {
  font-size: 13px;
  font-weight: 750;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.upload-box input[type="file"] {
  width: min(100%, 300px);
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
}

.upload-box input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #242033;
  color: #eee9ff;
  cursor: pointer;
}

.file-info {
  margin-top: 13px;
  color: #c7b6ff;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.button {
  min-height: 43px;
  padding: 12px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.secondary {
  border-color: #39334e;
  background: #252237;
  color: #e8e1ff;
}

.secondary:hover {
  border-color: #66548e;
  background: #302945;
}

.primary {
  min-height: 51px;
  background: linear-gradient(100deg, #8866f1, #a178ff);
  box-shadow: 0 8px 24px rgb(137 104 245 / 19%);
}

.primary:hover {
  background: linear-gradient(100deg, #997aff, #b08bff);
}

.button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.full-width {
  width: 100%;
  margin-top: 24px;
}

.scene-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  padding: 7px 0 7px 9px;
  border: 0;
  background: transparent;
  color: #c2adff;
  font-size: 12px;
  cursor: pointer;
}

.text-button:hover {
  color: white;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 14px;
}

.scene-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0d0f17;
  transition: border-color 160ms ease, transform 160ms ease;
}

.scene-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.scene-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #181622;
}

.scene-info {
  padding: 11px;
}

.scene-title {
  color: #eae8f5;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.scene-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.scene-actions button {
  min-height: 29px;
  padding: 6px 9px;
  border: 1px solid #363048;
  border-radius: 7px;
  background: #242033;
  color: #e6dfff;
  font-size: 11px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.scene-actions button:hover:not(:disabled) {
  border-color: #7862b4;
  background: #342a4b;
}

.scene-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.advanced-divider {
  height: 1px;
  margin: 25px 0;
  background: linear-gradient(90deg, var(--border), rgb(41 44 61 / 20%));
}

.helper-text {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.65;
}

/* Effect options */
.effect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.effect-option {
  min-width: 0;
  margin: 0;
  padding: 15px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #0f111a;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.effect-option:hover {
  border-color: #66548e;
  background: #171524;
}

.effect-option:has(input:checked) {
  border-color: #7861b8;
  background: linear-gradient(120deg, rgb(137 104 245 / 13%), #11121c);
}

.effect-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent-strong);
  cursor: pointer;
}

.effect-option > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.effect-option strong {
  color: #efedf8;
  font-size: 12px;
  line-height: 1.4;
}

.effect-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  font-weight: 400;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 25px;
}

.summary div {
  min-width: 0;
  min-height: 76px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0d0f17;
}

.summary span {
  color: var(--muted);
  font-size: 11px;
}

.summary strong {
  color: #f0ebff;
  font-size: 15px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.notice {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid #42365e;
  border-radius: 10px;
  background: #211b32;
  color: #e3d9ff;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notice[hidden] {
  display: none;
}

footer {
  padding: 34px 0 42px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

footer span {
  padding: 0 4px;
  color: var(--accent);
}

@media (min-width: 1000px) {
  .hero {
    padding-top: 76px;
  }
}

@media (max-width: 700px) {
  .navbar {
    min-height: 65px;
    padding: 13px 4%;
  }

  .brand {
    font-size: 16px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .status {
    gap: 6px;
    font-size: 8px;
    letter-spacing: 1px;
  }

  .container {
    width: min(100% - 28px, 560px);
  }

  .hero {
    padding: 46px 0 25px;
  }

  h1 {
    font-size: clamp(33px, 8vw, 45px);
    letter-spacing: -1.3px;
  }

  .hero p {
    font-size: 14px;
  }

  .panel {
    margin: 14px 0;
    padding: 20px 17px;
    border-radius: 13px;
  }

  .section-heading {
    gap: 12px;
    margin-bottom: 21px;
  }

  .step {
    flex-basis: 37px;
    width: 37px;
    height: 37px;
    border-radius: 10px;
  }

  h2 {
    font-size: 17px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .effect-grid {
    grid-template-columns: 1fr;
  }

  .scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .summary {
    gap: 7px;
  }

  .summary div {
    min-height: 72px;
    padding: 10px;
  }

  .summary strong {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 14px;
  }

  .status {
    font-size: 7px;
  }

  .container {
    width: calc(100% - 20px);
  }

  .panel {
    padding: 16px 12px;
  }

  .scene-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}