:root {
  --bg_app: #212121;
  --bg_sidebar: #171717;
  --bg_input: #2f2f2f;
  --bg_hover: #2f2f2f;
  --bg_active: #383838;
  --bg_card: #262626;
  --bg_modal: #212121;
  --border_subtle: rgba(255, 255, 255, 0.08);
  --border_input: rgba(255, 255, 255, 0.14);
  --text_main: #ececec;
  --text_muted: #b4b4b4;
  --text_faint: #737373;
  --accent_blue: #229ed9;
  --accent_white: #ffffff;
  --accent_send: #ffffff;
  --accent_send_icon: #000000;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --ui_scale: 1.05;
  --font_base: calc(15px * var(--ui_scale));
  --radius_pill: 28px;
  --radius_btn: 10px;
  --radius_card: 16px;
  --max_content_w: 780px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg_app);
  color: var(--text_main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font_base);
  line-height: 1.5;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}
.app_container {
  display: flex;
  width: 100vw;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}
.sidebar_backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 40;
}
.sidebar_backdrop.active {
  display: block;
}
.sidebar_pane {
  width: 260px;
  height: 100%;
  background: var(--bg_sidebar);
  border-right: 1px solid var(--border_subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar_pane.collapsed {
  margin-left: -260px;
}
.sidebar_top {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.icon_action_btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius_btn);
  background: transparent;
  border: none;
  color: var(--text_muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.icon_action_btn:hover {
  background: var(--bg_hover);
  color: var(--text_main);
}
.icon_action_btn:active {
  transform: scale(0.94);
}
.sidebar_nav_list {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav_item_btn {
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius_btn);
  color: var(--text_main);
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}
.nav_item_btn:hover {
  background: var(--bg_hover);
}
.nav_item_btn.active {
  background: var(--bg_active);
}
.nav_item_btn svg {
  color: var(--text_muted);
  flex-shrink: 0;
}
.sidebar_chats_section {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px 8px;
  display: flex;
  flex-direction: column;
}
.chats_subhead {
  padding: 0 12px 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text_faint);
  letter-spacing: 0.04em;
}
.chats_feed_list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat_tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius_btn);
  color: var(--text_muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.chat_tab:hover {
  background: var(--bg_hover);
  color: var(--text_main);
}
.chat_tab.active {
  background: var(--bg_active);
  color: var(--text_main);
  font-weight: 500;
}
.chat_tab_title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.chat_tab_del {
  background: none;
  border: none;
  color: var(--text_faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.15s ease;
}
.chat_tab:hover .chat_tab_del {
  opacity: 1;
}
.chat_tab_del:hover {
  color: var(--danger);
}
.sidebar_bottom {
  padding: 10px;
  border-top: 1px solid var(--border_subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.promo_login_card {
  padding: 12px;
  background: var(--bg_card);
  border: 1px solid var(--border_subtle);
  border-radius: var(--radius_card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.promo_login_title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text_main);
}
.promo_login_desc {
  font-size: 0.78rem;
  color: var(--text_muted);
  line-height: 1.35;
}
.pill_btn_light {
  width: 100%;
  padding: 8px 14px;
  background: var(--text_main);
  color: #000;
  border: none;
  border-radius: var(--radius_pill);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s ease;
}
.pill_btn_light:hover {
  opacity: 0.9;
}
.sidebar_user_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius_btn);
  cursor: pointer;
}
.sidebar_user_row:hover {
  background: var(--bg_hover);
}
.sidebar_user_meta {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.sidebar_user_avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text_main);
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar_user_avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.sidebar_user_label {
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.main_canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background: var(--bg_app);
  overflow: hidden;
  min-width: 0;
}
.top_navbar {
  height: 60px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}
.navbar_left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.model_dropdown_btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius_btn);
  background: transparent;
  border: none;
  color: var(--text_muted);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.model_dropdown_btn:hover {
  background: var(--bg_hover);
  color: var(--text_main);
}
.navbar_right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quota_chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius_pill);
  background: var(--bg_card);
  border: 1px solid var(--border_subtle);
  color: var(--text_main);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.quota_chip:hover {
  background: var(--bg_hover);
}
.plus_badge_gold {
  display: none;
  padding: 2px 6px;
  background: var(--warning);
  color: #000;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
}
.plus_badge_gold.active {
  display: inline-block;
}
.auth_pill_dark {
  padding: 7px 14px;
  border-radius: var(--radius_pill);
  background: #ffffff;
  color: #000000;
  border: none;
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.auth_pill_dark:hover {
  opacity: 0.9;
}
.top_avatar_mini {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.top_avatar_mini img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.content_scroll_area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}
.empty_hero_state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px;
  min-height: 420px;
  animation: hero_in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes hero_in {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}
.empty_hero_title {
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text_main);
  text-align: center;
}
.suggestions_row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: var(--max_content_w);
  margin-top: 18px;
}
.suggestion_chip {
  padding: 8px 16px;
  border-radius: var(--radius_pill);
  background: transparent;
  border: 1px solid var(--border_subtle);
  color: var(--text_muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.suggestion_chip:hover {
  background: var(--bg_hover);
  color: var(--text_main);
  border-color: rgba(255, 255, 255, 0.2);
}
.chat_history_feed {
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: var(--max_content_w);
  margin: 0 auto;
  padding: 20px 16px 30px;
  gap: 20px;
}
.chat_history_feed.visible {
  display: flex;
}
.msg_wrapper {
  display: flex;
  width: 100%;
  animation: msg_slide 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes msg_slide {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.msg_wrapper.user {
  justify-content: flex-end;
}
.msg_wrapper.bot {
  justify-content: flex-start;
}
.msg_card_user {
  max-width: 75%;
  background: var(--bg_input);
  padding: 12px 18px;
  border-radius: 20px;
  color: var(--text_main);
  font-size: 0.98rem;
  line-height: 1.55;
  word-break: break-word;
}
.msg_card_bot {
  max-width: 100%;
  display: flex;
  gap: 14px;
  color: var(--text_main);
  font-size: 1rem;
  line-height: 1.6;
  word-break: break-word;
}
.bot_avatar_mini {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border_subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text_main);
  background: var(--bg_sidebar);
  flex-shrink: 0;
  margin-top: 3px;
  overflow: hidden;
}
.bot_avatar_mini img,
.bot_avatar_img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.navbar_bot {
  width: 22px;
  height: 22px;
  margin-top: 0;
  border: none;
  background: transparent;
}
.bot_body_content {
  flex: 1;
  min-width: 0;
}
.user_avatar_mini {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 3px;
  margin-left: 10px;
  border: 1px solid var(--border_subtle);
  background: var(--bg_sidebar);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text_main);
  overflow: hidden;
}
.user_avatar_mini img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.tool_badge_group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
  max-width: 100%;
}
.typing_dots_stream {
  display: inline-flex;
  gap: 4px;
  padding: 6px 0;
  align-items: center;
}
.tool_badge {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #18191c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: var(--text_main);
  transition: all 0.2s ease;
  width: fit-content;
  max-width: 100%;
}
.tool_badge.running {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.06);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.15);
  animation: tool_pulse 1.8s infinite ease-in-out;
}
@keyframes tool_pulse {
  0%, 100% { border-color: rgba(59, 130, 246, 0.3); }
  50% { border-color: rgba(59, 130, 246, 0.8); }
}
.tool_badge.done {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}
.tool_badge_left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.tool_badge_icon {
  display: flex;
  align-items: center;
  color: #60a5fa;
  flex-shrink: 0;
}
.tool_badge_name {
  font-weight: 600;
  color: var(--text_main);
  white-space: nowrap;
}
.tool_badge_param {
  color: var(--text_muted);
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.tool_badge_status {
  display: flex;
  align-items: center;
  color: #34d399;
  flex-shrink: 0;
}
.tool_spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(96, 165, 250, 0.25);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.chat_generated_image {
  max-width: 100%;
  max-height: 380px;
  border-radius: 12px;
  margin-top: 10px;
  display: block;
  border: 1px solid var(--border_subtle);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.chat_attached_thumb {
  max-width: 220px;
  max-height: 180px;
  border-radius: 10px;
  margin-bottom: 8px;
  display: block;
  border: 1px solid rgba(255,255,255,0.15);
}
.limit_exhausted_card {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.08) 0%, rgba(26, 27, 30, 0.95) 100%);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 14px;
  padding: 16px;
  max-width: 440px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px 0;
}
.limit_card_header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.limit_card_icon_wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f87171;
  flex-shrink: 0;
}
.limit_card_headings {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.limit_card_title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fca5a5;
  letter-spacing: -0.01em;
}
.limit_card_subtitle {
  font-size: 0.78rem;
  color: var(--text_muted);
}
.limit_progress_block {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.limit_progress_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.limit_label {
  color: var(--text_muted);
}
.limit_val {
  color: #f87171;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.limit_progress_track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.limit_progress_fill {
  height: 100%;
  background: linear-gradient(90deg, #f87171 0%, #ef4444 100%);
  border-radius: 3px;
}
.limit_reset_time {
  font-size: 0.78rem;
  color: var(--text_muted);
  margin-top: 2px;
}
.limit_reset_time b {
  color: var(--text_main);
}
.limit_card_actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.limit_btn_plus {
  flex: 1;
  min-width: 140px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 9px;
  padding: 8px 12px;
  color: #000;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.limit_btn_plus:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.limit_btn_reset {
  flex: 1;
  min-width: 120px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 8px 12px;
  color: var(--text_main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.limit_btn_reset:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.chat_archive_card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 10px;
  max-width: 440px;
}
.chat_archive_info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.chat_archive_icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  flex-shrink: 0;
}
.chat_archive_details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat_archive_title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text_main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat_archive_desc {
  font-size: 0.74rem;
  color: var(--text_muted);
}
.chat_archive_download_btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.chat_archive_download_btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}
.typing_row {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}
.typing_dot_anim {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text_faint);
  animation: typing_jump 1.2s infinite ease-in-out;
}
.typing_dot_anim:nth-child(1) { animation-delay: 0s; }
.typing_dot_anim:nth-child(2) { animation-delay: 0.2s; }
.typing_dot_anim:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing_jump {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
.input_section_outer {
  width: 100%;
  padding: 0 16px 14px;
  flex-shrink: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg_app) 20%);
}
.photo_preview_bar {
  display: none;
  max-width: var(--max_content_w);
  margin: 0 auto 8px;
  padding: 0 6px;
}
.photo_preview_card {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.photo_preview_thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo_remove_btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recording_indicator_bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  color: #f87171;
  font-size: 0.88rem;
  font-weight: 600;
  margin-right: 8px;
}
.rec_pulsing_dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: rec_pulse 1.2s infinite;
}
@keyframes rec_pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}
.input_box_centered {
  width: 100%;
  max-width: var(--max_content_w);
  margin: 0 auto;
  background: var(--bg_input);
  border: 1px solid var(--border_input);
  border-radius: var(--radius_pill);
  padding: 8px 12px 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input_box_centered:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.input_left_actions {
  display: flex;
  align-items: center;
}
.round_btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text_muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.round_btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text_main);
}
.round_btn.recording {
  background: var(--danger);
  color: #ffffff;
  animation: rec_pulse 1.2s infinite;
}
.main_prompt_textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text_main);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: none;
  max-height: 160px;
  padding: 6px 0;
}
.main_prompt_textarea::placeholder {
  color: var(--text_faint);
}
.input_right_actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.send_circle_btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent_send);
  border: none;
  color: var(--accent_send_icon);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.send_circle_btn:hover {
  opacity: 0.9;
  transform: scale(1.04);
}
.send_circle_btn:active {
  transform: scale(0.94);
}
.footer_disclaimer {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text_faint);
  margin-top: 8px;
}
.code_wrap {
  position: relative;
  margin: 12px 0;
  border-radius: 10px;
  background: #171717;
  border: 1px solid var(--border_subtle);
  overflow: hidden;
}
.code_wrap pre {
  padding: 14px 16px;
  overflow-x: auto;
  font-family: "JetBrains Mono", Consolas, Menlo, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e5e5e5;
}
.copy_pill_btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text_muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  transition: all 0.15s ease;
}
.copy_pill_btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.bot_text_inner {
  line-height: 1.6;
  font-size: 0.98rem;
  color: var(--text_main);
  word-break: break-word;
}
.bot_text_inner a, .msg_card_user a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
  transition: color 0.15s ease;
}
.bot_text_inner a:hover, .msg_card_user a:hover {
  color: #93c5fd;
}
.inline_code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: "JetBrains Mono", Consolas, Menlo, monospace;
  font-size: 0.88em;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
}
blockquote {
  border-left: 3px solid #3b82f6;
  padding: 6px 14px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
  color: var(--text_muted);
  font-style: normal;
}
.tg_spoiler {
  background: rgba(255, 255, 255, 0.16);
  color: transparent;
  border-radius: 5px;
  padding: 1px 6px;
  cursor: pointer;
  filter: blur(5px);
  user-select: none;
  transition: all 0.2s ease;
  display: inline-block;
}
.tg_spoiler.revealed {
  filter: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  user-select: text;
}
.modal_overlay_pane {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal_overlay_pane.active {
  display: flex;
}
.modal_sheet {
  width: 100%;
  max-width: 440px;
  background: var(--bg_modal);
  border: 1px solid var(--border_subtle);
  border-radius: var(--radius_card);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.modal_top_bar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border_subtle);
}
.modal_top_bar h2 {
  font-size: 1.1rem;
  font-weight: 600;
}
.modal_inner_body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.code_num_card {
  background: #171717;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.code_num_text {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 5px;
  color: #ffffff;
  font-family: monospace;
}
.code_num_sub {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text_muted);
}
.tg_auth_link_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--accent_blue);
  color: #fff;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
  border-radius: var(--radius_pill);
  transition: opacity 0.15s ease;
}
.tg_auth_link_btn:hover {
  opacity: 0.9;
}
.dark_text_input {
  width: 100%;
  padding: 11px 14px;
  background: #171717;
  border: 1px solid var(--border_subtle);
  border-radius: var(--radius_btn);
  color: var(--text_main);
  font-size: 0.95rem;
  outline: none;
}
.dark_text_input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}
.settings_dialog_box {
  width: 100%;
  max-width: 600px;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}
.settings_header_row {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border_subtle);
}
.settings_header_row h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}
.settings_tabs_bar {
  display: flex;
  gap: 4px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border_subtle);
  background: #141414;
  overflow-x: auto;
}
.settings_tab_btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text_muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.settings_tab_btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.settings_tab_btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.settings_body_content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}
.settings_section_pane {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.settings_section_pane.active {
  display: flex;
}
.setting_card_block {
  padding: 14px 16px;
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.setting_card_info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.setting_card_title {
  font-size: 0.94rem;
  font-weight: 600;
  color: #fff;
}
.setting_card_desc {
  font-size: 0.8rem;
  color: var(--text_muted);
}
.segmented_ctrl {
  display: flex;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 2px;
}
.segment_btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text_muted);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.segment_btn.active {
  background: #333333;
  color: #ffffff;
  font-weight: 600;
}
.toggle_switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #383838;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.toggle_switch.on {
  background: var(--success);
}
.toggle_thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s ease;
}
.toggle_switch.on .toggle_thumb {
  transform: translateX(20px);
}
.quota_progress_block {
  padding: 14px 16px;
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quota_progress_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}
.quota_progress_title {
  font-weight: 600;
  color: #fff;
}
.quota_progress_val {
  color: var(--text_muted);
  font-size: 0.82rem;
}
.progress_track {
  width: 100%;
  height: 7px;
  background: #141414;
  border-radius: 4px;
  overflow: hidden;
}
.progress_bar_fill {
  height: 100%;
  background: linear-gradient(90deg, #229ed9, #6366f1);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.plus_showcase_card {
  padding: 18px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.03));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plus_badge_pill {
  align-self: flex-start;
  padding: 3px 10px;
  background: var(--warning);
  color: #000;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 12px;
  text-transform: uppercase;
}
.plus_card_title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.plus_perks_list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--text_muted);
}
.plus_perk_item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plus_perk_item svg {
  color: var(--success);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .sidebar_pane {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
  }
  .sidebar_pane.mobile_open {
    transform: translateX(0);
  }
  .empty_hero_title {
    font-size: 1.6rem;
  }
  .settings_dialog_box {
    width: 96%;
    max-height: 90vh;
  }
}
