@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #060606;
  --surface: #101010;
  --surface-2: #171717;
  --surface-3: #202020;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f0f0f0;
  --muted: #949494;
  --dim: #606060;
  --accent: #d7d7d7;
  --purple: #a787ff;
  --green: #9fe0ac;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { font-family: 'DM Sans', sans-serif; color: var(--text); overflow-x: hidden; }
button, textarea { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
button:focus-visible, textarea:focus-visible { outline: 2px solid #b8b8b8; outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100svh; display: flex; flex-direction: column; position: relative; background: radial-gradient(circle at 50% 42%, rgba(39, 35, 53, 0.11), transparent 34%), var(--bg); }
.topbar { height: 88px; flex: none; padding: max(20px, env(safe-area-inset-top)) clamp(18px, 5vw, 48px) 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: relative; z-index: 10; }
.icon-button { width: 43px; height: 43px; border-radius: 50%; background: transparent; display: grid; place-content: center; transition: background .2s ease, transform .2s ease; }
.icon-button:hover { background: rgba(255,255,255,.08); }
.icon-button:active { transform: scale(.94); }
.menu-button { justify-self: start; gap: 5px; padding: 9px; }
.menu-button span { display: block; width: 22px; height: 2px; background: #b8b8b8; border-radius: 2px; }
.menu-button span:nth-child(2) { width: 16px; }
.mode-tabs { display: flex; gap: 27px; height: 100%; align-items: center; }
.mode-tab { position: relative; color: #767676; background: transparent; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 19px; padding: 18px 2px 13px; transition: color .25s ease; }
.mode-tab.active { color: #e6e6e6; }
.tab-underline { position: absolute; left: 50%; bottom: 3px; width: 0; height: 3px; transform: translateX(-50%); border-radius: 20px; background: #dedede; transition: width .25s ease; }
.mode-tab.active .tab-underline { width: 24px; }
.profile-button { justify-self: end; }
.profile-button svg { width: 28px; height: 28px; fill: #b7b7b7; stroke: #b7b7b7; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.profile-button circle { fill: var(--bg); stroke: none; }

.main-content { flex: 1; display: flex; width: 100%; justify-content: center; min-height: 0; }
.panel { width: min(100%, 980px); min-height: 0; padding: 30px clamp(17px, 5vw, 64px) 235px; position: relative; }
.ask-panel { display: flex; flex-direction: column; }
.welcome-block { margin: auto 0; padding: 50px 10px 70px; text-align: center; animation: float-in .55s ease both; }
.nova-mark { position: relative; margin-inline: auto; width: 44px; height: 44px; color: rgba(190, 184, 224, .5); }
.nova-mark.large { width: 76px; height: 76px; margin-bottom: 22px; opacity: .78; }
.nova-mark.medium { width: 58px; height: 58px; margin-bottom: 23px; opacity: .75; }
.mark-core { position: absolute; inset: 17%; border: 5px solid currentColor; border-left-color: transparent; border-bottom-color: currentColor; border-radius: 50%; transform: rotate(-30deg); filter: drop-shadow(0 0 9px rgba(169, 142, 255, .18)); }
.mark-orbit { position: absolute; width: 82%; height: 28%; left: 8%; top: 42%; border: 4px solid currentColor; border-left-color: transparent; border-right-color: transparent; transform: rotate(-37deg); border-radius: 50%; opacity: .8; }
.orbit-b { transform: rotate(49deg) scale(.75); opacity: .34; }
.hero-logo { display: block; width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 22px; box-shadow: 0 13px 34px rgba(72, 46, 112, .18); animation: logo-breathe 4s ease-in-out infinite; }
.welcome-block h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(23px, 3vw, 31px); letter-spacing: -.04em; margin: 0 0 13px; color: #d9d9d9; }
.welcome-block p { margin: 0; font-size: 15px; line-height: 1.7; color: #767676; }
.conversation { display: flex; flex-direction: column; gap: 20px; width: min(100%, 710px); margin: 0 auto; }
.message { display: flex; gap: 12px; align-items: flex-start; animation: message-in .3s ease both; }
.message.user { justify-content: flex-end; }
.message-avatar { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; color: #d7d7d7; background: linear-gradient(145deg, #28232f, #151319); font-size: 13px; }
.message-body { max-width: min(82%, 620px); padding: 13px 16px; border: 1px solid var(--line); border-radius: 18px; color: #d4d4d4; font-size: 15px; line-height: 1.55; }
.message.user .message-body { background: #242424; border-color: transparent; border-bottom-right-radius: 5px; }
.message.assistant .message-body { background: rgba(255,255,255,.035); border-top-left-radius: 5px; }
.speak-button { display: inline-grid; width: 26px; height: 26px; place-items: center; margin: 9px 0 -7px 5px; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.04); color: #8e8e8e; vertical-align: middle; transition: color .2s ease, background .2s ease, border .2s ease; }
.speak-button:hover, .speak-button.speaking { color: #d0baff; border-color: rgba(190,155,255,.4); background: rgba(169,125,255,.14); }
.speak-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.typing-dots { display: inline-flex; gap: 4px; padding: 5px 0; }
.typing-dots i { width: 5px; height: 5px; background: #aaa; border-radius: 50%; animation: pulse 1s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .16s; }
.typing-dots i:nth-child(3) { animation-delay: .32s; }

.imagine-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-top: 50px; }
.imagine-intro { animation: float-in .55s ease both; }
.imagine-mark { color: #b495ff; }
.eyebrow { color: #9282bf; letter-spacing: .22em; font-size: 10px; font-weight: 700; margin: 0 0 12px; }
.imagine-intro h1 { margin: 0; font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(30px, 7vw, 52px); letter-spacing: -.065em; line-height: 1.08; color: #ece7f8; }
.imagine-intro h1 em { color: #a994dc; font-style: normal; }
.imagine-copy { margin: 17px 0 0; color: #7c7789; font-size: 15px; }
.generated-area { width: min(100%, 520px); margin-top: 28px; text-align: left; animation: float-in .4s ease both; }
.generated-card { overflow: hidden; border: 1px solid rgba(188,164,255,.18); border-radius: 19px; background: #18151d; box-shadow: 0 18px 45px rgba(0,0,0,.3); }
.generated-art { min-height: 210px; padding: 28px; display: flex; align-items: flex-end; background: radial-gradient(circle at 73% 25%, rgba(255,211,128,.92), transparent 17%), radial-gradient(circle at 30% 40%, rgba(169,105,255,.8), transparent 31%), linear-gradient(130deg, #1b1039 4%, #322056 43%, #c6716a 100%); }
.generated-art.generated-real { padding: 0; min-height: 0; background: #141118; }
.generated-art.generated-real img { display: block; width: 100%; max-height: 540px; object-fit: cover; }
.generated-art span { padding: 7px 10px; color: white; border: 1px solid rgba(255,255,255,.24); border-radius: 8px; background: rgba(0,0,0,.18); font-size: 11px; }
.generated-meta { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; color: #aaa; font-size: 12px; }
.generated-meta strong { color: #e5ddf6; font-weight: 600; }
.generation-error { width: min(100%, 520px); padding: 18px; border: 1px solid rgba(255,128,128,.16); border-radius: 16px; background: rgba(100,35,35,.18); color: #e5abab; font-size: 13px; line-height: 1.6; }
.generation-error span { color: #9c7b7b; font-size: 11px; }
.image-message .message-body { padding: 8px; overflow: hidden; }
.inline-generated-image { display: block; width: min(100%, 360px); max-height: 390px; object-fit: cover; border-radius: 12px; background: #17131e; }
.image-caption { padding: 9px 6px 2px; color: #a99fbb; font-size: 11px; line-height: 1.35; }

.composer-dock { position: fixed; z-index: 5; left: 50%; bottom: max(13px, env(safe-area-inset-bottom)); width: min(100% - 30px, 1000px); transform: translateX(-50%); }
.quick-actions { display: flex; gap: 12px; overflow-x: auto; padding: 4px 1px 15px; scrollbar-width: none; }
.quick-actions::-webkit-scrollbar { display: none; }
.quick-chip { flex: 0 0 auto; display: flex; gap: 9px; align-items: center; min-height: 48px; padding: 0 16px 0 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(22,22,22,.98); box-shadow: 0 8px 26px rgba(0,0,0,.22); color: #9e9e9e; font-size: 13px; transition: border .2s ease, background .2s ease, color .2s ease, transform .2s ease; }
.quick-chip:hover { border-color: rgba(255,255,255,.2); background: #202020; color: #eee; }
.quick-chip:active { transform: scale(.97); }
.chip-icon { width: 23px; height: 23px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.purple { color: #c7a9ff; background: #2b2042; }.blue { color: #96c5ff; background: #1f3044; }.yellow { color: #f2d18b; background: #3c301d; }.green { color: #9fe0ac; background: #1e3526; }
.composer { border: 1px solid rgba(255,255,255,.11); border-radius: 22px; background: rgba(18,18,18,.98); box-shadow: var(--shadow); padding: 14px 13px 11px 16px; transition: border .2s ease, box-shadow .2s ease; }
.composer:focus-within { border-color: rgba(255,255,255,.24); box-shadow: 0 24px 80px rgba(0,0,0,.54), 0 0 0 1px rgba(255,255,255,.03); }
textarea { display: block; width: 100%; min-height: 40px; max-height: 124px; resize: none; padding: 1px 0 3px; border: 0; outline: 0; color: #ededed; background: transparent; font-size: 16px; line-height: 1.5; }
textarea::placeholder { color: #686868; }
.composer-tools { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.tool-button, .model-button { height: 40px; border-radius: 50%; background: transparent; color: #8a8a8a; transition: background .2s ease, color .2s ease; }
.tool-button:hover, .model-button:hover { background: rgba(255,255,255,.08); color: #ddd; }
.tool-button { width: 40px; display: grid; place-items: center; }
.tool-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.model-button { display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 12px; color: #9a9a9a; }
.spark-icon { color: #b899ff; font-size: 16px; }.chevron { color: #656565; font-size: 17px; margin-top: -4px; }
.voice-button { margin-left: auto; }
.voice-button.recording { color: #ff9292; background: rgba(255, 119, 119, .1); animation: breathe 1.2s ease infinite; }
.send-button { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 50%; background: #292929; color: #585858; transition: background .2s ease, color .2s ease, transform .2s ease; }
.send-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.send-button:not(:disabled) { color: #111; background: #e2e2e2; }.send-button:not(:disabled):hover { background: #fff; transform: translateY(-1px); }.send-button:active { transform: scale(.94); }
.composer-hint { text-align: center; margin: 10px 0 0; color: #505050; font-size: 10px; }
.attachment-row { display: flex; gap: 7px; padding: 0 0 9px; }
.file-chip { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: #171717; color: #aaa; font-size: 11px; }.file-chip button { padding: 0; background: transparent; color: #777; }

.side-drawer { position: fixed; inset: 0 auto 0 0; z-index: 30; width: min(320px, 88vw); padding: max(22px, env(safe-area-inset-top)) 18px 18px; display: flex; flex-direction: column; background: #111; border-right: 1px solid var(--line); box-shadow: 18px 0 60px rgba(0,0,0,.34); transform: translateX(-102%); transition: transform .28s cubic-bezier(.22,.8,.25,1); }
.side-drawer.open { transform: translateX(0); }.drawer-scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.62); backdrop-filter: blur(4px); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }.brand-lockup { display: flex; align-items: center; gap: 9px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; letter-spacing: -.03em; }.brand-logo { width: 29px; height: 29px; border-radius: 9px; box-shadow: 0 5px 16px rgba(72, 46, 112, .2); }.close-button { font-size: 28px; color: #878787; font-weight: 300; }
.new-chat-button { display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: #1d1d1d; color: #e3e3e3; font-size: 13px; text-align: left; }.new-chat-button span { font-size: 20px; color: #b9a1ee; }.drawer-label { margin: 31px 12px 11px; color: #555; font-size: 10px; font-weight: 700; letter-spacing: .15em; }.drawer-item { display: flex; align-items: center; gap: 12px; min-height: 45px; padding: 0 12px; border-radius: 11px; background: transparent; color: #898989; font-size: 13px; text-align: left; }.drawer-item:hover, .drawer-item.active { color: #eee; background: #1e1e1e; }.drawer-item > span:first-child { width: 19px; color: #ad94df; text-align: center; }.drawer-item small { margin-left: auto; padding: 3px 6px; border-radius: 5px; color: #ab99cd; background: #2b233a; font-size: 9px; }.drawer-spacer { flex: 1; }.drawer-footer { display: flex; align-items: center; gap: 8px; padding: 15px 11px 5px; border-top: 1px solid var(--line); color: #777; font-size: 11px; }.status-dot { width: 6px; height: 6px; background: #85d694; border-radius: 50%; box-shadow: 0 0 10px #75cf87; }.footer-version { margin-left: auto; color: #4f4f4f; }
.model-menu, .profile-menu { position: fixed; z-index: 40; border: 1px solid rgba(255,255,255,.11); border-radius: 15px; background: #1a1a1a; box-shadow: var(--shadow); animation: pop-in .16s ease both; }.model-menu { left: max(15px, calc(50% - 482px)); bottom: 118px; width: 218px; padding: 7px; }.model-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 8px; border-radius: 10px; background: transparent; color: #aaa; text-align: left; }.model-menu button:hover, .model-menu button.selected { background: #262626; color: #eee; }.model-symbol { width: 22px; color: #b796ff; text-align: center; }.model-menu strong, .model-menu small { display: block; }.model-menu strong { font-size: 12px; }.model-menu small { margin-top: 2px; color: #707070; font-size: 10px; }.model-menu .check { margin-left: auto; color: #c2a8ff; }.profile-menu { top: 72px; right: max(15px, calc(50% - 470px)); width: 210px; padding: 8px; }.profile-card { display: flex; align-items: center; gap: 9px; padding: 8px; border-bottom: 1px solid var(--line); }.profile-card .avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: #28222f; color: #d5baff; font-weight: 700; }.profile-card strong, .profile-card span { display: block; }.profile-card strong { font-size: 11px; }.profile-card span { margin-top: 2px; color: #777; font-size: 10px; }.profile-menu > button { width: 100%; padding: 10px 8px; border-radius: 8px; background: transparent; color: #999; text-align: left; font-size: 11px; }.profile-menu > button:hover { background: #262626; color: #eee; }

@keyframes float-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes message-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 80%, 100% { opacity: .28; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px rgba(255,119,119,.06); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes logo-breathe { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(1deg); } }
@media (min-width: 720px) { .topbar { height: 98px; }.panel { padding-bottom: 225px; }.composer-dock { bottom: 24px; }.quick-actions { justify-content: center; }.quick-chip { font-size: 12px; }.welcome-block { padding-bottom: 95px; } }
@media (max-width: 430px) { .topbar { height: 78px; padding-inline: 13px; }.mode-tabs { gap: 23px; }.mode-tab { font-size: 17px; }.panel { padding-inline: 15px; padding-top: 8px; }.welcome-block { padding-bottom: 61px; }.composer-dock { width: calc(100% - 28px); }.quick-actions { margin-inline: -2px; }.composer { border-radius: 21px; }.composer-hint { font-size: 9px; }.model-button { padding-inline: 6px; }.model-menu { left: 14px; bottom: 124px; }.profile-menu { right: 14px; } }
