:root {
  --bg: #080a10;
  --panel: rgba(18, 21, 31, 0.82);
  --line: #262b3a;
  --text: #f4f5f8;
  --muted: #8f96a8;
  --violet: #9178ff;
  --cyan: #5ee6d2;
  --danger: #ff7484;
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.12;
  pointer-events: none;
}
.a1 {
  background: #754dff;
  top: -180px;
  left: -100px;
}
.a2 {
  background: #20cfbe;
  right: -240px;
  top: 34%;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid #1b1f2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  position: relative;
  z-index: 2;
  background: rgba(8, 10, 16, 0.72);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 17px;
  font-weight: 650;
}
.brand b {
  color: var(--violet);
}
.logo {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid #5d4ead;
  border-radius: 11px;
  background: linear-gradient(145deg, #372c70, #17152a);
  font-weight: 800;
  overflow: hidden;
}
.logo img {
  display: block;
  width: 33px;
  height: 33px;
  object-fit: contain;
}
.worker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-button {
  height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid #33394a;
  border-radius: 9px;
  padding: 0 12px;
  color: #e8eaf0;
  text-decoration: none;
  background: #151925;
  font-size: 12px;
  font-weight: 700;
}
.auth-button.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.user-button {
  width: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}
.worker i {
  width: 7px;
  height: 7px;
  background: #f0b95c;
  border-radius: 50%;
  box-shadow: 0 0 12px #f0b95c;
}
.worker strong {
  color: #d7d9e0;
  border-left: 1px solid var(--line);
  padding-left: 8px;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 58px 24px 80px;
}
.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 42px;
  gap: 30px;
}
.eyebrow {
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin: 0 0 11px;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin: 0;
  font-weight: 680;
}
.hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px #aaa2d2;
}
.lead {
  color: var(--muted);
  max-width: 360px;
  margin: 0 0 6px;
  font-size: 16px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.75fr);
  gap: 18px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}
.composer {
  padding: 22px;
}
.tabs {
  display: flex;
  background: #0c0f17;
  padding: 4px;
  border-radius: 11px;
  margin-bottom: 24px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  flex: 1;
  padding: 11px;
  border-radius: 8px;
  font-weight: 650;
  cursor: pointer;
}
.tab span {
  color: var(--violet);
  margin-right: 7px;
}
.tab.active {
  background: #222535;
  color: white;
  box-shadow: 0 3px 12px #0008;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field > span {
  font-size: 12px;
  font-weight: 700;
  color: #c5c9d4;
}
.field small {
  color: #6f7688;
  font-size: 10px;
}
.prompt-field {
  position: relative;
}
.prompt-field small {
  position: absolute;
  bottom: 12px;
  right: 13px;
}
.upload-zone {
  border: 1px dashed #353b4e;
  border-radius: 11px;
  margin-top: 16px;
  padding: 13px;
  cursor: pointer;
  transition: 0.2s;
}
.upload-zone:hover {
  border-color: #6958bc;
  background: #6f5cdb0a;
}
.upload-zone > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload-zone b {
  font-size: 20px;
  color: var(--violet);
}
.upload-zone span {
  display: flex;
  flex-direction: column;
}
.upload-zone strong {
  font-size: 12px;
}
.upload-zone small {
  color: var(--muted);
  font-size: 10px;
}
.upload-preview img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
}
.upload-preview button {
  margin-left: auto;
  background: #222735;
  border: 0;
  color: #aaa;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  cursor: pointer;
}
.pro {
  font-size: 8px;
  background: #5948a5;
  color: #eee;
  border-radius: 4px;
  padding: 2px 4px;
  margin-left: 4px;
}
.pro-field input:disabled {
  opacity: 0.55;
}
.video-only input[type="range"] {
  padding: 0;
  height: 6px;
  accent-color: var(--violet);
  border: 0;
}
.video-only > span b {
  float: right;
  color: var(--cyan);
  font-size: 11px;
}
textarea,
input,
select {
  width: 100%;
  border: 1px solid #2b3040;
  background: #0d1018;
  color: white;
  border-radius: 10px;
  padding: 12px 13px;
  outline: 0;
  font: inherit;
  transition: 0.2s;
}
textarea {
  height: 128px;
  resize: vertical;
  padding-bottom: 35px;
}
textarea:focus,
input:focus,
select:focus {
  border-color: #735fd4;
  box-shadow: 0 0 0 3px #735fd420;
}
kbd {
  font: 9px inherit;
  border: 1px solid #343949;
  padding: 1px 4px;
  border-radius: 3px;
}
.form-grid,
.advanced {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 17px;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}
summary {
  color: #aeb4c2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.video-only {
  display: none;
}
.is-video .video-only {
  display: flex;
}
.generate {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(110deg, #765de5, #9078ff 52%, #6bd8cd);
  color: white;
  font-weight: 750;
  font-size: 15px;
  margin-top: 22px;
  cursor: pointer;
  box-shadow: 0 10px 28px #725be02e;
  transition: 0.2s;
}
.generate:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.generate:disabled {
  opacity: 0.5;
  cursor: wait;
}
.generate span {
  margin-right: 7px;
}
.generate b {
  float: right;
  margin-right: 14px;
}
.error {
  color: var(--danger);
  font-size: 12px;
  margin: 8px 0 0;
  min-height: 1em;
}
.queue-panel {
  padding: 20px;
  min-height: 420px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-head h2 {
  font-size: 21px;
  margin: 0;
}
.section-head button {
  border: 1px solid var(--line);
  background: #11141d;
  color: #9ea4b2;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
}
.queue {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.empty {
  text-align: center;
  padding: 72px 10px;
  color: var(--muted);
}
.empty span {
  font-size: 30px;
  color: #525970;
}
.empty p {
  margin: 12px 0 2px;
  color: #c8ccd5;
}
.empty small {
  font-size: 11px;
}
.job {
  border: 1px solid #292e3d;
  background: #0d1018;
  border-radius: 12px;
  padding: 13px;
}
.job-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.job-type {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--violet);
}
.job-status {
  font-size: 10px;
  color: var(--muted);
}
.job-prompt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 8px 0;
  font-size: 12px;
}
.progress {
  height: 4px;
  background: #242938;
  border-radius: 4px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width 0.4s;
}
.job-meta {
  display: flex;
  justify-content: space-between;
  color: #697083;
  font-size: 10px;
  margin-top: 7px;
}
.history-section {
  margin-top: 54px;
}
.history-section > .section-head {
  margin-bottom: 18px;
}
.count {
  color: var(--muted);
  font-size: 12px;
}
.history {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.history-empty {
  grid-column: 1/-1;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 40px;
  text-align: center;
  color: #747b8d;
}
.creation {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 70% 20%, #4e3f8344, transparent 55%), #10131c;
}
.creation.video {
  background:
    radial-gradient(circle at 70% 20%, #276c6844, transparent 55%), #10131c;
}
.creation strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.creation small {
  color: var(--muted);
  margin-top: 4px;
}
footer {
  border-top: 1px solid #1b1f2a;
  max-width: 1180px;
  margin: auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  color: #6f7688;
}
footer span {
  font-weight: 700;
}
footer small {
  font-size: 11px;
}
@media (max-width: 800px) {
  .topbar {
    height: 64px;
    padding: 0 16px;
  }
  .worker span {
    display: none;
  }
  main {
    padding: 38px 15px 60px;
  }
  .hero {
    display: block;
    margin-bottom: 28px;
  }
  .hero h1 {
    font-size: 47px;
  }
  .lead {
    margin-top: 20px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .queue-panel {
    min-height: 240px;
  }
  .history {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .hero h1 {
    font-size: clamp(33px, 10.4vw, 40px);
    letter-spacing: -0.065em;
  }
  .hero h1 em {
    font-size: 0.92em;
  }
  .composer {
    padding: 15px;
  }
  .form-grid,
  .advanced {
    grid-template-columns: 1fr;
  }
  .prompt-field small {
    display: none;
  }
  .queue-panel {
    padding: 16px;
  }
  .history {
    grid-template-columns: 1fr;
  }
  .tabs {
    margin-bottom: 18px;
  }
  footer {
    padding: 20px 16px;
  }
  .lead {
    font-size: 14px;
  }
}
