:root {
  color-scheme: dark;
  --bg: #04050a;
  --bg-2: #0b0f18;
  --surface: rgba(11, 14, 23, 0.82);
  --surface-strong: rgba(15, 19, 29, 0.97);
  --surface-soft: rgba(255,255,255,0.03);
  --text: #faf9f6;
  --muted: #b5b9c7;
  --muted-2: #868c9c;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.18);
  --gold: #b8d7ff;
  --gold-2: #5b8fff;
  --accent: #7bc0ff;
  --accent-2: #446dff;
  --accent-3: #18264f;
  --blue-soft: #beddff;
  --success: #53d39c;
  --error: #ff9595;
  --shadow: 0 34px 120px rgba(0,0,0,0.62);
  --shadow-card: 0 34px 90px rgba(0,0,0,0.52), inset 0 1px 0 rgba(255,255,255,0.06), inset 0 -16px 42px rgba(0,0,0,0.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 10%, rgba(123, 192, 255, 0.16), transparent 22%),
    radial-gradient(circle at 86% 12%, rgba(68, 109, 255, 0.18), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(88, 119, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #030409 0%, #070a14 34%, #030409 100%);
  overflow-x: hidden;
}

a { color: inherit; }
button, input, textarea { font: inherit; }

.app-shell {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(20px);
  opacity: 0.6;
}
.ambient-1 {
  width: 300px;
  height: 300px;
  top: 10px;
  right: 4%;
  background: radial-gradient(circle, rgba(123, 192, 255, 0.28), transparent 70%);
}
.ambient-2 {
  width: 360px;
  height: 360px;
  left: -90px;
  top: 220px;
  background: radial-gradient(circle, rgba(82, 112, 255, 0.2), transparent 70%);
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(18, 22, 32, 0.94), rgba(10, 12, 19, 0.9));
  border: 1px solid var(--line);
  border-radius: 28px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
  transform: translateZ(0);
}

.luxe-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(246, 211, 138, 0.28), rgba(255,255,255,0.04), rgba(185, 138, 61, 0.22));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: center;
  overflow: hidden;
  padding: 40px;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at top left, rgba(123, 192, 255, 0.2), transparent 30%),
    radial-gradient(circle at 80% 25%, rgba(68, 109, 255, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(18, 24, 42, 0.99), rgba(7, 10, 20, 0.95));
  perspective: 2200px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -80px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #cde3ff;
  background: rgba(123, 192, 255, 0.1);
  border: 1px solid rgba(123, 192, 255, 0.22);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 11ch;
}

.subtext {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-subtext {
  max-width: 680px;
  margin-top: 16px;
  font-size: 15.5px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(190,221,255,0.12), rgba(255,255,255,0.03));
  border: 1px solid rgba(123,192,255,0.18);
  color: #eef5ff;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.18);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: min(100%, 320px);
  padding: 16px;
  border-radius: 36px;
  background: linear-gradient(160deg, #1f2948, #070911 72%);
  border: 1px solid rgba(190,221,255,0.18);
  box-shadow: 0 56px 120px rgba(0,0,0,0.62), 0 16px 44px rgba(123, 192, 255, 0.16);
  transform: rotateY(-26deg) rotateX(12deg) translateY(-8px);
}

.premium-tilt {
  animation: floatTilt 5.5s ease-in-out infinite;
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.16), transparent 30%, rgba(244,211,155,0.2));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  padding: 1px;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.phone-screen {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(7,10,20,0.08), rgba(7,10,20,0.68)),
    url('https://images.unsplash.com/photo-1516259762381-22954d7d3ad2?auto=format&fit=crop&w=900&q=80') center/cover;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -30px 60px rgba(0,0,0,0.24);
}

.phone-reel {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,10,15,0.04), rgba(8,10,15,0.74));
}

.phone-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(7, 9, 15, 0.62);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(8px);
}

.phone-overlay strong {
  font-size: 18px;
  line-height: 1.2;
}

.phone-overlay small,
.phone-chip {
  color: #d7e8ff;
}

.phone-chip {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(123, 192, 255, 0.14);
  border: 1px solid rgba(123, 192, 255, 0.22);
  font-size: 12px;
}

.action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.form-card,
.side-note,
.preview-card,
.history-card {
  padding: 24px;
}

.main-panel {
  min-height: 100%;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: #f5e7c4;
}

.input-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-input-row {
  align-items: stretch;
}

input[type="url"],
input[type="text"],
input[type="file"],
textarea {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: rgba(7,10,16,0.9);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 15px 17px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

input[type="url"] {
  flex: 1 1 460px;
}

input[type="text"],
textarea {
  margin-top: 8px;
}

input::placeholder,
textarea::placeholder {
  color: #737c8f;
}

input:focus,
textarea:focus {
  border-color: rgba(246, 211, 138, 0.5);
  box-shadow: 0 0 0 4px rgba(246, 211, 138, 0.08);
}

input[type="file"] {
  cursor: pointer;
}

button {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  min-height: 52px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  background: linear-gradient(180deg, #2a3245, #151a27);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease, box-shadow .18s ease;
}

button.primary {
  background: linear-gradient(135deg, #cae5ff, #79bfff 48%, #446dff);
  color: #08111e;
  border-color: rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.34), 0 18px 36px rgba(68, 109, 255, 0.34);
}

button:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 16px 30px rgba(0,0,0,0.36);
}

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

.advanced {
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

.advanced summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  color: #f0d7a0;
}

.advanced summary::-webkit-details-marker { display: none; }

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0 18px 18px;
}

.advanced-grid label {
  color: var(--muted);
  font-size: 14px;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-inline input {
  width: 18px;
  height: 18px;
  accent-color: #dcb56e;
}

.status {
  margin: 16px 0 0;
  font-weight: 700;
}
.status.idle { color: var(--muted); }
.status.loading { color: var(--blue-soft); }
.status.success { color: var(--success); }
.status.error { color: var(--error); }

.hint {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.6;
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature-item {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 30px rgba(0,0,0,0.22);
  transform: translateZ(0);
}

.highlight-card {
  position: relative;
  overflow: hidden;
}

.highlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent 45%);
  pointer-events: none;
}

.feature-item strong {
  color: #f3ddb0;
  font-size: 15px;
}

.feature-item span {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.batch-progress-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 30px rgba(0,0,0,0.18);
}

.batch-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.batch-percent {
  min-width: 58px;
  text-align: right;
  font-weight: 900;
  color: #f0d39e;
}

.progress-track {
  width: 100%;
  height: 14px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79bfff, #cae5ff, #446dff);
  box-shadow: 0 0 20px rgba(123, 192, 255, 0.38);
  transition: width .28s ease;
}

.batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.dashboard-grid,
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
}

.empty-state {
  padding: 22px 0;
  color: var(--muted);
  line-height: 1.65;
}

.hidden { display: none !important; }
.preview.hidden { display: none !important; }

.preview {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.preview img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 24px;
  background: #0b1018;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 50px rgba(0,0,0,0.3);
}

.side-showcase,
.premium-panel,
.user-history-card,
.preview-card {
  isolation: isolate;
}

.side-showcase::after,
.premium-panel::after,
.preview-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 192, 255, 0.16), transparent 70%);
  pointer-events: none;
}

@keyframes floatTilt {
  0%, 100% { transform: rotateY(-26deg) rotateX(12deg) translateY(-8px); }
  50% { transform: rotateY(-22deg) rotateX(10deg) translateY(-2px); }
}

.preview-meta h2 {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.25;
}

.preview-meta p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
  word-break: break-word;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.download-link {
  color: #f5ddac;
  font-weight: 800;
  text-decoration: none;
}

.download-link:hover {
  text-decoration: underline;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.18);
}

.history-item .title {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  word-break: break-word;
}

.history-item .meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.history-item .state.ok { color: var(--success); }
.history-item .state.fail { color: var(--error); }

.batch-result-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.batch-thumb {
  width: 88px;
  height: 124px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #09111f;
}

@media (max-width: 1080px) {
  .hero,
  .action-grid,
  .dashboard-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px;
  }

  h1 {
    max-width: none;
  }

  .hero-visual {
    justify-content: center;
  }

  .phone-frame {
    transform: rotateY(-16deg) rotateX(8deg) translateY(-4px);
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px 12px 34px;
  }

  .ambient-1 {
    width: 150px;
    height: 150px;
    top: 4px;
    right: -24px;
    opacity: .55;
  }

  .ambient-2 {
    width: 180px;
    height: 180px;
    left: -76px;
    top: 210px;
    opacity: .4;
  }

  .card,
  .form-card,
  .side-note,
  .preview-card,
  .history-card,
  .hero {
    border-radius: 20px;
  }

  .hero,
  .form-card,
  .side-note,
  .preview-card,
  .history-card {
    padding: 16px;
  }

  .hero {
    gap: 16px;
    text-align: center;
    margin-bottom: 16px;
  }

  .hero-copy {
    display: grid;
    justify-items: center;
    gap: 8px;
  }

  .eyebrow {
    padding: 6px 10px;
    font-size: 11px;
    letter-spacing: .12em;
  }

  .hero-subtext {
    font-size: 13px;
    max-width: 28ch;
    line-height: 1.55;
  }

  .hero-badges,
  .side-showcase {
    display: none;
  }

  .hero-visual {
    display: none;
  }

  .phone-frame {
    width: min(100%, 170px);
    padding: 10px;
    transform: rotateY(-10deg) rotateX(7deg) translateY(-1px);
  }

  .phone-screen {
    border-radius: 20px;
  }

  .phone-overlay {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 4px;
    padding: 10px;
    border-radius: 14px;
  }

  .phone-overlay strong {
    font-size: 13px;
  }

  .phone-overlay small,
  .phone-chip {
    font-size: 10px;
  }

  h1 {
    font-size: 1.65rem;
    line-height: 1.1;
  }

  .action-grid,
  .dashboard-grid,
  .grid {
    gap: 14px;
  }

  .panel-head,
  .batch-progress-head {
    display: block;
  }

  .panel-head {
    margin-bottom: 14px;
  }

  .section-title {
    margin-bottom: 6px;
    font-size: 16px;
  }

  .label {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .input-row,
  .primary-input-row,
  .batch-actions,
  .checkbox-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  button {
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    padding: 13px 16px;
  }

  input[type="url"],
  input[type="text"],
  input[type="file"],
  textarea {
    border-radius: 15px;
    padding: 11px 13px;
    font-size: 16px;
  }

  input[type="url"] {
    min-height: 3.6em;
    max-height: 3.6em;
    line-height: 1.35;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .advanced {
    margin-top: 14px;
    border-radius: 16px;
  }

  .advanced summary {
    padding: 14px 15px;
    font-size: 14px;
  }

  .advanced-grid {
    padding: 0 15px 15px;
  }

  .hint,
  .subtext,
  .history-item .meta,
  .feature-item span,
  .empty-state,
  .preview-meta p {
    font-size: 13px;
    line-height: 1.55;
  }

  .status {
    margin-top: 14px;
    font-size: 14px;
  }

  .batch-percent {
    text-align: left;
    margin-top: 6px;
  }

  .batch-progress-card,
  .history-item,
  .feature-item {
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.2);
  }

  .progress-track {
    height: 12px;
  }

  .preview {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .preview img {
    width: min(100%, 220px);
    max-width: 220px;
    margin: 0 auto;
    border-radius: 18px;
  }

  .preview-meta,
  .preview-card .section-title,
  .history-card .section-title {
    text-align: center;
  }

  .preview-meta h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .pill-row {
    justify-content: center;
    gap: 8px;
  }

  .pill {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .download-link {
    display: inline-block;
    font-size: 14px;
  }

  .history-list {
    gap: 10px;
  }

  .batch-result-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .batch-thumb {
    width: 100%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 9 / 16;
    margin: 0 auto;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 10px 10px 28px;
  }

  .hero,
  .form-card,
  .side-note,
  .preview-card,
  .history-card {
    padding: 14px;
    border-radius: 18px;
  }

  .hero {
    margin-bottom: 12px;
  }

  .phone-frame {
    width: min(100%, 150px);
    padding: 8px;
    transform: rotateY(-8deg) rotateX(5deg);
  }

  h1 {
    font-size: 1.45rem;
  }

  .section-title {
    font-size: 15px;
  }

  .preview img {
    max-width: 190px;
  }
}
