/* Inter Variable — wie auf weimer.ai (lokal eingebettet, offline-fest) */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #08090c;
  --bg-elevated: #101319;
  --surface: #171b22;
  --border: #262b34;
  --text: #f2f5f8;
  --muted: #99a1ac;
  --brand: #1e9bf0;
  --brand-bright: #5cc0ff;
  --brand-dim: #0a72c0;
  --accent: #ff8a1e;
  --radius: 1rem;
  --sans: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv01", "cv02";
  overflow-x: clip;
}

/* Rausch-Textur wie auf weimer.ai */
.bg-noise { position: relative; isolation: isolate; }
.bg-noise::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

/* Ambient-Brand-Glow oben mittig, wie der radiale Verlauf auf weimer.ai */
body::before {
  content: ""; position: fixed; top: -18%; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 640px; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(30,155,240,.12) 0%, rgba(30,155,240,.045) 34%, transparent 70%);
  filter: blur(24px);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 9, 12, 0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 80rem; margin: 0 auto; padding: 16px 32px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { display: block; }
.brand-div { width: 1px; height: 22px; background: var(--border); }
.brand-sub { font-size: 14px; color: var(--muted); letter-spacing: .3px; }
.live-pill {
  margin-left: auto; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--brand-bright); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px;
  background: rgba(30,155,240,.06);
}
.cart-btn {
  border: 1px solid var(--border); background: rgba(255,255,255,.02); color: var(--text);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; gap: 8px; transition: border-color .2s;
}
.cart-btn:hover { border-color: var(--brand); color: var(--brand); }
.cart-count {
  background: var(--brand); color: #000; border-radius: 999px; min-width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; padding: 0 6px;
}

/* ---------- Studio layout ---------- */
.studio {
  max-width: 80rem; margin: 0 auto; padding: 52px 32px 80px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start;
}
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Stage ---------- */
.stage { position: sticky; top: 100px; }
.stage-glow {
  position: absolute; inset: -10% -10% 20% -10%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(30,155,240,.20) 0%, rgba(30,155,240,.05) 40%, transparent 70%);
  filter: blur(10px);
}
.stage-frame {
  position: relative; aspect-ratio: 1/1; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 40px 120px -40px rgba(30,155,240,.35);
}
.stage-img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fade .6s ease; }
@keyframes fade { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.stage-empty { text-align: center; color: var(--muted); padding: 24px; }
.stage-empty-mark { font-size: 40px; color: var(--border); }
.stage-empty p { margin: 14px 0 4px; font-size: 20px; color: var(--text); font-weight: 600; }
.stage-empty span { font-size: 14px; }
.stage-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 20px;
  align-items: center; justify-content: center; background: var(--surface);
}
.stage-loading p { color: var(--muted); font-size: 14px; }
.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--brand); animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stage-badge {
  margin-top: 14px; text-align: center; font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
}

/* Historie generierter Renderings */
.history { margin-top: 22px; }
.history-label {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.history-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.history-strip::-webkit-scrollbar { height: 6px; }
.history-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.history-item {
  flex: 0 0 auto; width: 66px; height: 66px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: #fff; cursor: pointer; padding: 0;
  transition: border-color .18s, transform .18s;
}
.history-item:hover { border-color: var(--brand); transform: translateY(-2px); }
.history-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Config ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin-bottom: 18px;
  border: 1px solid var(--border); border-radius: 999px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .18em; color: var(--muted); background: rgba(255,255,255,.015);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; background: var(--brand); border-radius: 999px;
  box-shadow: 0 0 12px var(--brand); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

.heading-display {
  margin: 0 0 14px; font-size: 42px; line-height: 1.03; letter-spacing: -0.035em; font-weight: 600;
}
.heading-display em { font-style: normal; color: var(--brand); }
.lead { margin: 0 0 32px; color: var(--muted); font-size: 16px; max-width: 46ch; }

.block { margin-bottom: 26px; }
.block-label {
  display: block; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}

/* Basis-Auswahl */
.bases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.base {
  border: 1px solid var(--border); background: var(--bg-elevated); border-radius: 14px;
  padding: 12px; cursor: pointer; text-align: center; transition: all .18s ease; color: var(--text);
}
.base:hover { border-color: var(--muted); transform: translateY(-2px); }
.base.is-active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 12px 30px -16px rgba(30,155,240,.6); }
.base-thumb {
  width: 100%; aspect-ratio: 1/1; border-radius: 10px; margin-bottom: 10px; overflow: hidden;
  background: #fff; display: flex; align-items: center; justify-content: center;
}
.base-thumb img { width: 100%; height: 100%; object-fit: cover; }
.base-thumb .glyph { font-size: 30px; color: #cbd2da; }
.base-label { font-size: 13px; font-weight: 600; }
.base-sub { font-size: 11px; color: var(--muted); }

/* Prompt */
.idea-input {
  width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-elevated); font-family: var(--sans); font-size: 15px; color: var(--text);
  resize: vertical; transition: border-color .2s;
}
.idea-input::placeholder { color: #5a626d; }
.idea-input:focus { outline: none; border-color: var(--brand); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ex {
  border: 1px solid var(--border); background: rgba(255,255,255,.02); color: var(--muted);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 12px; transition: all .18s;
}
.ex:hover { border-color: var(--brand); color: var(--brand-bright); }

/* Buy */
.buy { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 18px; }
.price { display: flex; align-items: baseline; gap: 12px; }
.price-amount { font-size: 28px; font-weight: 600; }
.price-note { color: var(--muted); font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  border: none; border-radius: 999px; padding: 13px 24px; font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: var(--sans); transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .3s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #000; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px -10px rgba(30,155,240,.7); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: rgba(255,255,255,.02); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-add { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-add:hover { border-color: var(--brand-bright); color: var(--brand-bright); }
.btn-block { width: 100%; }
.disclaimer { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* Footer */
.foot {
  max-width: 80rem; margin: 0 auto; padding: 28px 32px 48px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted);
}
.foot-credit strong { color: var(--brand); }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 30; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 410px; max-width: 92vw;
  background: var(--bg-elevated); border-left: 1px solid var(--border); z-index: 40;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.drawer-close { border: none; background: none; font-size: 28px; cursor: pointer; color: var(--muted); line-height: 1; }
.drawer-items { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-empty { padding: 40px 24px; color: var(--muted); text-align: center; font-size: 14px; }
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-title { font-size: 15px; font-weight: 600; margin: 0 0 3px; }
.cart-item-spec { font-size: 12px; color: var(--muted); line-height: 1.5; }
.cart-item-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.cart-item-price { font-size: 14px; }
.cart-remove { border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }
.drawer-foot { padding: 20px 24px 28px; border-top: 1px solid var(--border); }
.subtotal { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 16px; }
.subtotal span:last-child { font-weight: 600; }

/* Zugangsschutz */
.auth-scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(8,9,12,.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-box {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 32px; width: 360px; max-width: 92vw; text-align: center;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 40px 120px -30px rgba(30,155,240,.4);
}
.auth-box img { margin: 0 auto 2px; }
.auth-box h2 { margin: 0; font-size: 20px; font-weight: 600; }
.auth-box p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-box input {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px;
}
.auth-box input:focus { outline: none; border-color: var(--brand); }
.auth-err { color: #ff6b6b !important; font-size: 13px; }

/* Modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 40px 36px; max-width: 420px; text-align: center; animation: pop .35s ease;
  box-shadow: 0 40px 120px -30px rgba(30,155,240,.4);
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-mark { font-size: 48px; }
.modal h3 { font-size: 22px; font-weight: 600; margin: 12px 0 10px; }
.modal p { color: var(--muted); margin: 0 0 24px; }
