:root {
  color-scheme: light;
  --ink: #0b1020;
  --muted: #657087;
  --paper: #f5f7fb;
  --white: #ffffff;
  --cyan: #6ee7f9;
  --gold: #f6c453;
  --line: #dce2eb;
  --panel: #11182b;
  --panel-soft: #18213a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 15%, rgba(110, 231, 249, .18), transparent 22rem),
    radial-gradient(circle at 92% 88%, rgba(246, 196, 83, .14), transparent 26rem),
    var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

button, select, textarea { font: inherit; }
button, select { min-height: 46px; }
button { cursor: pointer; }

.app-shell { width: min(1480px, 100%); margin: 0 auto; padding: 0 30px 30px; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--ink); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(11,16,32,.16); }
.brand-mark span { width: 16px; height: 12px; border: 3px solid var(--cyan); border-radius: 4px; position: relative; }
.brand-mark span::after { content: ""; position: absolute; right: -8px; top: 1px; border: 4px solid transparent; border-left-color: var(--gold); }
.privacy { margin: 0; color: #374157; font-size: .9rem; font-weight: 650; }
.privacy span { color: #159f83; margin-right: 6px; }

.workspace { min-height: calc(100vh - 108px); display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--white); box-shadow: 0 24px 70px rgba(29, 42, 66, .12); }
.input-panel { min-width: 0; padding: clamp(28px, 4vw, 58px); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 12px; font-size: .76rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; color: #218aa0; }
h1 { margin: 0; max-width: 670px; font-size: clamp(2rem, 3.3vw, 3.65rem); line-height: 1.01; letter-spacing: -.055em; overflow-wrap: anywhere; }
.free-badge { flex: 0 0 auto; padding: 9px 12px; border: 1px solid #c9d2df; border-radius: 99px; font-size: .78rem; color: #354057; font-weight: 750; }
.idea-label { display: block; margin-bottom: 10px; font-weight: 750; }
textarea { width: 100%; resize: vertical; min-height: 154px; padding: 18px; border: 1px solid #bfc9d8; border-radius: 15px; color: var(--ink); background: #fbfcfe; line-height: 1.55; outline: none; transition: .2s ease; }
textarea:focus, select:focus { border-color: #138ba4; box-shadow: 0 0 0 4px rgba(110,231,249,.22); }
textarea::placeholder { color: #8993a5; }
.idea-meta { display: flex; justify-content: space-between; align-items: center; margin: 9px 2px 24px; color: var(--muted); font-size: .82rem; }
.text-button { border: 0; min-height: auto; padding: 2px; background: transparent; color: #126d82; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.controls label:last-child { grid-column: 1 / -1; }
.controls label > span { display: block; margin: 0 0 7px; color: #465168; font-size: .82rem; font-weight: 750; }
select { width: 100%; border: 1px solid #c7d0dd; border-radius: 12px; background: #fff; color: var(--ink); padding: 0 40px 0 13px; outline: none; }
.generate-button { width: 100%; margin-top: 24px; padding: 0 20px; border: 0; border-radius: 13px; background: var(--ink); color: #fff; display: flex; justify-content: space-between; align-items: center; font-weight: 800; box-shadow: 0 12px 26px rgba(11,16,32,.2); transition: transform .16s ease, box-shadow .16s ease; }
.generate-button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(11,16,32,.24); }
.generate-button:active { transform: translateY(1px); }

.output-panel { min-width: 0; background: var(--panel); color: #eff6ff; padding: clamp(28px, 4vw, 58px); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.output-panel::before { content: ""; position: absolute; width: 340px; height: 340px; right: -170px; top: -170px; border: 1px solid rgba(110,231,249,.24); border-radius: 50%; box-shadow: 0 0 0 60px rgba(110,231,249,.025), 0 0 0 120px rgba(110,231,249,.018); }
.output-heading { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.eyebrow.light { color: var(--cyan); }
h2 { margin: 0; font-size: clamp(1.55rem, 2.2vw, 2.2rem); letter-spacing: -.04em; }
h2 span { color: var(--gold); }
.copy-button { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.22); border-radius: 11px; padding: 0 14px; background: rgba(255,255,255,.06); color: #fff; font-size: .86rem; font-weight: 750; }
.copy-button:not(:disabled):hover { background: rgba(255,255,255,.12); }
.copy-button:disabled { cursor: not-allowed; opacity: .45; }
.copy-icon { font-size: 1.15rem; }
.empty-state { flex: 1; min-height: 330px; display: grid; place-content: center; text-align: center; color: #aeb9ca; }
.empty-glyph { width: 58px; height: 58px; margin: 0 auto 17px; display: grid; place-items: center; border: 1px solid rgba(110,231,249,.38); border-radius: 18px; color: var(--cyan); font-size: 1.5rem; background: rgba(110,231,249,.06); }
.empty-state p { margin: 0 0 8px; color: #e9eef8; font-weight: 700; }
.empty-state small { font-size: .78rem; }
.result { position: relative; flex: 1; padding-top: 24px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.result-meta span { border: 1px solid rgba(255,255,255,.14); border-radius: 99px; padding: 6px 10px; color: #c6d2e4; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9rem; line-height: 1.7; color: #f2f5fa; }
.local-note { position: relative; margin: 25px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); color: #8997ad; font-size: .75rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 18px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 11px 17px; font-weight: 750; box-shadow: 0 16px 44px rgba(11,16,32,.2); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .app-shell { padding: 0 16px 20px; }
  .topbar { min-height: 68px; }
  .privacy { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .panel-heading { display: block; }
  .free-badge { display: inline-block; margin-top: 18px; }
  .output-panel { min-height: 560px; }
}

@media (max-width: 560px) {
  .brand { font-size: .94rem; }
  .brand-mark { width: 34px; height: 34px; }
  .input-panel, .output-panel { padding: 25px 20px; }
  h1 { font-size: clamp(1.9rem, 9vw, 2.15rem); }
  .controls { grid-template-columns: 1fr; }
  .controls label:last-child { grid-column: auto; }
  .output-heading { align-items: center; }
  .copy-button { padding: 0 11px; }
  .copy-button #copyLabel { display: none; }
  .empty-state { min-height: 270px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
