:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: rgba(18, 23, 38, 0.78);
  --panel-2: rgba(12, 16, 28, 0.86);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f8ff;
  --muted: #aab2c8;
  --accent: #7c7cff;
  --accent-2: #45d7ff;
  --good: #65e6a5;
  --danger: #ff7e99;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
html.modal-open, html.modal-open body { overflow: hidden; }
body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(80, 83, 255, 0.28), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(36, 192, 255, 0.19), transparent 30rem),
    linear-gradient(180deg, #090d18 0%, #060810 100%);
}

button, input { font: inherit; }
button { border: 0; }
a { color: inherit; }

.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 10px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -0.03em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 28px rgba(91, 103, 255, 0.35);
  color: white; font-weight: 950;
}
.header-note { color: var(--muted); font-size: 0.92rem; }

.hero { text-align: center; padding: 70px 0 34px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: #d9dcff; background: rgba(124,124,255,.12);
  border: 1px solid rgba(124,124,255,.25);
  padding: 7px 11px; border-radius: 999px; font-size: .82rem; font-weight: 750;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--good); border-radius: 50%; box-shadow: 0 0 0 4px rgba(101,230,165,.09); }
h1 { max-width: 900px; margin: 18px auto 14px; font-size: clamp(2.55rem, 6vw, 5rem); line-height: .98; letter-spacing: -.06em; }
.hero p { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); line-height: 1.65; }

.feature-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 23px; }
.chip { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.045); color: #dbe0ee; font-size: .86rem; }

.app-card { background: var(--panel); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); backdrop-filter: blur(18px); overflow: hidden; }
.dropzone {
  margin: 16px;
  min-height: 300px;
  border: 1.5px dashed rgba(151,163,255,.44);
  border-radius: 22px;
  display: grid; place-items: center;
  padding: 34px;
  text-align: center;
  cursor: pointer;
  transition: .18s ease;
  background:
    linear-gradient(180deg, rgba(125,124,255,.055), rgba(69,215,255,.02)),
    rgba(255,255,255,.018);
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-dragging { transform: translateY(-1px); border-color: rgba(92,205,255,.95); background-color: rgba(69,215,255,.04); box-shadow: inset 0 0 0 1px rgba(69,215,255,.12); }
.dropzone.is-busy { cursor: progress; opacity: .76; }
.upload-icon { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 20px; background: linear-gradient(135deg, rgba(124,124,255,.22), rgba(69,215,255,.14)); border: 1px solid rgba(255,255,255,.1); }
.upload-icon svg { width: 31px; height: 31px; }
.dropzone h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.025em; }
.dropzone p { margin: 8px 0 18px; color: var(--muted); }

.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 16px; border-radius: 13px; font-weight: 800; cursor: pointer; transition: .16s ease;
}
.primary { color: white; background: linear-gradient(135deg, var(--accent), #626cff 55%, #47c8ff); box-shadow: 0 12px 30px rgba(82,94,255,.25); }
.primary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.secondary { color: #e9ecf8; background: rgba(255,255,255,.065); border: 1px solid var(--line); }
.secondary:hover:not(:disabled) { background: rgba(255,255,255,.095); }
button:disabled { cursor: not-allowed; opacity: .48; }

.workspace { border-top: 1px solid var(--line); padding: 16px; }
.preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.preview-card { overflow: hidden; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line); }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border-bottom: 1px solid var(--line); }
.preview-head strong { font-size: .9rem; }
.preview-meta { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-box { position: relative; aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; }
.preview-box.checker {
  background-color: #111724;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.055) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.055) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.055) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.055) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.preview-box img { width: 100%; height: 100%; object-fit: contain; }
.badge { font-size: .72rem; font-weight: 800; color: #dfe4ff; padding: 5px 7px; border-radius: 8px; background: rgba(124,124,255,.14); border: 1px solid rgba(124,124,255,.22); }

.status-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 2px 8px; }
.status-copy { min-width: 0; flex: 1; }
.status-copy p { margin: 0; color: #dce1f0; font-size: .9rem; }
.progress { margin-top: 9px; height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); }
.progress > div { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .18s ease; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.error { margin: 8px 0 0; padding: 11px 13px; border-radius: 12px; color: #ffdce4; background: rgba(255,126,153,.09); border: 1px solid rgba(255,126,153,.24); font-size: .88rem; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 0; }
.info-card { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); }
.info-card strong { display: block; margin-bottom: 6px; font-size: .9rem; }
.info-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .84rem; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0 38px; color: #7f899f; font-size: .8rem; }
.footer-links { display: flex; gap: 14px; }
.footer a:hover { color: #cfd5e8; }

.ad-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(1,4,11,.82); backdrop-filter: blur(14px); }
.ad-modal[hidden] { display: none; }
.ad-card { width: min(520px, 100%); border-radius: 24px; padding: 22px; text-align: center; background: #101625; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.ad-once { display: inline-flex; padding: 5px 8px; border-radius: 7px; background: rgba(114,255,168,.10); border: 1px solid rgba(114,255,168,.24); color: #baffd1; font-size: .72rem; font-weight: 850; letter-spacing: .04em; }
.ad-placeholder { margin: 16px 0; min-height: 220px; border-radius: 17px; border: 1px dashed rgba(255,255,255,.16); display: grid; place-items: center; background: rgba(255,255,255,.03); color: #8f9ab0; }
.ad-count { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.ad-card h3 { margin: 9px 0 4px; }
.ad-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.ad-trigger { width: 100%; justify-content: center; margin: 0 0 12px; }
.ad-once-note { font-size: .78rem !important; }

@media (max-width: 760px) {
  .shell { width: min(100% - 20px, 1160px); }
  .header { padding-top: 16px; }
  .header-note { display: none; }
  .hero { padding: 48px 0 24px; }
  h1 { font-size: clamp(2.45rem, 13vw, 4rem); }
  .app-card { border-radius: 22px; }
  .dropzone { margin: 10px; min-height: 250px; padding: 26px 18px; }
  .preview-grid { grid-template-columns: 1fr; }
  .status-row { align-items: stretch; flex-direction: column; }
  .actions { justify-content: stretch; }
  .actions button { flex: 1 1 180px; }
  .info-grid { grid-template-columns: 1fr; }
  .footer { align-items: flex-start; flex-direction: column; }
}
