:root {
  color-scheme: dark;
  --page: #0c0b0d;
  --sidebar: #111012;
  --surface: #191719;
  --surface-soft: #211d20;
  --ink: #f2edef;
  --ink-muted: #b7aaae;
  --ink-faint: #85777c;
  --line: #33292d;
  --accent: #ed3f50;
  --accent-dark: #c92c3d;
  --accent-soft: #35171d;
  --shadow: 0 18px 54px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --ease: cubic-bezier(.2, 0, 0, 1);
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body { margin: 0; min-width: 320px; min-height: 0; color: var(--ink); background: var(--page); }
button, textarea, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(237, 63, 80, .38); outline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { display: flex; width: 100%; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }

.sidebar {
  z-index: 4; display: flex; flex: 0 0 264px; flex-direction: column; height: 100%; min-height: 0; overflow-y: auto;
  padding: 26px 15px 14px; background: var(--sidebar); border-right: 1px solid rgba(48, 48, 37, .035);
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 9px; margin-bottom: 32px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-mark { display: inline-flex; color: #63846d; }
.brand-mark svg { width: 30px; height: 30px; transition: transform .24s var(--ease); }
.brand:hover .brand-mark svg { transform: translateY(-1px) scale(1.03); }
.brand-name { font: 800 24px/1 "Manrope", sans-serif; letter-spacing: -1.7px; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; color: #777972; background: transparent; border: 0; border-radius: 10px; cursor: pointer; transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease); }
.icon-button:hover { color: var(--ink); background: rgba(36, 38, 34, .06); }
.icon-button:active { transform: scale(.94); }
.icon-button svg { width: 19px; height: 19px; }
.sidebar-close { display: none; }
.new-chat-button { display: flex; align-items: center; gap: 10px; width: 100%; height: 43px; padding: 0 12px; color: #3c433d; background: #e7e8e1; border: 1px solid rgba(60, 67, 61, .035); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .18s var(--ease), transform .18s var(--ease); }
.new-chat-button:hover { background: #dfe4da; transform: translateY(-1px); }
.new-chat-button:active { transform: scale(.985); }
.new-chat-button svg { width: 17px; height: 17px; }
.shortcut { margin-left: auto; color: #8c9088; font-size: 10px; font-weight: 500; }
.sidebar-section { min-height: 0; margin-top: 33px; }
.section-label { padding: 0 10px; color: #92948c; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.chat-list { display: grid; gap: 3px; max-height: calc(100vh - 270px); margin-top: 12px; overflow-y: auto; }
.history-item { display: flex; align-items: center; width: 100%; min-width: 0; padding: 9px 10px; color: #666861; background: transparent; border: 0; border-radius: 8px; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.history-item:hover { color: #343630; background: rgba(50, 51, 45, .05); }
.history-item.active { color: #30362f; background: rgba(50, 51, 45, .07); }
.history-icon { display: grid; flex: 0 0 17px; place-items: center; width: 17px; height: 17px; margin-right: 9px; color: #96978f; }
.history-icon svg { width: 17px; height: 17px; stroke-width: 1.55; }
.history-title { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.empty-history { padding: 8px 10px; color: #a3a49d; font-size: 11px; line-height: 1.55; }
.main-panel { position: relative; display: flex; flex: 1; flex-direction: column; width: 0; height: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.topbar { z-index: 3; display: flex; flex: 0 0 68px; align-items: center; justify-content: space-between; padding: 0 36px; }
.menu-button { display: none; }
.model-picker-wrap { position: relative; }
.model-picker { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; background: transparent; border: 0; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .16s; }
.model-picker:hover, .model-picker[aria-expanded="true"] { background: #efeee9; }
.model-provider { display: grid; place-items: center; width: 22px; height: 22px; color: #79917e; }
.model-provider svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.chevron { width: 15px; height: 15px; color: #8a8b84; transition: transform .18s var(--ease); }
.model-picker[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.privacy-note { display: flex; align-items: center; gap: 6px; color: #8b8c85; font-size: 11px; }
.model-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 10; width: min(360px, calc(100vw - 28px)); max-height: min(68vh, 560px); overflow-y: auto; padding: 8px; background: #fff; border: 1px solid rgba(41, 43, 40, .07); border-radius: 14px; box-shadow: var(--shadow); animation: menu-in .18s var(--ease) both; }
.model-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.menu-heading { padding: 8px 9px 11px; color: #3c3e39; font-size: 12px; font-weight: 650; }
.provider-label { padding: 8px 9px 5px; color: #a1a198; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.model-test-note { margin: 0 8px 8px; color: #8f7350; font-size: 10px; line-height: 1.4; }
.model-search { width: 100%; margin: 0 0 6px; padding: 9px 10px; color: #3e403a; background: #f7f7f4; border: 1px solid #e8e8e1; border-radius: 9px; font: inherit; font-size: 11px; outline: none; }
.model-search:focus { border-color: #9baa91; box-shadow: 0 0 0 3px rgba(96, 128, 106, .12); }
.model-search-empty { padding: 12px 9px; color: #92938c; font-size: 11px; text-align: center; }
.model-option, .locked-model { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 7px 9px; border-radius: 9px; }
.model-option { background: transparent; border: 0; text-align: left; cursor: pointer; transition: background .16s; }
.model-option[hidden], .model-search-empty[hidden] { display: none; }
.model-option:hover, .model-option.selected { background: #f3f5ef; }
.provider-icon { display: grid; flex: 0 0 24px; place-items: center; width: 24px; height: 24px; color: #758b77; background: #edf1e9; border-radius: 8px; font-size: 12px; font-weight: 700; }
.provider-icon { color: #777; background: #f1f0ed; font-size: 12px; font-weight: 700; }
.baidu-icon { color: #b51d2a; background: #fff0f1; }
.option-copy { display: grid; gap: 3px; min-width: 0; }
.option-copy strong { color: #3e403a; font-size: 11px; font-weight: 600; }
.option-copy small { color: #92938c; font-size: 10px; }
.option-check { display: none; margin-left: auto; color: #60806a; font-size: 12px; }
.model-option.selected .option-check { display: block; }

.conversation {
  display: flex; flex: 1; flex-direction: column; width: min(100%, 790px); min-height: 0; margin: 0 auto; padding: 0 32px;
  overflow-y: auto; overscroll-behavior-y: contain; scrollbar-color: #71323b transparent; scrollbar-width: thin;
}
.conversation::-webkit-scrollbar { width: 7px; }
.conversation::-webkit-scrollbar-track { background: transparent; }
.conversation::-webkit-scrollbar-thumb { background: #57272e; border: 2px solid transparent; border-radius: 8px; background-clip: padding-box; }
.conversation::-webkit-scrollbar-thumb:hover { background-color: #a63a47; }
.messages { display: flex; flex-direction: column; gap: 22px; width: 100%; padding: 28px 0 34px; }
.messages:empty { display: none; }
.message { display: flex; gap: 12px; animation: message-in .3s var(--ease) both; }
@keyframes message-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.message.user { justify-content: flex-end; }
.message-avatar { display: grid; flex: 0 0 29px; place-items: center; width: 29px; height: 29px; color: #60806a; background: #edf0e9; border-radius: 10px; }
.message-avatar svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.1; }
.message-body { min-width: 0; max-width: 86%; }
.message.user .message-body { max-width: 82%; padding: 12px 15px; color: #333830; background: #eff0ea; border-radius: 15px 15px 4px 15px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-label { margin: 4px 0 8px; color: #777970; font-size: 11px; font-weight: 650; }
.message-content { color: #44463f; font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-actions { display: flex; gap: 5px; margin-top: 10px; opacity: .62; }
.message-actions button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; color: #81837b; background: transparent; border: 0; border-radius: 6px; font-size: 10px; cursor: pointer; transition: background .15s, opacity .15s; }
.message-actions button:hover { color: #4a5148; background: #efeee8; }
.message-actions svg { width: 13px; height: 13px; }
.typing-indicator { display: flex; align-items: center; gap: 10px; min-height: 20px; }
.typing-dots { display: flex; flex: 0 0 auto; gap: 4px; align-items: center; height: 18px; }
.typing-dots span { width: 5px; height: 5px; background: #8b9b89; border-radius: 50%; animation: dot-breathe 1.1s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: .14s; }
.typing-dots span:nth-child(3) { animation-delay: .28s; }
.typing-stage { color: #85877f; font-size: 11px; line-height: 1.5; transition: opacity .16s ease, transform .16s ease; }
.typing-stage.is-changing { opacity: 0; transform: translateY(3px); }
@keyframes dot-breathe { 0%, 60%, 100% { opacity: .4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.error-message { margin-top: 10px; padding: 10px 12px; color: #8a5244; background: #fbf0ec; border: 1px solid #f1ded6; border-radius: 9px; font-size: 11px; line-height: 1.55; }

.composer-area { flex: 0 0 auto; width: min(100%, 790px); margin: 0 auto; padding: 0 32px 18px; }
.composer { padding: 13px 14px 12px; background: #fff; border: 1px solid #e8e7e0; border-radius: 19px; box-shadow: 0 4px 18px rgba(47, 47, 39, .045); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: #cbd7ca; box-shadow: 0 0 0 3px rgba(82, 120, 100, .07), 0 4px 18px rgba(47, 47, 39, .045); }
.composer textarea { display: block; width: 100%; min-height: 38px; max-height: 180px; padding: 7px 2px 9px; color: #393b36; background: transparent; border: 0; outline: 0; resize: none; font-size: 14px; line-height: 1.55; }
.composer textarea::placeholder { color: #a2a39b; }
.composer textarea:focus-visible { outline: 0; }
.composer-bottom, .composer-tools { display: flex; align-items: center; justify-content: space-between; }
.composer-bottom { gap: 12px; margin-top: 5px; padding-top: 9px; border-top: 1px solid rgba(80, 80, 80, .08); }
.composer-tools { gap: 12px; min-width: 0; }
.tool-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 5px; color: #85877f; background: transparent; border: 0; border-radius: 8px; font-size: 11px; cursor: pointer; transition: color .15s, background .15s; }
.tool-button:hover { color: #4e6755; }
.tool-button svg { width: 15px; height: 15px; }
.composer-hint { overflow: hidden; color: #adaea7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.send-button { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; color: #fff; background: #6d8871; border: 0; border-radius: 13px; cursor: pointer; transition: background .16s, transform .16s var(--ease), box-shadow .16s, opacity .16s; }
.send-button:hover { background: #55745d; transform: translateY(-1px); }
.send-button:active { transform: scale(.93); }
.send-button:disabled { opacity: .45; cursor: wait; transform: none; }
.send-button svg { width: 18px; height: 18px; stroke-width: 2; animation: composer-icon-in .18s cubic-bezier(.2, 0, 0, 1) both; }
@keyframes composer-icon-in { from { opacity: 0; transform: scale(.84); } to { opacity: 1; transform: scale(1); } }
.composer-footnote { margin: 10px 0 0; color: #a4a59e; font-size: 9px; text-align: center; }

.field-label { display: block; margin-bottom: 7px; color: #53554e; font-size: 11px; font-weight: 600; }
.key-field { display: flex; align-items: center; border: 1px solid #e7e6df; border-radius: 9px; transition: border .16s, box-shadow .16s; }
.key-field:focus-within { border-color: #9aaf9c; box-shadow: 0 0 0 3px rgba(82, 120, 100, .08); }
.key-field input { width: 100%; min-width: 0; padding: 11px 12px; color: #363832; background: transparent; border: 0; outline: 0; font-size: 12px; }
.key-field input:focus-visible { outline: 0; }
.key-field input::placeholder { color: #adaea7; }
.show-key { padding: 6px 10px; color: #7d827a; background: none; border: 0; font-size: 10px; cursor: pointer; }
.key-status { display: flex; align-items: center; gap: 7px; margin: 10px 0 19px; color: #97988f; font-size: 10px; }
.status-dot { width: 6px; height: 6px; background: #9eb49c; border-radius: 50%; }
.key-status.has-key { color: #527864; }
.key-status.has-key .status-dot { background: #5b9669; box-shadow: 0 0 0 3px #e8f1e8; }
.key-status.key-error { color: #a45443; }
.key-status.key-error .status-dot { background: #b8614d; }
.connect-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; color: #fff; background: #63816a; border: 0; border-radius: 9px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .16s, transform .16s; }
.connect-button:hover { background: #4f7058; transform: translateY(-1px); }
.connect-button:active { transform: scale(.99); }
.connect-button svg { width: 16px; height: 16px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: min(360px, calc(100vw - 40px)); padding: 11px 15px; color: #fff; background: #343a34; border-radius: 10px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translateY(0); }
.sidebar-backdrop { display: none; }

@media (min-width: 1400px) {
  .sidebar { flex-basis: 282px; padding-right: 18px; padding-left: 18px; }
  .topbar { padding-right: 48px; padding-left: 48px; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; height: 100dvh; min-height: 0; transform: translateX(-101%); transition: transform .28s var(--ease); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 12px 0 40px rgba(35, 38, 34, .1); }
  .sidebar-close { display: inline-grid; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 3; display: block; background: rgba(40, 42, 37, .24); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .sidebar-backdrop.visible { opacity: 1; pointer-events: auto; }
  .topbar { flex-basis: 60px; padding: 0 18px; }
  .menu-button { display: inline-grid; }
  .privacy-note { display: none; }
  .conversation, .composer-area { padding-right: 22px; padding-left: 22px; }
}
@media (max-width: 500px) {
  .topbar { padding: 0 12px; }
  .conversation { padding-right: 17px; padding-left: 17px; }
  .composer-area { padding: 0 12px 12px; }
  .composer { padding: 10px 11px 10px; border-radius: 17px; }
  .composer textarea { min-height: 36px; font-size: 13px; }
  .composer-bottom { margin-top: 3px; padding-top: 7px; }
  .send-button { flex-basis: 38px; width: 38px; height: 38px; border-radius: 12px; }
  .composer-hint { display: none; }
  .tool-button span { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body { color: var(--ink); background: var(--page); }
.sidebar { border-right-color: rgba(255, 255, 255, .045); }
.brand-mark { color: var(--accent); }
.icon-button { color: #a69b9f; }
.icon-button:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
.new-chat-button { color: #f0e9eb; background: #211b1e; border-color: #302326; }
.new-chat-button:hover { background: #302125; }
.shortcut, .section-label { color: #94878b; }
.history-item { color: #b0a5a8; }
.history-item:hover { color: #f2edef; background: rgba(255, 255, 255, .055); }
.history-item.active { color: #fff1f2; background: #261b1f; }
.history-icon { color: #97898d; }
.empty-history { color: #96888c; }
.model-picker:hover, .model-picker[aria-expanded="true"] { background: #211b1e; }
.model-provider { color: #f15a67; }
.chevron, .privacy-note { color: #9c8f93; }
.model-menu { background: #1a1719; border-color: #382c30; }
.model-search { color: #f0e8ea; background: #241e20; border-color: #382c30; }
.model-search::placeholder { color: #a9989d; }
.model-search:focus { border-color: #a74652; box-shadow: 0 0 0 3px rgba(255, 75, 90, .12); }
.model-search-empty { color: #a9989d; }
.menu-heading { color: #f2edef; }
.provider-label { color: #aa9b9f; }
.model-test-note { color: #d3ae7e; }
.model-option:hover, .model-option.selected { background: #2a1b20; }
.provider-icon { color: #d7c9cd; background: #30272a; }
.baidu-icon { color: #ff7580; background: #351c22; }
.option-copy strong { color: #f0e8ea; }
.option-copy small { color: #a9989d; }
.option-check { color: #ff5b69; }
.message-avatar { color: #ff6875; background: #301a1f; }
.message.user .message-body { color: #f4edef; background: #2b1c20; }
.assistant-label { color: #b4a5a9; }
.message-content { color: #e6dcdf; }
.message-actions button { color: #a9999d; }
.message-actions button:hover { color: #fff; background: #2a2023; }
.typing-stage { color: #b4a5a9; }
.typing-dots span { background: #f15a67; }
.error-message { color: #ff9aa1; background: #32191e; border-color: #68303a; }
.composer { background: #181618; border-color: #342a2d; box-shadow: 0 5px 20px rgba(0, 0, 0, .22); }
.composer:focus-within { border-color: #8d343e; box-shadow: 0 0 0 3px rgba(237, 63, 80, .11), 0 5px 20px rgba(0, 0, 0, .22); }
.composer textarea { color: #f1e9eb; }
.composer textarea::placeholder { color: #918488; }
.tool-button { color: #a9999e; }
.tool-button:hover { color: #ff6975; }
.composer-hint { color: #a7989c; }
.send-button { background: #d83243; }
.send-button:hover { background: #f04453; }
.composer-footnote { color: #9a8b90; }
.field-label { color: #e7dde0; }
.key-field { border-color: #43353a; }
.key-field:focus-within { border-color: #a23d48; box-shadow: 0 0 0 3px rgba(237, 63, 80, .1); }
.key-field input { color: #f3ecee; }
.key-field input::placeholder { color: #8f8186; }
.show-key { color: #b6a7ab; }
.key-status { color: #a9999d; }
.status-dot { background: #ed5965; }
.key-status.has-key { color: #ff818a; }
.key-status.has-key .status-dot { background: #ff5967; box-shadow: 0 0 0 3px #3a1c22; }
.key-status.key-error { color: #ff9ba2; }
.key-status.key-error .status-dot { background: #ff5261; }
.connect-button { background: #d83243; }
.connect-button:hover { background: #f04453; }
.toast { color: #fff1f2; background: #302327; border: 1px solid #553039; }
.sidebar-backdrop { background: rgba(0, 0, 0, .66); }
:root {
  --page: #09080b;
  --sidebar: #100d11;
  --surface: #181317;
  --surface-soft: #21171c;
  --ink: #f5edef;
  --ink-muted: #bcaeb2;
  --ink-faint: #918186;
  --line: rgba(255, 224, 231, .1);
  --accent: #ff5268;
  --accent-dark: #d72c46;
  --accent-soft: #35161e;
  --shadow: 0 24px 70px rgba(0, 0, 0, .56), 0 4px 14px rgba(0, 0, 0, .32);
}

.app-shell {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 78% 12%, rgba(111, 28, 47, .12), transparent 42%),
    radial-gradient(ellipse at 42% 100%, rgba(65, 20, 35, .12), transparent 48%),
    linear-gradient(135deg, #0b090c, #0b090c 55%, #100a0e);
}
.app-shell::before, .app-shell::after { position: absolute; inset: -8%; z-index: -1; content: ""; pointer-events: none; }
.app-shell::before {
  background:
    radial-gradient(ellipse at 74% 14%, rgba(174, 35, 61, .22), transparent 32%),
    radial-gradient(ellipse at 38% 88%, rgba(100, 25, 55, .18), transparent 35%);
  filter: blur(34px);
  animation: ambient-orbit 22s ease-in-out infinite alternate;
}
.app-shell::after {
  inset: 0;
  background-image: linear-gradient(rgba(255, 232, 237, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 232, 237, .025) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .38;
  mask-image: radial-gradient(ellipse at 67% 42%, #000 4%, transparent 76%);
}

.sidebar {
  background: linear-gradient(165deg, rgba(24, 17, 22, .92), rgba(13, 11, 14, .9));
  border-right-color: rgba(255, 219, 228, .08);
  box-shadow: inset -1px 0 rgba(255, 91, 113, .035);
  backdrop-filter: blur(26px) saturate(135%);
}
.brand-mark { color: #ff6477; filter: drop-shadow(0 0 12px rgba(255, 60, 87, .35)); }
.new-chat-button {
  color: #fff0f3;
  background: linear-gradient(135deg, rgba(130, 35, 53, .58), rgba(50, 22, 31, .68));
  border-color: rgba(255, 144, 158, .17);
  box-shadow: inset 0 1px rgba(255, 229, 234, .12), 0 8px 22px rgba(0, 0, 0, .17);
  backdrop-filter: blur(16px);
}
.new-chat-button:hover {
  background: linear-gradient(135deg, rgba(166, 42, 63, .72), rgba(65, 24, 35, .8));
  box-shadow: inset 0 1px rgba(255, 229, 234, .18), 0 10px 28px rgba(116, 22, 41, .23);
  transform: translateY(-2px);
}
.history-item { border: 1px solid transparent; }
.history-item:hover { background: rgba(255, 255, 255, .045); }
.history-item.active { background: linear-gradient(100deg, rgba(126, 37, 54, .24), rgba(255, 255, 255, .025)); border-color: rgba(255, 130, 149, .09); }

.topbar {
  background: linear-gradient(180deg, rgba(16, 12, 16, .66), rgba(16, 12, 16, .15));
  border-bottom: 1px solid rgba(255, 221, 229, .055);
  backdrop-filter: blur(18px) saturate(130%);
}
.model-picker {
  color: #f4e9ec;
  background: linear-gradient(135deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025));
  border: 1px solid rgba(255, 228, 234, .1);
  box-shadow: inset 0 1px rgba(255, 255, 255, .075), 0 6px 20px rgba(0, 0, 0, .13);
  backdrop-filter: blur(18px);
}
.model-picker:hover, .model-picker[aria-expanded="true"] { background: linear-gradient(135deg, rgba(152, 43, 62, .32), rgba(54, 25, 34, .6)); border-color: rgba(255, 119, 139, .2); }
.model-menu {
  background: linear-gradient(145deg, rgba(36, 25, 31, .96), rgba(19, 15, 19, .97));
  border-color: rgba(255, 221, 230, .12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .62), inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(28px) saturate(145%);
}
.model-option:hover, .model-option.selected { background: linear-gradient(100deg, rgba(147, 42, 60, .28), rgba(255, 255, 255, .035)); }

.message { animation-duration: .42s; }
.message-avatar {
  color: #ff7e8d;
  background: linear-gradient(145deg, rgba(192, 47, 71, .31), rgba(56, 23, 35, .62));
  border: 1px solid rgba(255, 151, 166, .13);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 5px 16px rgba(111, 24, 44, .14);
}
.message.user .message-body {
  color: #fff0f3;
  background: linear-gradient(145deg, rgba(130, 39, 57, .7), rgba(43, 23, 31, .84));
  border: 1px solid rgba(255, 144, 160, .17);
  box-shadow: inset 0 1px rgba(255, 229, 234, .1), 0 10px 28px rgba(0, 0, 0, .18);
  backdrop-filter: blur(16px);
}
.message-content { color: #eee3e6; }

.composer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(32, 27, 30, .84), rgba(19, 17, 19, .9));
  border-color: rgba(255, 226, 233, .12);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 10px 30px rgba(0, 0, 0, .25);
  backdrop-filter: blur(20px) saturate(125%);
}
.composer::before {
  position: absolute;
  inset: 0 18% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 193, 203, .3), transparent);
  content: "";
  pointer-events: none;
}
.composer:focus-within {
  border-color: rgba(255, 104, 127, .38);
  box-shadow: inset 0 1px rgba(255, 255, 255, .09), 0 0 0 3px rgba(237, 63, 80, .07), 0 12px 32px rgba(0, 0, 0, .29);
}
.composer textarea { position: relative; z-index: 1; color: #fff1f3; }
.composer textarea::placeholder { color: #91878b; }
.composer-bottom { position: relative; z-index: 1; border-top-color: rgba(255, 255, 255, .075); }
.tool-button:hover { color: #ff8796; background: rgba(255, 255, 255, .045); }
.send-button { background: linear-gradient(145deg, #f3414d, #d51f32); border: 1px solid rgba(255, 199, 205, .2); box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 4px 12px rgba(210, 35, 62, .2); }
.send-button:hover { background: linear-gradient(145deg, #ff515d, #e3263b); box-shadow: inset 0 1px rgba(255, 255, 255, .25), 0 5px 14px rgba(210, 35, 62, .27); transform: translateY(-1px); }
.send-button.is-stop { background: linear-gradient(145deg, #e33b48, #bd1d2e); }
.send-button.is-stop:hover { background: linear-gradient(145deg, #f04753, #cf2235); }
.send-button:active { transform: scale(.97); }
.composer-footnote { color: #92858a; }

.key-field { background: rgba(255, 255, 255, .035); border-color: rgba(255, 224, 231, .14); }
.key-field:focus-within { border-color: rgba(255, 111, 131, .55); box-shadow: 0 0 0 3px rgba(237, 63, 80, .12), inset 0 1px rgba(255, 255, 255, .06); }
.connect-button {
  background: linear-gradient(120deg, #f25469, #ca2944);
  box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 8px 22px rgba(196, 32, 58, .24);
}
.connect-button:hover { background: linear-gradient(120deg, #ff6a7c, #df3450); box-shadow: inset 0 1px rgba(255, 255, 255, .28), 0 11px 26px rgba(196, 32, 58, .32); }
.connect-button:disabled { opacity: .6; cursor: wait; }
.toast { background: linear-gradient(135deg, rgba(55, 33, 41, .96), rgba(29, 20, 25, .97)); border-color: rgba(255, 126, 146, .2); backdrop-filter: blur(20px); }
.sidebar-backdrop { background: rgba(6, 4, 6, .68); backdrop-filter: blur(5px); }

@keyframes ambient-orbit {
  from { transform: translate3d(1%, -1%, 0) scale(1); }
  to { transform: translate3d(-1.5%, 1.5%, 0) scale(1.05); }
}
@keyframes card-arrive {
  from { opacity: 0; translate: 0 14px; scale: .985; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(236, 70, 85, .13), 0 0 0 rgba(236, 70, 85, 0); }
  50% { box-shadow: 0 0 0 5px rgba(236, 70, 85, .04), 0 0 16px rgba(236, 70, 85, .28); }
}
@keyframes message-in {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 760px) {
  .sidebar { background: linear-gradient(165deg, rgba(24, 17, 22, .98), rgba(13, 11, 14, .98)); }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell::before, .login-screen::before, .login-card { animation: none; }
}

.markdown-body { white-space: normal; }
.markdown-body p { margin: 0 0 12px; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin: 1.05em 0 .45em;
  color: #fff0f3;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  line-height: 1.3;
}
.markdown-body h1 { font-size: 1.55em; }
.markdown-body h2 { font-size: 1.35em; }
.markdown-body h3 { font-size: 1.16em; }
.markdown-body h4, .markdown-body h5, .markdown-body h6 { font-size: 1.04em; }
.markdown-body ul, .markdown-body ol { margin: 0 0 12px; padding-left: 1.55em; }
.markdown-body li { padding-left: .2em; }
.markdown-body li + li { margin-top: 4px; }
.markdown-body li::marker { color: #ff7587; }
.markdown-body blockquote {
  margin: 10px 0 14px;
  padding: 3px 0 3px 13px;
  color: #c5b5ba;
  border-left: 2px solid rgba(255, 101, 125, .58);
}
.markdown-body hr { margin: 16px 0; border: 0; border-top: 1px solid rgba(255, 220, 228, .15); }
.markdown-body a { color: #ff8a99; text-decoration-color: rgba(255, 138, 153, .45); text-underline-offset: 3px; }
.markdown-body a:hover { color: #ffc0c7; text-decoration-color: currentColor; }
.markdown-body :not(pre) > code {
  padding: .12em .4em;
  color: #ffb1ba;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 222, 229, .09);
  border-radius: 5px;
  font: .9em/1.5 Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}
.markdown-body pre {
  max-width: 100%;
  margin: 12px 0;
  padding: 13px 15px;
  overflow: auto;
  color: #f0e2e6;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)), rgba(10, 9, 12, .75);
  border: 1px solid rgba(255, 221, 229, .12);
  border-radius: 10px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
  overscroll-behavior-x: contain;
}
.markdown-body pre code { color: inherit; font: 12px/1.65 Consolas, "Courier New", monospace; white-space: pre; }
.message.user .markdown-body { white-space: normal; }

.app-shell[hidden], .login-screen[hidden], .login-cancel[hidden] { display: none; }
.login-screen {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 28px 18px;
  overflow: auto;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(114, 28, 48, .2), transparent 40%),
    radial-gradient(ellipse at 8% 95%, rgba(61, 20, 38, .18), transparent 38%),
    linear-gradient(145deg, #09080b, #100b0e 55%, #09080b);
}
.login-screen::before {
  position: absolute;
  inset: -10%;
  z-index: -1;
  background: radial-gradient(ellipse at 58% 42%, rgba(207, 42, 71, .15), transparent 37%), radial-gradient(ellipse at 32% 75%, rgba(112, 31, 64, .13), transparent 34%);
  filter: blur(35px);
  animation: ambient-orbit 22s ease-in-out infinite alternate;
  content: "";
  pointer-events: none;
}
.login-card {
  position: relative;
  width: min(100%, 438px);
  padding: 30px 32px 24px;
  background: linear-gradient(145deg, rgba(33, 25, 30, .86), rgba(17, 14, 18, .92));
  border: 1px solid rgba(255, 224, 231, .13);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .56), inset 0 1px rgba(255, 255, 255, .09), 0 0 60px rgba(162, 28, 56, .09);
  backdrop-filter: blur(30px) saturate(135%);
  animation: card-arrive .6s var(--ease) both;
}
.login-brand { margin-bottom: 23px; }
.login-brand .brand-mark { color: #ff6578; }
.login-card h1 {
  margin: 0;
  color: #f7eff1;
  font: 650 clamp(25px, 4vw, 29px)/1.2 "Manrope", sans-serif;
  letter-spacing: -1.2px;
}
.login-form { display: grid; margin-top: 21px; }
.login-form .field-label { color: #e7dde0; }
.login-form .key-status.idle { display: none; }
.login-form .key-status.loading { color: #d7c6ca; }
.login-form .key-status.loading .status-dot { animation: status-pulse 1.2s ease-in-out infinite; }
.login-form .key-status.key-error { color: #ff6666; }
.login-form .key-status.key-error .status-dot { background: #ff2424; }
.login-form .key-status.has-key { color: #ff4b4b; }
.login-form .key-status.has-key .status-dot { background: #ff2424; }
.login-form .key-status { min-height: 16px; margin: 11px 0 0; }
.login-form .connect-button { margin-top: 15px; }
.key-field { background: rgba(255, 255, 255, .035); border-color: rgba(255, 224, 231, .14); }
.key-field:focus-within { border-color: rgba(255, 111, 131, .55); box-shadow: 0 0 0 3px rgba(237, 63, 80, .12), inset 0 1px rgba(255, 255, 255, .06); }
.key-field input { color: #f3ecee; }
.key-field input::placeholder { color: #8f8186; }
.show-key { color: #b6a7ab; }
.login-form .status-dot { flex: 0 0 6px; background: #ed5965; }
.connect-button {
  height: 44px;
  background: linear-gradient(120deg, #f25469, #ca2944);
  box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 8px 22px rgba(196, 32, 58, .24);
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.connect-button:hover { background: linear-gradient(120deg, #ff6a7c, #df3450); box-shadow: inset 0 1px rgba(255, 255, 255, .28), 0 11px 26px rgba(196, 32, 58, .32); }
.connect-button:active { transform: scale(.985); }
.connect-button:disabled { opacity: .6; cursor: wait; }
.login-cancel {
  width: 100%;
  margin-top: 9px;
  padding: 10px;
  color: #c9b9be;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 224, 231, .11);
  border-radius: 9px;
  font-size: 11px;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.login-cancel:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 224, 231, .2); }
.change-key-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  color: #d7c6ca;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  border: 1px solid rgba(255, 224, 231, .12);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s, transform .18s var(--ease);
}
.change-key-button:hover { color: #fff0f3; background: rgba(205, 48, 73, .13); border-color: rgba(255, 113, 132, .33); transform: translateY(-1px); }
.change-key-button:active { transform: scale(.97); }
.change-key-button svg { width: 15px; height: 15px; color: #ff7586; }

@media (max-width: 500px) {
  .login-screen { padding: 20px 14px; }
  .login-card { padding: 25px 22px 20px; border-radius: 19px; }
  .login-brand { margin-bottom: 20px; }
  .login-form { margin-top: 17px; }
  .topbar-actions { gap: 7px; }
  .change-key-button { width: 36px; min-height: 36px; padding: 0; }
  .change-key-button span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .login-screen::before, .login-card { animation: none; }
}

.brand { gap: 11px; }
.brand-mark { color: #ff5268; filter: none; }
.brand-mark svg { stroke-width: 2.5; }
.brand-mark svg { width: 34px; height: 34px; }
.brand-name { font-size: 27px; letter-spacing: -1.8px; }
.sidebar { flex-basis: 286px; padding-top: 29px; }
.sidebar-top { margin-bottom: 35px; }
.new-chat-button { height: 48px; font-size: 15px; }
.sidebar-nav-button { min-height: 46px; font-size: 14px; }
.shortcut, .section-label { font-size: 12px; }
.sidebar-section { margin-top: 36px; }
.history-title { font-size: 14px; }
.empty-history { font-size: 13px; }
.topbar { flex-basis: 74px; }
.model-picker { gap: 10px; padding: 10px 12px; font-size: 15px; }
.privacy-note { font-size: 13px; }
.change-key-button { min-height: 38px; font-size: 13px; }
.menu-heading { font-size: 14px; }
.provider-label { font-size: 11px; }
.model-test-note { font-size: 12px; }
.model-search { padding: 10px 12px; font-size: 13px; }
.model-option, .locked-model { min-height: 54px; }
.provider-icon { flex-basis: 28px; width: 28px; height: 28px; font-size: 14px; }
.option-copy strong { font-size: 13px; }
.option-copy small { font-size: 11px; }
.option-check { font-size: 14px; }
.conversation, .composer-area { width: min(100%, 880px); }
.conversation { padding-right: 36px; padding-left: 36px; }
.messages { gap: 26px; padding-top: 32px; }
.message { gap: 14px; }
.message-avatar { flex-basis: 34px; width: 34px; height: 34px; border-radius: 12px; }
.message-avatar svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.6; }
.message.user .message-body, .message-content { font-size: 16px; }
.message.user .message-body { padding: 14px 17px; }
.assistant-label { margin-bottom: 9px; font-size: 13px; }
.message-actions button { padding: 6px 8px; font-size: 12px; }
.message-actions svg { width: 15px; height: 15px; }
.typing-stage { font-size: 13px; }
.error-message { padding: 12px 14px; font-size: 13px; }
.composer-area { padding-bottom: 21px; }
.composer { padding: 15px 16px 14px; }
.composer textarea { min-height: 44px; font-size: 16px; }
.tool-button { font-size: 13px; }
.tool-button svg { width: 17px; height: 17px; }
.composer-hint { font-size: 12px; }
.send-button { flex-basis: 44px; width: 44px; height: 44px; }
.send-button svg { width: 20px; height: 20px; }
.composer-footnote { font-size: 11px; }
.field-label { font-size: 13px; }
.key-field input { padding: 13px 14px; font-size: 14px; }
.show-key { font-size: 12px; }
.key-status { font-size: 12px; }
.connect-button { height: 48px; font-size: 14px; }
.toast { font-size: 14px; }
.api-docs-view, .prices-view { padding-top: 48px; }
.api-docs-header h1 { font-size: clamp(29px, 4vw, 38px); }
.api-docs-header p:not(.eyebrow) { font-size: 14px; }
.api-doc-card h2 { font-size: 17px; }
.api-doc-card p { font-size: 13px; }
.api-doc-card code, .api-doc-card pre code { font-size: 12px; }
.api-doc-card .api-doc-note { font-size: 12px; }
.pricing-card h2 { font-size: 16px; }
.pricing-field-label, .pricing-multiplier { font-size: 12px; }
.pricing-model-id { font-size: 13px; }
.pricing-empty { font-size: 14px; }
.eyebrow { font-size: 11px; }
.welcome h1 { font-size: clamp(36px, 4.5vw, 48px); }
.welcome-description { font-size: 15px; }
.login-card h1 { font-size: clamp(29px, 4vw, 34px); }
.login-form .key-status { font-size: 12px; }
.login-cancel { font-size: 13px; }

@media (min-width: 1400px) {
  .sidebar { flex-basis: 300px; }
}
@media (max-width: 760px) {
  .sidebar { width: min(286px, 86vw); }
  .topbar { flex-basis: 68px; padding-right: 18px; padding-left: 18px; }
  .conversation, .composer-area { padding-right: 22px; padding-left: 22px; }
  .api-docs-view, .prices-view { padding-top: 32px; }
}
@media (max-width: 500px) {
  .topbar { padding-right: 12px; padding-left: 12px; }
  .conversation { padding-right: 17px; padding-left: 17px; }
  .composer-area { padding-right: 12px; padding-left: 12px; }
  .composer textarea { font-size: 15px; }
  .welcome h1 { font-size: 36px; }
  .welcome-description { font-size: 14px; }
  .api-docs-view, .prices-view { padding-top: 26px; }
}

:root {
  --accent: #ff2020;
  --accent-dark: #c90000;
  --accent-soft: #350e0e;
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline-color: rgba(255, 32, 32, .42); }
.app-shell {
  background:
    radial-gradient(ellipse at 78% 12%, rgba(120, 16, 20, .14), transparent 42%),
    radial-gradient(ellipse at 42% 100%, rgba(70, 10, 12, .14), transparent 48%),
    linear-gradient(135deg, #0b090c, #0b090c 55%, #100a0e);
}
.app-shell::before {
  background: radial-gradient(ellipse at 74% 14%, rgba(190, 18, 24, .2), transparent 32%), radial-gradient(ellipse at 38% 88%, rgba(100, 12, 14, .16), transparent 35%);
}
.brand-mark { color: #ff3030; filter: drop-shadow(0 0 12px rgba(255, 32, 32, .32)); }
.new-chat-button { background: linear-gradient(135deg, rgba(132, 20, 23, .62), rgba(48, 12, 14, .72)); border-color: rgba(255, 72, 72, .2); }
.new-chat-button:hover { background: linear-gradient(135deg, rgba(170, 15, 20, .76), rgba(65, 12, 14, .82)); box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 10px 28px rgba(116, 10, 14, .28); }
.history-item.active { background: linear-gradient(100deg, rgba(150, 18, 22, .24), rgba(255, 255, 255, .025)); border-color: rgba(255, 65, 65, .12); }
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 36, 36, .14), 0 0 0 rgba(255, 36, 36, 0); }
  50% { box-shadow: 0 0 0 5px rgba(255, 36, 36, .04), 0 0 16px rgba(255, 36, 36, .3); }
}
.model-provider, .option-check { color: #ff3030; }
.baidu-icon { color: #ff4545; background: #351313; }
.model-picker:hover, .model-picker[aria-expanded="true"] { background: linear-gradient(135deg, rgba(160, 20, 24, .34), rgba(54, 15, 17, .62)); border-color: rgba(255, 55, 55, .28); }
.model-option:hover, .model-option.selected { background: linear-gradient(100deg, rgba(145, 18, 22, .3), rgba(255, 255, 255, .035)); }
.message-avatar { color: #ff3838; background: linear-gradient(145deg, rgba(192, 22, 28, .34), rgba(56, 12, 15, .66)); border-color: rgba(255, 68, 68, .18); }
.message.user .message-body { background: linear-gradient(145deg, rgba(135, 18, 24, .72), rgba(43, 14, 17, .88)); border-color: rgba(255, 66, 66, .2); }
.typing-dots span { background: #ff2929; }
.typing-stage { color: #d3a2a2; }
.composer { box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 10px 30px rgba(0, 0, 0, .25); }
.composer::before { background: linear-gradient(90deg, transparent, rgba(255, 52, 52, .32), transparent); }
.composer:focus-within { border-color: rgba(255, 48, 48, .45); box-shadow: inset 0 1px rgba(255, 255, 255, .09), 0 0 0 3px rgba(255, 32, 32, .08), 0 12px 32px rgba(0, 0, 0, .29); }
.tool-button:hover { color: #ff4545; }
.history-item:hover .history-icon { color: #e9747e; }
.history-item.active .history-icon { color: #ff5b67; }
.send-button { box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 4px 12px rgba(210, 35, 62, .2); }
.send-button:hover { box-shadow: inset 0 1px rgba(255, 255, 255, .25), 0 5px 14px rgba(210, 35, 62, .27); }
.key-field:focus-within { border-color: rgba(255, 45, 45, .6); box-shadow: 0 0 0 3px rgba(255, 32, 32, .13), inset 0 1px rgba(255, 255, 255, .06); }
.login-screen { background: radial-gradient(ellipse at 50% 44%, rgba(120, 12, 20, .22), transparent 40%), radial-gradient(ellipse at 8% 95%, rgba(61, 12, 16, .2), transparent 38%), linear-gradient(145deg, #09080b, #10090b 55%, #09080b); }
.login-screen::before { background: radial-gradient(ellipse at 58% 42%, rgba(210, 16, 24, .18), transparent 37%), radial-gradient(ellipse at 32% 75%, rgba(112, 12, 18, .15), transparent 34%); }
.login-brand .brand-mark, .change-key-button svg { color: #ff2929; }
.login-form .status-dot { background: #ff2424; }
.login-form .key-status.has-key { color: #ff4b4b; }
.login-form .key-status.has-key .status-dot { background: #ff2424; box-shadow: 0 0 0 3px #3a1111; }
.login-form .key-status.key-error { color: #ff6666; }
.login-form .key-status.key-error .status-dot { background: #ff2424; }
.connect-button { background: linear-gradient(120deg, #ff3838, #c90000); box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 8px 22px rgba(196, 8, 16, .28); }
.connect-button:hover { background: linear-gradient(120deg, #ff5555, #e00000); box-shadow: inset 0 1px rgba(255, 255, 255, .28), 0 11px 26px rgba(196, 8, 16, .36); }
.change-key-button:hover { background: rgba(205, 18, 24, .16); border-color: rgba(255, 48, 48, .42); }
.toast { border-color: rgba(255, 48, 48, .25); }
.markdown-body li::marker { color: #ff3434; }
.markdown-body blockquote { border-left-color: rgba(255, 48, 48, .68); }
.markdown-body a { color: #ff5555; text-decoration-color: rgba(255, 55, 55, .52); }
.markdown-body a:hover { color: #ff8585; }
.markdown-body :not(pre) > code { color: #ff6666; }
.sidebar-nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 41px;
  margin-top: 8px;
  padding: 0 12px;
  color: #b0a5a8;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: color .18s, background .18s, border-color .18s;
}
.sidebar-nav-button svg { width: 17px; height: 17px; color: #ff4545; }
.sidebar-nav-button:hover, .sidebar-nav-button[aria-current="page"] { color: #fff0f2; background: rgba(255, 255, 255, .045); border-color: rgba(255, 64, 64, .13); }
.history-item { display: flex; align-items: center; min-width: 0; border: 1px solid transparent; border-radius: 8px; transition: background .15s, border-color .15s; }
.history-open {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 8px 7px 8px 9px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: inherit;
  text-align: left;
  cursor: pointer;
}
.history-open:hover { color: #fff1f2; }
.history-icon { margin-right: 8px; }
.history-title { flex: 1; min-width: 0; }
.history-delete {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-right: 4px;
  padding: 0;
  place-items: center;
  color: #96888c;
  background: transparent;
  border: 0;
  border-radius: 7px;
  opacity: 0;
  cursor: pointer;
  transition: opacity .15s, color .15s, background .15s;
}
.history-delete svg { width: 14px; height: 14px; }
.history-item:hover .history-delete, .history-delete:focus-visible { opacity: 1; }
.history-delete:hover { color: #ff6666; background: rgba(255, 40, 40, .12); }
.history-item.active { background: linear-gradient(100deg, rgba(150, 18, 22, .24), rgba(255, 255, 255, .025)); border-color: rgba(255, 65, 65, .12); }
.chat-view, .api-docs-view, .prices-view { width: 100%; height: 100%; min-width: 0; min-height: 0; }
.chat-view { display: flex; flex-direction: column; }
.chat-view[hidden], .api-docs-view[hidden], .prices-view[hidden] { display: none; }
.api-docs-view, .prices-view {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  padding: 42px clamp(20px, 5vw, 64px) 32px;
  overflow: auto;
  scrollbar-color: #71323b transparent;
  scrollbar-width: thin;
}
.api-docs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 900px);
  margin: 0 auto 28px;
}
.api-docs-header .eyebrow { margin-bottom: 10px; }
.api-docs-header h1 { margin: 0; color: #f5edef; font: 650 clamp(25px, 4vw, 34px)/1.2 "Manrope", sans-serif; letter-spacing: -1px; }
.api-docs-header p:not(.eyebrow) { margin: 9px 0 0; color: #b7a8ad; font-size: 12px; line-height: 1.6; }
.docs-back-button { flex: 0 0 auto; width: auto; margin: 2px 0 0; }
.docs-back-button svg { width: 16px; height: 16px; color: #ff4545; }
.api-docs-content { display: grid; gap: 12px; width: min(100%, 900px); margin: 0 auto; }
.api-doc-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 21px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)), rgba(20, 15, 18, .72);
  border: 1px solid rgba(255, 224, 231, .1);
  border-radius: 15px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .055), 0 12px 30px rgba(0, 0, 0, .14);
}
.api-step { color: #ff4545; font: 650 11px/1.5 "Manrope", sans-serif; letter-spacing: .8px; }
.api-doc-card h2 { margin: 0 0 8px; color: #f2e9eb; font: 600 15px/1.35 "Manrope", sans-serif; }
.api-doc-card p { margin: 0 0 10px; color: #b7a8ad; font-size: 11px; line-height: 1.65; }
.api-doc-card p:last-child { margin-bottom: 0; }
.api-doc-card code { color: #ff7777; font: 11px/1.6 Consolas, "Courier New", monospace; overflow-wrap: anywhere; }
.api-doc-card pre { max-width: 100%; margin: 10px 0; padding: 13px 15px; overflow: auto; color: #f0e2e6; background: rgba(8, 7, 9, .68); border: 1px solid rgba(255, 224, 231, .1); border-radius: 9px; overscroll-behavior-x: contain; }
.api-doc-card pre code { color: #e8dadd; font: 11px/1.65 Consolas, "Courier New", monospace; white-space: pre; }
.api-doc-card .api-doc-note { color: #96888c; font-size: 10px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr));
  align-content: start;
  gap: 12px;
  width: min(100%, 1000px);
  margin: 0 auto;
  padding-bottom: 12px;
}
.pricing-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)), rgba(20, 15, 18, .72);
  border: 1px solid rgba(255, 224, 231, .1);
  border-radius: 14px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .055), 0 12px 30px rgba(0, 0, 0, .14);
  animation: card-arrive .3s var(--ease) both;
}
.pricing-card h2 { margin: 0 0 15px; color: #f2e9eb; font: 600 14px/1.4 "Manrope", sans-serif; }
.pricing-field-label { margin-bottom: 5px; color: #96888c; font-size: 10px; }
.pricing-model-id { color: #ff8585; font: 11px/1.5 Consolas, "Courier New", monospace; overflow-wrap: anywhere; }
.pricing-multiplier { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; color: #b7a8ad; border-top: 1px solid rgba(255, 224, 231, .09); font-size: 10px; }
.pricing-multiplier strong { color: #ff6464; font: 700 15px/1 "Manrope", sans-serif; }
.pricing-empty { grid-column: 1 / -1; color: #b7a8ad; font-size: 12px; }
@media (max-width: 760px) {
  .history-delete { opacity: 1; }
  .api-docs-view, .prices-view { padding: 28px 20px 24px; }
  .api-docs-header { flex-direction: column; gap: 15px; margin-bottom: 20px; }
}
@media (max-width: 500px) {
  .api-docs-view, .prices-view { padding: 22px 14px 18px; }
  .api-doc-card { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 16px 13px; }
  .api-doc-card pre { padding: 11px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card { padding: 16px; }
}

.welcome { width: 100%; margin: auto 0; padding: 12px 0 44px; animation: message-in .55s var(--ease) both; }
.eyebrow { margin: 0 0 11px; color: #ff5555; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.welcome h1 { margin: 0; color: #f4ecee; font: 500 clamp(31px, 4vw, 43px)/1.2 "Manrope", sans-serif; letter-spacing: -2px; }
.welcome h1 span { color: #ff2929; background: linear-gradient(100deg, #ff5959, #ff2020 56%, #c90000); background-clip: text; -webkit-text-fill-color: transparent; }
.welcome-description { margin: 12px 0 22px; color: #bbaeb2; font-size: 13px; line-height: 1.6; }
@media (max-width: 500px) {
  .welcome { padding-top: 18px; padding-bottom: 24px; }
  .welcome h1 { font-size: 34px; }
  .welcome-description { max-width: 300px; font-size: 12px; }
}

.brand-mark { color: #ff5268; filter: none; }
.sidebar-nav-button { font-size: 14px; }
.api-docs-view, .prices-view { padding-top: 48px; }
.api-docs-header h1 { font-size: clamp(29px, 4vw, 38px); }
.api-docs-header p:not(.eyebrow) { font-size: 14px; }
.api-doc-card h2 { font-size: 17px; }
.api-doc-card p { font-size: 13px; }
.api-doc-card code, .api-doc-card pre code { font-size: 12px; }
.api-doc-card .api-doc-note { font-size: 12px; }
.pricing-card h2 { font-size: 16px; }
.pricing-field-label, .pricing-multiplier { font-size: 12px; }
.pricing-model-id { font-size: 13px; }
.pricing-empty { font-size: 14px; }
.eyebrow { font-size: 11px; }
.welcome h1 { font-size: clamp(36px, 4.5vw, 48px); }
.welcome-description { font-size: 15px; }

@media (max-width: 760px) {
  .api-docs-view, .prices-view { padding-top: 32px; }
}
@media (max-width: 500px) {
  .api-docs-view, .prices-view { padding-top: 26px; }
  .welcome h1 { font-size: 36px; }
  .welcome-description { font-size: 14px; }
}

.model-option { gap: 10px; }
.option-copy { flex: 1; }
.option-check { margin-left: 0; }
.model-multiplier {
  flex: 0 0 auto;
  margin-left: auto;
  color: #ff5968;
  font: 750 14px/1 "Manrope", sans-serif;
  white-space: nowrap;
}
.composer-area { position: relative; }
.attachment-tray { margin-bottom: 9px; }
.attachment-tray-content, .message-attachments { display: flex; flex-wrap: wrap; gap: 9px; }
.message-attachments { margin-top: 12px; }
.attachment-tile {
  position: relative;
  display: flex;
  width: min(190px, 100%);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: #f0e5e8;
  background: rgba(32, 23, 28, .9);
  border: 1px solid rgba(255, 215, 225, .13);
  border-radius: 12px;
}
.attachment-preview { min-height: 74px; overflow: hidden; background: #100d10; }
.attachment-preview > img { display: block; width: 100%; max-height: 140px; object-fit: cover; }
.video-frame-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.video-frame-grid img { display: block; width: 100%; height: 66px; object-fit: cover; }
.attachment-caption { display: grid; gap: 3px; padding: 8px 10px; }
.attachment-name { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.attachment-details { color: #ad999f; font-size: 11px; }
.attachment-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(9, 8, 11, .8);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.attachment-remove:hover { background: #b51e31; }
.drop-overlay {
  position: absolute;
  inset: 78px 28px 152px;
  z-index: 6;
  display: grid;
  place-items: center;
  color: #fff1f4;
  background: rgba(29, 12, 17, .9);
  border: 2px dashed rgba(255, 90, 110, .8);
  border-radius: 22px;
  font-size: 18px;
  font-weight: 650;
  pointer-events: none;
  backdrop-filter: blur(12px);
}
.drop-overlay[hidden] { display: none; }
.code-block { margin: 14px 0 18px; }
.code-block pre { margin: 0; border-radius: 11px 11px 0 0; }
.code-copy-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  color: #ffc1c8;
  background: rgba(255, 70, 91, .1);
  border: 1px solid rgba(255, 115, 132, .18);
  border-top: 0;
  border-radius: 0 0 9px 9px;
  font: 600 12px/1 "DM Sans", sans-serif;
  cursor: pointer;
  transition: color .16s, background .16s;
}
.code-copy-button svg { width: 15px; height: 15px; }
.code-copy-button:hover { color: #fff; background: rgba(255, 70, 91, .22); }

@media (max-width: 500px) {
  .attachment-tile { width: min(160px, 100%); }
  .drop-overlay { inset: 68px 12px 138px; padding: 12px; font-size: 16px; text-align: center; }
}
