@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&display=swap');@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');:root {
  --text: #6b6375;
  --text-h: #08060d;
  --bg: #fff;
  --border: #e5e4e7;
  --code-bg: #f4f3ec;
  --accent: #aa3bff;
  --accent-bg: rgba(170, 59, 255, 0.1);
  --accent-border: rgba(170, 59, 255, 0.5);
  --social-bg: rgba(244, 243, 236, 0.5);
  --shadow:
    rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

  --sans: system-ui, 'Segoe UI', Roboto, sans-serif;
  --heading: system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;

  font: 18px/145% var(--sans);
  letter-spacing: 0.18px;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  @media (max-width: 1024px) {
    font-size: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #9ca3af;
    --text-h: #f3f4f6;
    --bg: #16171d;
    --border: #2e303a;
    --code-bg: #1f2028;
    --accent: #c084fc;
    --accent-bg: rgba(192, 132, 252, 0.15);
    --accent-border: rgba(192, 132, 252, 0.5);
    --social-bg: rgba(47, 48, 58, 0.5);
    --shadow:
      rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
  }

  #social .button-icon {
    filter: invert(1) brightness(2);
  }
}

body {
  margin: 0;
}

#root {
  width: 1126px;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  border-inline: 1px solid var(--border);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

h1,
h2 {
  font-family: var(--heading);
  font-weight: 500;
  color: var(--text-h);
}

h1 {
  font-size: 56px;
  letter-spacing: -1.68px;
  margin: 32px 0;
  @media (max-width: 1024px) {
    font-size: 36px;
    margin: 20px 0;
  }
}
h2 {
  font-size: 24px;
  line-height: 118%;
  letter-spacing: -0.24px;
  margin: 0 0 8px;
  @media (max-width: 1024px) {
    font-size: 20px;
  }
}
p {
  margin: 0;
}

code,
.counter {
  font-family: var(--mono);
  display: inline-flex;
  border-radius: 4px;
  color: var(--text-h);
}

code {
  font-size: 15px;
  line-height: 135%;
  padding: 4px 8px;
  background: var(--code-bg);
}
@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.45"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
.voice-chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: fadeIn 0.3s ease;
}

.voice-chat-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  height: 80vh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.voice-chat-header {
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.voice-chat-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.voice-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.voice-settings-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.voice-settings-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.voice-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.voice-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.voice-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.voice-chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.welcome-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.voice-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideUp 0.3s ease;
}

.voice-message.assistant {
  flex-direction: row-reverse;
}

.voice-message-avatar {
  font-size: 24px;
  min-width: 32px;
}

.voice-message-text {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.4;
  font-size: 14px;
  word-wrap: break-word;
}

.voice-message.assistant .voice-message-text {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.voice-message-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.voice-loading-dots {
  display: flex;
  gap: 6px;
}

.voice-loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: pulse 1.4s infinite;
}

.voice-loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.voice-loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.voice-chat-input {
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  gap: 8px;
}

.voice-chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transition: all 0.2s ease;
}

.voice-chat-input input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.voice-chat-input input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.voice-button,
.voice-send-btn {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.voice-button:hover:not(:disabled),
.voice-send-btn:hover:not(:disabled) {
  background: white;
  transform: scale(1.05);
}

.voice-button:disabled,
.voice-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voice-button.listening {
  background: #ff4444;
  color: white;
  animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 68, 68, 0.2);
  }
}

.voice-speaking-indicator {
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.2);
  color: #ff6b6b;
  font-size: 12px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

/* Voice Settings Panel */
.voice-settings-panel {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  max-height: 200px;
  overflow-y: auto;
  animation: slideDown 0.3s ease;
}

.settings-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-label {
  color: white;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.voice-select {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-select:hover {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.voice-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.settings-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.settings-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.settings-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.settings-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-style: italic;
}

/* Personality Buttons */
.personality-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.personality-btn {
  padding: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.personality-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.personality-btn.active {
  background: rgba(255, 255, 255, 0.4);
  border-color: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Checkbox Styling */
.settings-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.settings-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4ade80;
}

.settings-checkbox input[type="checkbox"]:hover {
  accent-color: #22c55e;
}

.voice-test-btn {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.voice-test-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.02);
}

.voice-test-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .voice-chat-container {
    width: 95%;
    height: 90vh;
    max-height: none;
  }

  .voice-message-text {
    max-width: 90%;
  }

  .personality-buttons {
    grid-template-columns: repeat(3, 1fr);
  }

  .settings-slider {
    width: 100%;
  }

  .voice-settings-panel {
    max-height: 400px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* API Marketplace - Modern, Mobile-First Responsive Design */

:root {
  --primary: #ea580c;
  --primary-600: #f97316;
  --accent-dark: #60320b;
  --bg: #fffaf6;
  --text: #3b2b1b;
  --muted: #8a6b4a;
  --border: rgba(34, 30, 24, 0.06);
  --shadow-sm: 0 6px 18px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 12px 30px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, #fffaf6, #fff7f0);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.api-marketplace {
  min-height: 100vh;
  width: 100%;
}

/* ===== NAVIGATION ===== */
.api-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(8px);
  width: 100%;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-shrink: 0;
}

.logo h1 {
  font-size: 1.3rem;
  margin: 0;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--primary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.tagline {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
}

.api-nav-menu {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.api-nav-btn {
  background: linear-gradient(180deg, #fff, #fffaf6);
  border: 1px solid var(--border);
  color: var(--accent-dark);
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.api-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.api-nav-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff;
  border-color: transparent;
}

.api-nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent-dark);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nav-toggle:hover {
  transform: scale(1.03);
  border-color: var(--primary);
}

.btn-get-started {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.14);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-get-started:hover {
  transform: translateY(-3px);
  filter: brightness(1.03);
  box-shadow: 0 28px 60px rgba(234, 88, 12, 0.18);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-logout:hover {
  transform: translateY(-2px);
  background: rgba(234, 88, 12, 0.06);
  color: var(--primary);
}

/* ===== CONTENT ===== */
.content-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

/* ===== DOCUMENTATION ===== */
.docs-page {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: fit-content;
}

.doc-tab {
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-align: left;
  font-weight: 600;
  color: var(--accent-dark);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-tab:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.doc-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff;
  border-color: transparent;
}

.docs-content {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 12px;
  overflow-wrap: break-word;
}

.docs-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.docs-content h4 {
  color: var(--primary);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.docs-content pre {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 1rem 0;
  font-size: 0.9rem;
  word-break: break-all;
  white-space: pre-wrap;
}

.doc-highlight {
  background: rgba(250, 240, 230, 0.8);
  border-radius: 10px;
  padding: 0.9rem;
  border: 1px solid rgba(234, 88, 12, 0.08);
  margin: 0.75rem 0;
}

.code-lang-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.75rem;
}

.code-lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-lang-btn:hover {
  background: rgba(234, 88, 12, 0.06);
  border-color: var(--primary);
}

.code-lang-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff;
  border-color: transparent;
}

.code-block-wrapper {
  background: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block-header {
  background: #2d2d2d;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.code-lang-label {
  font-size: 0.85rem;
  color: #888;
  font-weight: 600;
}

.code-copy-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.code-copy-btn:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
}

.code-block-content {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.2rem;
  margin: 0;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  font-family: 'Monaco', 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Responsive code blocks */
@media (max-width: 768px) {
  .code-lang-tabs {
    gap: 0.4rem;
    margin: 1rem 0;
    padding-bottom: 0.5rem;
  }

  .code-lang-btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
  }

  .code-block-wrapper {
    margin: 0.75rem 0;
  }

  .code-block-header {
    padding: 0.6rem 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .code-copy-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .code-block-content {
    padding: 0.8rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .code-lang-tabs {
    gap: 0.3rem;
    padding-bottom: 0.4rem;
  }

  .code-lang-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    flex: 1;
    min-width: 80px;
  }

  .code-block-header {
    padding: 0.5rem 0.6rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .code-copy-btn {
    width: 100%;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  .code-block-content {
    padding: 0.6rem;
    font-size: 0.65rem;
  }
}

/* Existing code-block styling for non-examples */

/* ===== PRICING PAGE ===== */
.pricing-page {
  width: 100%;
}

.pricing-page > h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-page > p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.2);
}

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.02), rgba(249, 115, 22, 0.02));
  box-shadow: 0 16px 48px rgba(234, 88, 12, 0.15);
  transform: scale(1.02);
}

.pricing-card.featured:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 28px 72px rgba(234, 88, 12, 0.2);
}

.badge {
  position: absolute;
  top: -12px;
  left: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.15);
}

.pricing-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.price span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.pricing-card > ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing-card > ul > li {
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
}

.pricing-card > ul > li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.btn-pricing {
  background: rgba(234, 88, 12, 0.08);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.22s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}

.btn-pricing:hover {
  background: rgba(234, 88, 12, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.12);
}

.btn-pricing.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: white;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.18);
}

.btn-pricing.primary:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary));
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(234, 88, 12, 0.22);
}

.pricing-details {
  margin-top: 1rem;
}

.pricing-details > h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.pricing-details > p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.pricing-details .pricing-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.pricing-details .pricing-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: #fff;
  margin-top: 0.5rem;
}

.pricing-details .pricing-table th {
  background: #f9f9f9;
  padding: 1rem 1.2rem;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 2px solid var(--border);
}

.pricing-details .pricing-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.pricing-details .pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.pricing-details .pricing-table strong {
  color: var(--text);
  font-weight: 700;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
  .nav-container {
    gap: 0.75rem;
    padding: 0.6rem 1rem;
  }

  .api-nav-menu {
    gap: 0.4rem;
  }

  .docs-page {
    gap: 1rem;
    grid-template-columns: minmax(160px, 220px) 1fr;
  }

  .doc-tab {
    padding: 0.65rem 0.8rem;
  }

  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .pricing-card.featured {
    transform: scale(1.01);
  }

  .pricing-card.featured:hover {
    transform: translateY(-8px) scale(1.01);
  }

  .pricing-page > h2 {
    font-size: 1.8rem;
  }

  .pricing-page > p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    padding: 0.6rem 0.8rem;
    gap: 0.6rem;
  }

  .logo {
    flex: 0 0 auto;
  }

  .logo h1 {
    font-size: 1.1rem;
  }

  .tagline {
    font-size: 0.6rem;
  }

  .nav-toggle {
    display: inline-flex;
    order: 2;
    margin-left: auto;
  }

  .nav-container {
    position: relative;
  }

  .api-nav-menu {
    order: 3;
    display: none;
    width: calc(100% - 2rem);
    gap: 0.5rem;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 24px 64px rgba(16, 24, 40, 0.14);
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 1rem;
    right: 1rem;
    z-index: 110;
  }

  .api-nav-menu.open {
    display: flex;
  }

  .api-nav-menu.collapsed {
    display: none;
  }

  .api-nav-menu .api-nav-btn {
    width: 100%;
    justify-content: flex-start;
    padding-left: 1rem;
  }

  .api-nav-actions {
    gap: 0.4rem;
    order: 4;
    width: 100%;
    justify-content: center;
  }

  .docs-page {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(100px, 1fr);
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .doc-tab {
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
    min-height: 36px;
  }

  .content-container {
    padding: 1.5rem 1rem;
  }

  .docs-content {
    padding: 1.2rem;
  }

  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
  }

  .pricing-card {
    padding: 1.6rem;
    gap: 1rem;
  }

  .pricing-card.featured {
    transform: scale(1);
  }

  .pricing-card.featured:hover {
    transform: translateY(-6px);
  }

  .pricing-page > h2 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
  }

  .pricing-page > p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  .badge {
    left: 1.6rem;
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
  }

  .pricing-card h3 {
    font-size: 1.3rem;
  }

  .price {
    font-size: 2.2rem;
  }

  .btn-pricing {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    min-height: 40px;
  }

  .pricing-details > table th,
  .pricing-details > table td {
    padding: 0.9rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.5rem 0.6rem;
  }

  .logo h1 {
    font-size: 0.95rem;
  }

  .tagline {
    font-size: 0.55rem;
  }

  .api-nav-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    min-height: 32px;
  }

  .btn-get-started {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-width: 120px;
  }

  .btn-logout {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    min-height: 32px;
  }

  .api-nav-menu {
    gap: 0.3rem;
  }

  .api-nav-actions {
    gap: 0.3rem;
  }

  .content-container {
    padding: 1rem 0.75rem;
  }

  .docs-sidebar {
    gap: 0.4rem;
    grid-auto-columns: minmax(80px, 1fr);
  }

  .doc-tab {
    padding: 0.5rem 0.6rem;
    font-size: 0.7rem;
    min-height: 32px;
  }

  .docs-content {
    padding: 1rem 0.8rem;
  }

  .docs-content h3 {
    font-size: 1.1rem;
  }

  .docs-content h4 {
    font-size: 0.95rem;
  }

  .docs-content pre {
    padding: 0.6rem;
    font-size: 0.65rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pricing-card {
    padding: 1.4rem;
    gap: 0.9rem;
  }

  .badge {
    top: -10px;
    left: 1.4rem;
    font-size: 0.65rem;
    padding: 0.25rem 0.7rem;
  }

  .pricing-page > h2 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
  }

  .pricing-page > p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .pricing-card h3 {
    font-size: 1.1rem;
  }

  .price {
    font-size: 1.8rem;
  }

  .price span {
    font-size: 0.85rem;
  }

  .pricing-card > ul > li {
    font-size: 0.85rem;
  }

  .btn-pricing {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    min-height: 38px;
  }

  .pricing-details > h3 {
    font-size: 1.2rem;
  }

  .pricing-details .pricing-table {
    font-size: 0.85rem;
  }

  .pricing-details .pricing-table th,
  .pricing-details .pricing-table td {
    padding: 0.7rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 320px) {
  .logo h1 {
    font-size: 0.85rem;
  }

  .api-nav-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
  }

  .btn-get-started {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    min-width: 100px;
  }

  .pricing-card {
    padding: 1.2rem;
  }

  .pricing-page > h2 {
    font-size: 1.15rem;
  }

  .pricing-page > p {
    font-size: 0.85rem;
  }

  .badge {
    font-size: 0.6rem;
  }

  .price {
    font-size: 1.5rem;
  }

  .btn-pricing {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
}

/* ===== LANDING PAGE ===== */
.landing-page {
  width: 100%;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  text-align: center;
  padding: 4rem 1.5rem;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.04) 0%, rgba(249, 115, 22, 0.02) 100%);
  border-radius: 20px;
  margin-bottom: 3rem;
  border: 1px solid rgba(234, 88, 12, 0.08);
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.3rem;
  color: var(--muted);
  margin-bottom: 1.8rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero .btn-get-started {
  animation: scaleIn 0.6s ease-out 0.2s both;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  animation: fadeIn 0.6s ease-out 0.3s both;
}

.feature-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 246, 0.95) 100%);
  border: 1px solid rgba(234, 88, 12, 0.08);
  border-radius: 16px;
  padding: 2.2rem 1.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.16);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.feature-card h3::before {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(234, 88, 12, 0.2));
}

.feature-card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

/* ===== DASHBOARD PAGE ===== */
.dashboard-page {
  width: 100%;
  animation: fadeIn 0.5s ease-out;
}

.dashboard-hero {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.06) 0%, rgba(249, 115, 22, 0.03) 100%);
  border: 1px solid rgba(234, 88, 12, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.dashboard-hero-copy h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-hero-copy .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.6rem;
}

.dashboard-hero-copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 500px;
}

.dashboard-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(234, 88, 12, 0.22);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(234, 88, 12, 0.08);
  color: var(--primary);
  border: 1px solid rgba(234, 88, 12, 0.2);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.3);
  transform: translateY(-2px);
}

.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error Message */
.error-message {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #991b1b;
  padding: 0.95rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dashboard Metrics Grid */
.dashboard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: linear-gradient(135deg, #fff 0%, #fffaf6 100%);
  border: 1px solid rgba(234, 88, 12, 0.08);
  border-radius: 14px;
  padding: 1.8rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.metric-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.16);
}

.metric-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
}

.metric-card .metric-value {
  font-size: 2.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #ff9844);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.6rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.metric-card .metric-label {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* Dashboard Main Grid */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.dashboard-section {
  background: linear-gradient(135deg, #fff 0%, #fffaf6 100%);
  border: 1px solid rgba(234, 88, 12, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
  transition: all 0.3s ease;
}

.dashboard-section:hover {
  box-shadow: 0 12px 36px rgba(234, 88, 12, 0.1);
}

.dashboard-panel {
  padding: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.section-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.5rem 0 0 0;
}

/* API Keys Table */
.api-keys-table {
  overflow-x: auto;
}

.api-keys-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.api-keys-table thead {
  background: linear-gradient(90deg, #fff5f0, #fffaf6);
  border-bottom: 2px solid rgba(234, 88, 12, 0.1);
}

.api-keys-table th {
  padding: 0.9rem 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.api-keys-table td {
  padding: 1.1rem;
  border-bottom: 1px solid rgba(234, 88, 12, 0.06);
  color: var(--text);
  font-weight: 500;
}

.api-keys-table tbody tr {
  transition: background 0.2s ease;
}

.api-keys-table tbody tr:hover {
  background: rgba(234, 88, 12, 0.02);
}

.api-keys-table tbody tr:last-child td {
  border-bottom: none;
}

.api-keys-table .key-name {
  font-weight: 700;
  color: var(--primary);
}

.api-keys-table .key-value {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-keys-table .status-badge {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.api-keys-table .status-badge.active {
  background: rgba(74, 222, 128, 0.12);
  color: #16a34a;
}

.api-keys-table .status-badge.inactive {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

.api-keys-table .action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.api-keys-table button {
  background: transparent;
  border: 1px solid rgba(234, 88, 12, 0.2);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.api-keys-table button:hover {
  background: rgba(234, 88, 12, 0.08);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Empty State */
.empty-state-card {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.02) 0%, rgba(249, 115, 22, 0.01) 100%);
  border: 2px dashed rgba(234, 88, 12, 0.1);
  border-radius: 12px;
}

.empty-state-card h4 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.empty-state-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== RESPONSIVE - LANDING & DASHBOARD ===== */

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.6rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .features {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.8rem 1.5rem;
  }

  .dashboard-hero {
    flex-direction: column;
    padding: 2rem;
  }

  .dashboard-hero-actions {
    justify-content: flex-start;
  }

  .dashboard-metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 2.5rem 1rem;
    margin-bottom: 2rem;
  }

  .hero h1 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.3rem;
  }

  .features {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
  }

  .feature-card {
    padding: 1.6rem 1.2rem;
  }

  .feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
  }

  .feature-card p {
    font-size: 0.9rem;
  }

  .dashboard-hero {
    padding: 1.5rem;
    gap: 1rem;
  }

  .dashboard-hero-copy h2 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
  }

  .dashboard-hero-copy .eyebrow {
    font-size: 0.8rem;
  }

  .dashboard-hero-copy p {
    font-size: 0.9rem;
    max-width: none;
  }

  .dashboard-hero-actions {
    width: 100%;
    gap: 0.8rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.65rem 1.2rem;
    font-size: 0.85rem;
    flex: 1;
    min-width: 140px;
  }

  .dashboard-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .metric-card {
    padding: 1.4rem;
  }

  .metric-card h4 {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
  }

  .metric-card .metric-value {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
  }

  .metric-card .metric-label {
    font-size: 0.8rem;
  }

  .dashboard-panel {
    padding: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    gap: 1rem;
  }

  .section-header h3 {
    font-size: 1.3rem;
  }

  .section-header .btn-primary {
    width: 100%;
    flex: 1;
  }

  .api-keys-table th {
    padding: 0.7rem 0.8rem;
    font-size: 0.75rem;
  }

  .api-keys-table td {
    padding: 0.8rem;
    font-size: 0.85rem;
  }

  .api-keys-table .action-buttons {
    gap: 0.3rem;
  }

  .api-keys-table button {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .content-container {
    padding: 1.2rem 0.8rem;
  }

  .hero {
    padding: 2rem 0.8rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }

  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    letter-spacing: -0.5px;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .feature-card {
    padding: 1.3rem;
    border-radius: 12px;
  }

  .feature-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .feature-card p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .dashboard-hero {
    padding: 1.2rem;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }

  .dashboard-hero-copy h2 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
  }

  .dashboard-hero-copy .eyebrow {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
  }

  .dashboard-hero-copy p {
    font-size: 0.85rem;
  }

  .dashboard-hero-actions {
    width: 100%;
    gap: 0.6rem;
  }

  .btn-primary,
  .btn-secondary {
    flex: 1;
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    min-width: auto;
  }

  .dashboard-metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
  }

  .metric-card {
    padding: 1.2rem;
    border-radius: 12px;
  }

  .metric-card h4 {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .metric-card .metric-value {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
  }

  .metric-card .metric-label {
    font-size: 0.75rem;
  }

  .dashboard-panel {
    padding: 1.2rem;
    border-radius: 12px;
  }

  .section-header {
    gap: 0.8rem;
  }

  .section-header h3 {
    font-size: 1.1rem;
  }

  .section-header .btn-primary {
    width: 100%;
  }

  .api-keys-table th {
    padding: 0.6rem;
    font-size: 0.65rem;
  }

  .api-keys-table td {
    padding: 0.6rem;
    font-size: 0.75rem;
  }

  .api-keys-table .key-value {
    max-width: 100px;
    font-size: 0.75rem;
  }

  .api-keys-table .status-badge {
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
  }

  .api-keys-table button {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
  }

  .empty-state-card {
    padding: 2rem 1rem;
    margin: 1rem 0;
  }

  .empty-state-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .empty-state-card p {
    font-size: 0.85rem;
  }
}

/* Utility */
.muted {
  color: var(--muted);
}
/* Chart Generator Styles */

.chart-container {
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
  border: 2px solid #000;
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.6s ease-out;
}

/* Chart Header */
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.chart-title {
  text-align: center;
  color: #333;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  flex: 1;
  min-width: 0;
}

.chart-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Button Explanation */
.btn-explanation {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8A8A 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
  white-space: nowrap;
}

.btn-explanation:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
  background: linear-gradient(135deg, #FF5252 0%, #FF7A7A 100%);
}

.btn-explanation:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

/* Modal Content */
.modal-content {
  background: white;
  border: 2px solid #000;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 2px solid #F0F0F0;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
  border-radius: 14px 14px 0 0;
}

.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #F0F0F0;
  color: #333;
}

/* Modal Body */
.modal-body {
  padding: 24px;
}

.explanation-content {
  line-height: 1.8;
  color: #333;
  font-size: 14px;
}

.explanation-content p {
  margin: 0 0 12px 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  animation: slideUp 0.5s ease-out;
}

.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #FF6B6B;
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 12px;
  animation: bounce 0.6s ease-out;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.stat-detail {
  font-size: 12px;
  color: #666;
}

/* Stat Card Color Variants */
.stat-highest .stat-icon {
  color: #FFB700;
}

.stat-highest .stat-value {
  color: #FF6B6B;
}

.stat-lowest .stat-icon {
  color: #4ECDC4;
}

.stat-lowest .stat-value {
  color: #4ECDC4;
}

.stat-total .stat-icon {
  color: #45B7D1;
}

.stat-total .stat-value {
  color: #45B7D1;
}

.stat-average .stat-icon {
  color: #98D8C8;
}

.stat-average .stat-value {
  color: #98D8C8;
}

/* Responsive */
@media (max-width: 768px) {
  .chart-header {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-title {
    text-align: center;
    order: 1;
  }

  .btn-explanation {
    order: 2;
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-width: 90%;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
  }

/* Legend List Styles */
.legend-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
}

.legend-item:hover {
  background: #f0f0f0;
  border-color: #ccc;
  transform: translateX(4px);
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.legend-name {
  font-weight: 600;
  color: #333;
  flex: 1;
  font-size: 14px;
}

.legend-value {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  color: #FF6B6B;
  font-size: 13px;
  border: 1px solid #FFB3B3;
}

/* Pie Chart specific */
.chart-container .recharts-wrapper {
  animation: fadeIn 0.8s ease-out;
}

/* Infographic Styles */
.infographic-container {
  width: 100%;
  background: white;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.6s ease-out;
}

.infographic-title {
  text-align: center;
  color: #333;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 24px 0;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  padding-bottom: 16px;
  border-bottom: 3px solid #000;
}

.infographic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  width: 100%;
}

.infographic-card {
  background: white;
  border-left: 5px solid #FF6B6B;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: slideUp 0.6s ease-out;
}

.infographic-card:nth-child(1) {
  animation-delay: 0.1s;
}

.infographic-card:nth-child(2) {
  animation-delay: 0.2s;
}

.infographic-card:nth-child(3) {
  animation-delay: 0.3s;
}

.infographic-card:nth-child(4) {
  animation-delay: 0.4s;
}

.infographic-card:nth-child(5) {
  animation-delay: 0.5s;
}

.infographic-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.infographic-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: inline-block;
  animation: bounce 0.6s ease-out;
}

.infographic-label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.infographic-value {
  font-size: 24px;
  font-weight: 700;
  color: #FF6B6B;
  margin-bottom: 8px;
}

.infographic-description {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
  margin-top: 8px;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Recharts tooltip override */
.recharts-default-tooltip {
  background: white !important;
  border: 2px solid #000 !important;
  border-radius: 8px !important;
}

/* Recharts legend */
.recharts-legend-wrapper {
  padding-top: 20px;
}

.recharts-legend-item {
  color: #333 !important;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .chart-container {
    padding: 16px;
  }

  .infographic-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
  }

  .chart-title {
    font-size: 14px;
  }

  .infographic-title {
    font-size: 16px;
  }

  .infographic-value {
    font-size: 18px;
  }

  .infographic-icon {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .infographic-grid {
    grid-template-columns: 1fr;
  }

  .chart-container {
    padding: 12px;
    margin: 8px 0;
  }
}
.stepper-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-radius: 12px;
  border-left: 3px solid #6366f1;
  margin: 16px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.stepper-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: stepFadeIn 0.4s ease-out;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  margin-top: 2px;
}

.step-icon {
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: bold;
  transition: all 0.3s ease;
}

.step-icon.step-complete {
  color: #10b981;
  font-size: 16px;
}

.step-icon.step-active {
  color: #3b82f6;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.step-icon.step-pending {
  color: #d1d5db;
}

.step-icon.step-error {
  color: #ef4444;
}

.step-content {
  flex: 1;
  padding-top: 2px;
}

.step-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.step-content .step-name {
  color: #111827;
}

.step-detail {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
  margin-top: 2px;
  word-break: break-word;
}

/* Status-specific styling */
.stepper-step.step-complete .step-name {
  color: #059669;
}

.stepper-step.step-complete .step-detail {
  color: #10b981;
  opacity: 0.9;
}

.stepper-step.step-active .step-name {
  color: #1d4ed8;
  font-weight: 700;
}

.stepper-step.step-active .step-detail {
  color: #3b82f6;
  opacity: 1;
}

.stepper-step.step-pending .step-name {
  color: #9ca3af;
}

.stepper-step.step-pending .step-detail {
  color: #d1d5db;
}

.stepper-step.step-error .step-name {
  color: #dc2626;
  font-weight: 700;
}

.stepper-step.step-error .step-detail {
  color: #ef4444;
  font-weight: 500;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .stepper-container {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-left-color: #818cf8;
  }

  .step-name {
    color: #f3f4f6;
  }

  .step-detail {
    color: #d1d5db;
  }

  .stepper-step.step-complete .step-name {
    color: #6ee7b7;
  }

  .stepper-step.step-complete .step-detail {
    color: #a7f3d0;
  }

  .stepper-step.step-active .step-name {
    color: #93c5fd;
  }

  .stepper-step.step-active .step-detail {
    color: #bfdbfe;
  }

  .stepper-step.step-pending .step-name {
    color: #9ca3af;
  }

  .stepper-step.step-error .step-name {
    color: #fca5a5;
  }

  .stepper-step.step-error .step-detail {
    color: #f87171;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .stepper-container {
    padding: 12px;
    gap: 10px;
    margin: 12px 0;
  }

  .stepper-step {
    gap: 10px;
  }

  .step-name {
    font-size: 13px;
  }

  .step-detail {
    font-size: 12px;
  }
}
/* ExecutionFlow Component Styles */
/* Modern thinking bubble with expandable details */

.execution-flow-container {
  width: 100%;
  margin: 12px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* ========== THINKING BUBBLE - Header ========== */
.thinking-bubble {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.thinking-bubble:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.thinking-bubble.expanded {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.thinking-bubble.complete {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
}

.thinking-bubble.complete:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

/* Bubble Header Layout */
.bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bubble-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.bubble-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.bubble-icon.thinking {
  animation: bubble-bounce 1.5s ease-in-out infinite;
}

.bubble-icon.complete {
  background: rgba(16, 185, 129, 0.2);
  color: rgb(16, 185, 129);
}

@keyframes bubble-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.bubble-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bubble-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bubble-subtitle {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.bubble-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Progress Ring */
.progress-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring circle {
  transition: stroke-dashoffset 0.3s ease;
}

/* Toggle Icon */
.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: bold;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-icon.rotated {
  transform: rotate(180deg);
}

/* Progress Bar - Visible in collapsed view */
.progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 1px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgb(59, 130, 246), rgb(99, 102, 241));
  border-radius: 1px;
  transition: width 0.3s ease;
}

/* ========== EXPANDED DETAILS ========== */
.thinking-details {
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.details-content {
  padding: 16px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Scrollbar styling */
.details-content::-webkit-scrollbar {
  width: 6px;
}

.details-content::-webkit-scrollbar-track {
  background: transparent;
}

.details-content::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.2);
  border-radius: 3px;
}

.details-content::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.3);
}

/* Steps List */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Execution Step */
.execution-step {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
  animation: stepFadeIn 0.3s ease-out;
  position: relative;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.execution-step.step-complete {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.execution-step.step-active {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.1);
}

.execution-step.step-error {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

/* Step Icon */
.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.execution-step.step-complete .step-icon {
  background: rgba(16, 185, 129, 0.2);
  color: rgb(16, 185, 129);
}

.execution-step.step-active .step-icon {
  background: rgba(59, 130, 246, 0.2);
  color: rgb(59, 130, 246);
}

.execution-step.step-error .step-icon {
  background: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
}

/* Spinning animation for active steps */
.step-icon .icon-symbol.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Step Details */
.step-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-emoji {
  font-size: 14px;
}

.step-message {
  font-size: 12px;
  color: #6b7280;
  word-break: break-word;
  line-height: 1.4;
}

.step-detail {
  font-size: 11px;
  color: #9ca3af;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  background: rgba(0, 0, 0, 0.02);
  padding: 4px 8px;
  border-radius: 4px;
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-time {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

/* Step Connector Line */
.step-connector {
  position: absolute;
  left: 12px + 12px; /* icon width + gap */
  top: 56px; /* height of current step */
  width: 1px;
  height: 12px;
  background: rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.execution-step.step-complete ~ .execution-step .step-connector {
  background: rgba(16, 185, 129, 0.1);
}

/* Empty State */
.steps-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: #9ca3af;
}

.empty-spinner {
  font-size: 24px;
  animation: spin 1s linear infinite;
}

.empty-text {
  font-size: 13px;
  font-weight: 500;
}

/* Details Footer */
.details-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  background: rgba(59, 130, 246, 0.02);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.footer-summary {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .thinking-bubble {
    padding: 10px 12px;
  }

  .bubble-header {
    gap: 8px;
  }

  .bubble-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .bubble-title {
    font-size: 13px;
  }

  .bubble-subtitle {
    font-size: 11px;
  }

  .toggle-icon {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .execution-step {
    padding: 10px;
    gap: 10px;
  }

  .step-details {
    gap: 3px;
  }

  .step-name {
    font-size: 12px;
  }

  .step-message {
    font-size: 11px;
  }

  .step-detail {
    font-size: 10px;
    padding: 3px 6px;
  }

  .details-content {
    max-height: 40vh;
  }
}



/* App layout with sidebar */
.chatbot-app {
  display: flex;
  height: 100vh;
  background: linear-gradient(180deg, #fffaf6 0%, #fff7f0 100%);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  position: relative;
  color: #3b2f2f;
}
/* Sidebar overlay backdrop for mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* Custom Alert Notification */
.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 3000;
  animation: slideInRight 0.4s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-alert.dismissing {
  opacity: 0;
  transform: translateX(500px);
  pointer-events: none;
}
.custom-alert.alert-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.custom-alert.alert-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.custom-alert.alert-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.custom-alert.alert-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.alert-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.alert-message {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}
.alert-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  opacity: 0.8;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.alert-close:hover {
  opacity: 1;
}
@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(500px);
    opacity: 0;
  }
}
/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}
.modal-content {
  background: linear-gradient(180deg, #fffaf6 0%, #fff7f0 100%);
  border-radius: 12px;
  border: 1px solid #ffe4d6;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: slideUp 0.3s ease;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid rgba(234, 88, 12, 0.2);
  font-size: 24px;
  color: #92400e;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  z-index: 2001;
}
.modal-close:hover {
  color: #ea580c;
  background: rgba(234, 88, 12, 0.15);
  border-color: #ea580c;
}
/* Delete Confirmation Modal */
.delete-confirm-modal {
  max-width: 400px;
}
.delete-confirm-header {
  padding: 24px;
  text-align: center;
}
.delete-confirm-header h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: #dc2626;
  font-weight: 600;
}
.delete-confirm-header p {
  margin: 0;
  color: #7c4f20;
  font-size: 14px;
  line-height: 1.5;
}
.delete-confirm-actions {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #ffe4d6;
}
.btn-cancel,
.btn-delete {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-cancel {
  background: rgba(107, 114, 128, 0.1);
  color: #4b5563;
  border: 1px solid rgba(107, 114, 128, 0.3);
}
.btn-cancel:hover {
  background: rgba(107, 114, 128, 0.2);
  border-color: rgba(107, 114, 128, 0.5);
}
.btn-delete {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.btn-delete:hover {
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
  transform: translateY(-1px);
}
.btn-delete:active {
  transform: translateY(0);
}
.modal-header {
  padding: 24px 24px 12px;
  border-bottom: 2px solid #ffe4d6;
}
.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #ea580c;
  text-shadow: 0 1px 2px rgba(234, 88, 12, 0.1);
}
.account-info {
  margin-top: 12px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  border-top: 1px solid #ffe4d6;
}
.account-label {
  color: #ea580c;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.account-name {
  color: #7c2d12;
  background: linear-gradient(135deg, #fed7aa 0%, #fef3c7 100%);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
  flex: 1;
  word-break: break-all;
}
.modal-body {
  padding: 24px;
}
.modal-body p {
  margin: 0 0 20px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #92400e;
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background-color: rgba(234, 88, 12, 0.06);
  border-radius: 6px;
  border-left: 3px solid #ea580c;
}
.feature-icon {
  font-size: 18px;
}
.feature-item span:last-child {
  font-size: 13px;
  color: #92400e;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.modal-btn-cancel,
.modal-btn-primary,
.modal-btn-confirm {
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid #ffe4d6;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-btn-cancel {
  background-color: rgba(234, 88, 12, 0.08);
  color: #92400e;
}
.modal-btn-cancel:hover {
  background-color: rgba(234, 88, 12, 0.15);
  border-color: #ea580c;
}
.modal-btn-primary,
.modal-btn-confirm {
  background: linear-gradient(135deg, #ea580c 0%, #dc4c1f 100%);
  color: white;
  border-color: #ea580c;
}
.modal-btn-primary:hover,
.modal-btn-confirm:hover {
  background: linear-gradient(135deg, #dc4c1f 0%, #c94318 100%);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}
/* Modal actions row for buttons */
.modal-actions-row {
  flex-direction: row;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 0 0 0;
  border-bottom: none !important;
}
.modal-actions-row button {
  flex: 1;
  min-width: 100px;
}
/* Edit Message Modal Styles */
.edit-message-textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px 16px;
  border: 2px solid #ffe4d6;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #3b2f2f;
  background-color: #fffaf6;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.edit-message-textarea:focus {
  outline: none;
  border-color: #ea580c;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}
.edit-message-textarea::placeholder {
  color: #d4a574;
}
/* Sidebar styles */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff3db 45%, #fff5d0 100%);
  color: #422006;
  display: flex;
  flex-direction: column;
  border-right: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(234, 88, 12, 0.12), 0 0 40px rgba(245, 158, 11, 0.12);
  position: relative;
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(250, 230, 190, 0.45) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}
.sidebar.closed {
  width: 0;
  border-right: none;
}
/* Image Modal Styles */
.image-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  animation: fadeIn 0.2s ease;
}
.image-modal-content {
  background: linear-gradient(180deg, #fffaf6 0%, #fff7f0 100%);
  border-radius: 16px;
  border: 2px solid #ffe4d6;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  position: relative;
  animation: slideUp 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.image-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(234, 88, 12, 0.15);
  border: 2px solid rgba(234, 88, 12, 0.3);
  font-size: 28px;
  color: #ea580c;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  z-index: 2501;
  font-weight: bold;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-modal-close:hover {
  color: #c94318;
  background: rgba(234, 88, 12, 0.25);
  border-color: #ea580c;
  transform: scale(1.1);
}
.image-modal-header {
  padding: 20px 24px;
  border-bottom: 2px solid #ffe4d6;
  flex-shrink: 0;
}
.image-modal-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #ea580c;
  text-shadow: 0 1px 2px rgba(234, 88, 12, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.image-modal-body {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  overflow: auto;
  background: #fafaf8;
}
.enlarged-image {
  max-width: 100%;
  max-height: calc(90vh - 140px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  object-fit: contain;
}
.image-modal-footer {
  padding: 16px 24px;
  border-top: 2px solid #ffe4d6;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: rgba(234, 88, 12, 0.04);
}
.modal-btn-cancel {
  padding: 12px 24px !important;
  border-radius: 8px !important;
  border: 2px solid #ffe4d6 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  background: rgba(234, 88, 12, 0.08) !important;
  color: #92400e !important;
}
.modal-btn-cancel:hover {
  background: rgba(234, 88, 12, 0.15) !important;
  border-color: #ea580c !important;
  transform: translateY(-2px) !important;
}
.modal-btn-cancel:active {
  transform: translateY(0) !important;
}
.download-btn {
  padding: 12px 24px !important;
  border-radius: 8px !important;
  border: 2px solid #ea580c !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  background: linear-gradient(135deg, #ea580c 0%, #dc4c1f 100%) !important;
  color: white !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
.download-btn:hover {
  background: linear-gradient(135deg, #dc4c1f 0%, #c94318 100%) !important;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35) !important;
  border-color: #c94318 !important;
  transform: translateY(-2px) !important;
}
.download-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25) !important;
}
/* Mobile responsive styles */
@media (max-width: 768px) {
  .chatbot-app {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 85vw;
    z-index: 1000;
    border-radius: 0;
    transform: translateX(0);
  }

  .sidebar.closed {
    transform: translateX(-100%);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .sidebar:not(.closed) ~ .sidebar-backdrop {
    display: block;
  }

  .chatbot-container {
    width: 100%;
    flex: 1;
    position: relative;
  }

  .toggle-sidebar-btn {
    z-index: 1001;
    top: 16px;
    left: 16px;
  }

  .messages-container {
    padding: 20px 12px 20px 12px;
    gap: 20px;
    max-width: 100%;
  }

  /* Widen message area to use more horizontal space */
  .message.user {
    max-width: 97%;
  }

  .message.bot {
    max-width: 97%;
  }

  .scroll-to-bottom-btn {
    bottom: 90px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  /* Mobile input area responsive */
  .input-form {
    padding: 12px 14px;
    gap: 8px;
  }

  .input-container {
    padding: 8px 8px 8px 12px;
    gap: 6px;
    min-height: 48px;
    flex-wrap: wrap;
  }

  .textarea-wrapper {
    flex: 1;
    min-width: 0;
  }

  .message-input {
    padding: 12px 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #ea580c !important;
    background: transparent !important;
    border: none !important;
  }

  .action-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 18px;
    flex-shrink: 0;
  }

  .file-menu-container {
    flex-shrink: 0;
  }

  .file-menu-toggle {
    padding: 8px 10px;
    min-width: 40px;
    min-height: 40px;
    font-size: 16px;
  }

  .file-menu-dropdown {
    bottom: calc(100% + 4px);
    left: auto;
    right: 0;
    min-width: auto;
    max-width: calc(100vw - 20px);
    max-height: 60vh;
    overflow-y: auto;
  }

  .file-upload-action-btn {
    padding: 8px 10px;
    min-width: 40px;
    min-height: 40px;
    font-size: 16px;
  }

  .reason-button {
    padding: 8px 10px;
    min-width: 40px;
    min-height: 40px;
    font-size: 16px;
  }
}
.sidebar-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(234, 88, 12, 0.12);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.sidebar-title {
  display: flex;
  flex-direction: column;
  gap: 0px;
  flex: 1;
}
.sidebar-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ea580c 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-subtitle {
  margin: 0;
  font-size: 9px;
  font-weight: 400;
  color: rgba(71, 33, 9, 0.72);
  text-transform: lowercase;
  display: block;
  letter-spacing: 0.2px;
}
/* Modern Navigation Buttons */
.sidebar-nav-buttons {
  display: none;
  gap: 8px;
  width: 100%;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.nav-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.nav-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.12) 100%);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.nav-btn:hover::before {
  opacity: 1;
}
.nav-icon {
  font-size: 18px;
  display: block;
}
.nav-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}
.private-chat-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 18px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: #b45309;
}
.private-chat-btn i {
  color: #b45309;
}
.private-chat-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.private-chat-btn:hover {
  background-color: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
  transform: scale(1.08);
  color: #fef3c7;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.private-chat-btn:hover::before {
  opacity: 1;
}
/* Settings button */
.settings-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 18px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b45309;
}
.settings-btn i {
  color: #b45309;
}
.settings-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.12) 100%);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-2px);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.voice-chat-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 18px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  color: #b45309;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.voice-chat-btn i {
  color: #b45309;
}
.voice-chat-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.12) 100%);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-2px);
  color: #fef3c7;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.logout-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  color: #dc2626;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logout-btn:hover {
  background: rgba(220, 38, 38, 0.08);
  transform: translateY(-2px);
}
.api-pricing-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.api-pricing-btn i {
  color: #b45309;
}
.api-pricing-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.api-pricing-btn:hover {
  color: #fbbf24;
  background: linear-gradient(135deg, rgba(251,191,36,0.2) 0%, rgba(251,191,36,0.05) 100%);
  border-color: rgba(251,191,36,0.4);
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(251,191,36,0.2);
}
.api-pricing-btn:hover::before {
  opacity: 1;
}
.sidebar-close-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 7px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  line-height: 1;
}
.sidebar-close-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.sidebar-close-btn:hover {
  color: #ef4444;
  background: linear-gradient(135deg, rgba(239,68,68,0.2) 0%, rgba(239,68,68,0.05) 100%);
  border-color: rgba(239,68,68,0.4);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(239,68,68,0.2);
}
.sidebar-close-btn:hover::before {
  opacity: 1;
}
.sidebar-toggle {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.sidebar-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.sidebar-toggle:hover {
  color: #fef3c7;
  background-color: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.new-chat-btn {
  background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 100%);
  color: #6366f1;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  margin: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.new-chat-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}
.new-chat-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #fce7f3 100%);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2), 0 3px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
  color: #8b5cf6;
}
.new-chat-btn:hover::before {
  left: 100%;
}
.conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  scroll-behavior: smooth;
}
.conversation-item {
  background-color: rgba(255, 249, 240, 0.9);
  border: 1px solid rgba(234, 88, 12, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 36px;
}
.conversation-item:hover {
  background-color: #fff7ed;
  border-color: rgba(234, 88, 12, 0.25);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.08);
  transform: translateX(2px);
}
.conversation-item.active {
  background: linear-gradient(135deg, rgba(255, 234, 208, 0.95) 0%, rgba(255, 245, 224, 0.95) 100%);
  border-color: rgba(234, 88, 12, 0.35);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.12);
}
.conversation-item.active .conv-title,
.conversation-item.active .conv-time {
  color: #6b2c05;
}
.conv-title {
  font-size: 13px;
  font-weight: 600;
  color: #422006;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  transition: color 0.3s ease;
}
.conv-time {
  font-size: 11px;
  color: #7c4f20;
  transition: color 0.3s ease;
}
.conv-delete {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.conversation-item:hover .conv-delete {
  opacity: 1;
  color: #ef4444;
}
.conversation-item.active .conv-delete {
  color: #dc2626;
  opacity: 0.8;
}
.conv-delete:hover:not(:disabled) {
  color: #b91c1c;
  background-color: rgba(239, 68, 68, 0.1);
  transform: translateY(-50%) scale(1.1);
}
.conv-delete:disabled {
  cursor: not-allowed;
  opacity: 1 !important;
  color: #f59e0b !important;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}
.conversation-item.deleting {
  opacity: 0.5;
  pointer-events: none;
}
/* Personality Section */
.personality-section {
  padding: 10px 12px;
  border-top: 1px solid #f0f0f0;
  background: transparent;
  border-radius: 0;
  margin: 8px 0;
  transition: all 0.3s ease;
}
/* Token Usage Section */
.token-section {
  padding: 14px 12px;
  border-top: 1px solid rgba(234, 88, 12, 0.18);
  background: rgba(255, 250, 240, 0.96);
  border-radius: 14px;
  margin: 8px 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.token-header {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 4px 0;
  user-select: none;
}
.token-header:hover {
  color: #c2410c;
  transform: translateX(2px);
}
.token-header-text {
  flex: 1;
}
.token-expand-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 11px;
  color: #d97706;
  margin-left: 8px;
}
.token-expand-icon.expanded {
  transform: rotate(180deg);
}
.token-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.token-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.token-label {
  color: #7c2d12;
  font-weight: 600;
}
.token-value {
  color: #7c2d12;
  font-weight: 700;
  background: #fff2e8;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(234, 88, 12, 0.16);
  font-size: 12px;
}
/* VIP and Rate Limit Badges */
.token-stat.vip-badge {
  padding: 8px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
}
.token-stat.vip-badge .token-label {
  color: #a78bfa;
}
.token-stat.vip-badge .vip-status {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  color: white;
  border: 1px solid #a78bfa;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}
.token-stat.rate-limit-badge {
  padding: 8px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(34, 211, 238, 0.1) 100%);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 8px;
}
.token-stat.rate-limit-badge .token-label {
  color: #22d3ee;
}
.token-stat.rate-limit-badge .rate-limit {
  background: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%);
  color: white;
  border: 1px solid #22d3ee;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}
.token-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.15);
}
.token-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}
.signup-cancel-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}
.signup-submit-btn:disabled,
.signup-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* Personality Section */
.personality-selector-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  background: linear-gradient(135deg, #fff1ea 0%, #fff6f2 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13px;
  color: #b45309;
  font-weight: 700;
  width: 100%;
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.12);
  position: relative;
  overflow: hidden;
}
.personality-selector-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  opacity: 0;
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
}
.personality-selector-btn:hover {
  background: linear-gradient(135deg, #ffe5d0 0%, #fff0ea 100%);
  border-color: #fb923c;
  box-shadow: 0 10px 28px rgba(251, 146, 60, 0.14);
  transform: translateY(-3px);
}
.personality-selector-btn:active {
  transform: translateY(0);
}
/* Settings modal body */
.settings-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(234, 88, 12, 0.08);
}
.settings-row label {
  font-weight: 500;
  color: #ea580c;
  font-size: 14px;
}
.settings-row select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ffe4d6;
  background: rgba(255, 255, 255, 0.5);
  color: #92400e;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}
.settings-row select:hover {
  border-color: #ea580c;
  background: white;
}
.settings-row select:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}
.settings-row input {
  padding: 12px 14px;
  min-width: 220px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.settings-row input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
  background: #fff;
}
.settings-row input::placeholder {
  color: #9ca3af;
}
/* Clean table styling for AI responses */
.message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}
.message-content th,
.message-content td {
  padding: 12px 14px;
  text-align: left;
  color: #374151;
}
.message-content th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  border: none;
  letter-spacing: 0.3px;
}
.message-content td {
  border-bottom: 1px solid #f0f0f0;
}
.message-content tbody tr:nth-child(odd) {
  background: white;
}
.message-content tbody tr:nth-child(even) {
  background: #f9fafb;
}
.message-content tbody tr:hover {
  background: #f3f4ff;
}
.message-content tbody tr:hover td {
  color: #1f2937;
}
/* Shorter spacing for conclusion bullets to keep them compact */
.message-conclusion {
  margin-top: 8px;
}
.message-conclusion li {
  margin-bottom: 6px;
  line-height: 1.45;
}
.toggle-small {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #ffe4d6;
  background: rgba(234, 88, 12, 0.08);
  color: #ea580c;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.2s ease;
}
.toggle-small:hover {
  background: rgba(234, 88, 12, 0.15);
  border-color: #ea580c;
}
.toggle-small.on {
  background: linear-gradient(135deg, #ea580c 0%, #dc4c1f 100%);
  color: white;
  border-color: #ea580c;
}
.personality-selector-emoji {
  font-size: 20px;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.personality-selector-btn:hover .personality-selector-emoji {
  transform: scale(1.2) rotate(15deg);
}
.personality-selector-label {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}
/* Personality Modal Grid */
.personality-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.personality-modal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  background-color: rgba(255, 255, 255, 0.7);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.personality-modal-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.personality-modal-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  transform: translateY(-3px);
}
.personality-modal-btn.active {
  background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
  border-color: #6366f1;
  color: #4f46e5;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
  position: relative;
  transform: scale(1.02);
}
.personality-modal-emoji {
  font-size: 28px;
  display: block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.personality-modal-btn:hover .personality-modal-emoji {
  transform: scale(1.25) rotate(-10deg);
}
.personality-modal-btn.active .personality-modal-emoji {
  transform: scale(1.3) rotate(15deg);
}
.personality-modal-name {
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}
.personality-modal-desc {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.3;
}
/* Memory System Styles */
.memory-section {
  padding: 14px 12px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.5) 0%, rgba(241, 245, 249, 0.5) 100%);
  border-radius: 8px;
  margin: 10px 12px;
  display: none;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}
.memory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.memory-header span {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.memory-clear {
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid #ffe4d6;
  color: #ea580c;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}
.memory-clear:hover {
  background-color: rgba(234, 88, 12, 0.15);
  color: #dc4c1f;
  border-color: #ea580c;
  transform: rotate(180deg);
}
.memory-stats {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}
.stat {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: #6b7280;
}
.stat-label {
  font-weight: 500;
}
.stat-value {
  font-weight: 500;
  color: #f97316;
}
.memory-hint {
  font-size: 11px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.4;
}
.sidebar-donation-message {
  margin-top: auto;
  padding: 16px 12px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  border-top: 1px solid #ffe5e5;
  border-radius: 12px;
  margin: 16px 12px 0 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
  animation: slideUp 0.5s ease;
  transition: all 0.3s ease;
}
.sidebar-donation-message:hover {
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}
.sidebar-donation-message p {
  font-size: 12px;
  color: #374151;
  margin: 0;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.3px;
  animation: fadeIn 0.5s ease 0.1s both;
}
.donate-btn-sidebar {
  margin-top: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: slideUp 0.5s ease 0.2s both;
}
.donate-btn-sidebar:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
  background: linear-gradient(135deg, #ee5a6f 0%, #e8427a 100%);
}
.donate-btn-sidebar:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}
.app-footer {
  background: linear-gradient(180deg, #fffaf0 0%, #fff3db 100%);
  border-top: 1px solid #ffe4d6;
  padding: 20px;
  margin-top: auto;
  box-shadow: 0 -4px 16px rgba(234, 88, 12, 0.08);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-donation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #f5e6d3;
}
.footer-donation p {
  margin: 0;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.donate-btn-footer {
  padding: 10px 16px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.donate-btn-footer:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}
.donate-btn-footer:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.chatbot-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #fffaf6;
}
.chatbot-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(180deg, #fffaf6 0%, rgba(255, 250, 246, 0.8) 100%);
  border-bottom: 1px solid rgba(234, 88, 12, 0.05);
  gap: 8px;
}
.toggle-sidebar-btn {
  position: fixed;
  top: 40px;
  left: 20px;
  z-index: 1000;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0;
  font-size: 24px;
  cursor: pointer;
  color: #0f172a;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  opacity: 1;
  transform: scale(1);
  backdrop-filter: blur(10px);
}
.toggle-sidebar-btn:hover {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #ea580c;
  border-color: #ea580c;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2), 0 2px 6px rgba(15, 23, 42, 0.1);
  transform: scale(1.08);
}
.toggle-sidebar-btn.hidden {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}
/* Floating + button at top-right */
.floating-add-btn {
  position: fixed;
  top: 40px;
  right: 20px;
  z-index: 1000;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  color: #0f172a;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  opacity: 1;
  transform: scale(1);
  backdrop-filter: blur(10px);
  line-height: 1;
}
.floating-add-btn:hover {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #ea580c;
  border-color: #ea580c;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2), 0 2px 6px rgba(15, 23, 42, 0.1);
  transform: scale(1.08) rotate(90deg);
}
.floating-add-btn.active {
  background: linear-gradient(135deg, #ea580c 0%, #0369a1 100%);
  color: white;
  border-color: #0369a1;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.3);
  transform: scale(1.08) rotate(45deg);
}
/* Floating Code Panel button */
.floating-code-panel-wrapper {
  position: fixed;
  top: 40px;
  right: 80px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.floating-code-panel-btn {
  background: linear-gradient(135deg, #f3e8ff 0%, #fae8ff 100%);
  border: 1.5px solid #e9d5ff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #7c3aed;
  padding: 10px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  opacity: 1;
  transform: scale(1);
  backdrop-filter: blur(10px);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  white-space: nowrap;
}
.floating-code-panel-btn.pulse {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.code-panel-bubble {
  background: #f8f6ff;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.08);
  max-width: 220px;
  text-align: center;
}
.floating-code-panel-btn:hover {
  background: linear-gradient(135deg, #ede9fe 0%, #f5d4ff 100%);
  color: #6d28d9;
  border-color: #c4b5fd;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2), 0 2px 6px rgba(15, 23, 42, 0.1);
  transform: scale(1.08);
}
.floating-code-panel-btn:active {
  transform: scale(0.98);
}
/* Floating menu dropdown */
.floating-menu {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 999;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15), 0 4px 12px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  min-width: 200px;
  animation: slideDown 0.2s ease;
  backdrop-filter: blur(10px);
  border: 1px solid #e2e8f0;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.floating-menu-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-size: 14px;
  color: #ea580c;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}
.floating-menu-item:last-child {
  border-bottom: none;
}
.floating-menu-item:hover {
  background-color: #fffbeb;
  color: #ea580c;
  padding-left: 20px;
}
.agent-menu-item {
  background: linear-gradient(135deg, #0f3460, #533483) !important;
  color: #fff !important;
  font-weight: 600;
}
.agent-menu-item:hover {
  background: linear-gradient(135deg, #16213e, #6a3da8) !important;
  color: #fff !important;
  padding-left: 20px;
}
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 32px 48px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: #fffaf6;
  scroll-behavior: auto;
}
/* Temporary large bottom spacer used when initiating a new AI response */
.messages-container.prefill-space {
  padding-bottom: 40vh;
}
.welcome-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 60vh;
  text-align: center;
}
.welcome-message h2 {
  font-size: 32px;
  margin: 0 0 16px 0;
  color: #92400e;
  font-weight: 600;
}
.welcome-message p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0 0 8px 0;
}
.welcome-hint {
  font-size: 14px;
  color: #92400e;
  margin-top: 16px;
  font-weight: 500;
}
.message {
  display: flex;
  flex-direction: column;
  word-wrap: break-word;
  animation: slideIn 0.3s ease-out;
  position: relative;
  gap: 0;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.message.user {
  align-self: flex-end;
  max-width: 20%;
  min-width: 140px;
  position: relative;
  flex-shrink: 0;
}
.message.user.expanded {
  max-width: 80%;
  min-width: auto;
}
.message.bot {
  align-self: flex-start;
  width: 100%;
}
.message.bot.error {
  background-color: transparent;
}
/* User message expand button */
.user-message-expand-btn {
  background: linear-gradient(135deg, #ff9e64 0%, #ff8a4b 100%);
  border: none;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(255, 158, 100, 0.4);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  vertical-align: middle;
  margin-top: 2px;
}
.user-message-expand-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(255, 158, 100, 0.6);
  background: linear-gradient(135deg, #ffa876 0%, #ff9a5c 100%);
}
.user-message-expand-btn:active {
  transform: scale(0.98);
}
.message.hidden-by-compact {
  display: none;
}
/* Message container with execution UI separation */
.message {
  display: flex;
  flex-direction: column;
  word-wrap: break-word;
  animation: slideIn 0.3s ease-out;
  position: relative;
  gap: 0;
}
/* Ensure execution flow and stepper don't affect message-content layout */
.message > .execution-flow-container {
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.message-content {
  padding: 12px 16px;
  border-radius: 0;
  font-size: 16px;
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  animation: textReveal 0.4s ease-out;
  text-align: left;
  margin-right: 40px;
  margin-left: 40px;
  min-width: 0;
  overflow: auto;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  margin-bottom: 8px;
}
.message-paragraph {
  margin-bottom: 1.4em;
  line-height: 1.8;
}
.message-content p {
  margin: 0 0 1.2rem;
  line-height: 1.8;
}
.message-content ul,
.message-content ol {
  margin: 0.8rem 0 1rem;
  padding-left: 1.2rem;
}
.message-content li {
  margin-bottom: 0.7rem;
  line-height: 1.7;
}
.message-content br {
  content: "";
  display: block;
  margin-bottom: 0.8rem;
}
/* Formula Styles for KaTeX rendering */
.formula-inline {
  display: inline-block;
  padding: 2px 6px;
  margin: 0 2px;
  border-radius: 4px;
  background: rgba(102, 126, 234, 0.08);
  font-size: 0.95em;
  line-height: 1.4;
}
.message.user .formula-inline {
  background: rgba(255, 255, 255, 0.15);
}
.formula-block {
  background: rgba(102, 126, 234, 0.08);
  padding: 16px 12px;
  border-radius: 8px;
  margin: 12px 0;
  overflow-x: auto;
  line-height: 1.8;
  border-left: 3px solid #667eea;
}
.message.user .formula-block {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: rgba(255, 255, 255, 0.5);
}
.quiz-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.95);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 16px 0;
}
.quiz-title {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1.05rem;
  color: #1f2937;
}
.quiz-question-block {
  margin-bottom: 14px;
}
.quiz-question {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}
.quiz-question-number {
  color: #2563eb;
}
.quiz-options {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}
.quiz-option {
  all: unset;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.quiz-option:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(59, 130, 246, 0.35);
}
.quiz-option.selected {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}
.quiz-option-text {
  flex: 1;
  text-align: left;
}
.quiz-option-selected {
  color: #1d4ed8;
  font-weight: 700;
}
.quiz-option-label {
  font-weight: 700;
  color: #1d4ed8;
}
.quiz-answer-key {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}
.quiz-answer-key-title {
  font-weight: 700;
  margin-bottom: 10px;
  color: #0f172a;
}
.quiz-answer-item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}
.quiz-answer-question {
  font-weight: 700;
  color: #2563eb;
}
.quiz-answer-choice {
  font-weight: 600;
}
.quiz-answer-explanation {
  margin-left: 24px;
  color: #475569;
}
/* KaTeX overrides for better display */
.formula-inline .katex,
.formula-block .katex {
  font-size: 1.05em;
}
.formula-block .katex-display {
  margin: 0 !important;
}
.formula-inline .katex-display,
.formula-block .katex-display {
  padding: 0 !important;
}
/* Remove margins for tables to give them more space */
.message-content .table-container {
  margin-left: -40px;
  margin-right: -40px;
  padding-left: 40px;
  padding-right: 40px;
  width: calc(100% + 80px);
}
@keyframes textReveal {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}
.message.user .message-content {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: white;
  border-radius: 12px 3px 12px 12px;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.18);
  padding: 8px 12px;
  margin-right: 0;
  margin-left: 0;
  font-family: 'Poppins', sans-serif;
  overflow: visible;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
}
.message.user .message-content span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message.user .message-content p {
  display: inline;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message.user.expanded .message-content {
  white-space: normal;
  flex-wrap: wrap;
}
.message.user.expanded .message-content p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.message.bot .message-content {
  background-color: transparent;
  color: #34221c;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  font-weight: 400;
  text-align: left;
  margin-right: 0;
  margin-left: 0;
  font-size: 17.5px;
  font-family: 'Poppins', 'Georgia', serif;
  letter-spacing: 0.2px;
}
.message.bot.error .message-content {
  background-color: #fee2e2;
  color: #dc2626;
}
/* Streaming text cursor - disabled to show only typing indicator dots */
.message-content.streaming::after {
  content: '';
  display: none;
}
/* Collapsed message styling */
.message.collapsed {
  max-width: auto;
  align-self: flex-end;
}
.message.collapsed .message-content {
  max-height: 1.4em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 8px 12px !important;
}
.expand-button {
  background: none;
  border: none;
  color: white;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  margin-top: 6px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  align-self: flex-end;
}
.expand-button:hover {
  opacity: 1;
}
.message-time {
  font-size: 11px;
  color: #d1d5db;
  margin-top: 6px;
  padding: 0 2px;
}
.message.user .message-time {
  text-align: right;
  color: #9ca3af;
}
/* File attachments in messages */
.message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.message-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(249, 115, 22, 0.3);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(249, 115, 22, 0.5);
  animation: fadeInScale 0.3s ease-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message.bot .message-files {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}
.message.bot .message-file-chip {
  background-color: rgba(249, 115, 22, 0.15);
  color: #7a3f2d;
  border: 1px solid rgba(249, 115, 22, 0.3);
}
/* Image attachments in messages */
.message-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.message.user .message-images {
  border-top: none;
  padding-top: 0;
}
.message-image-chip {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
  animation: fadeInScale 0.3s ease-out;
}
.message-image-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.2s ease;
}
.message-image-chip:hover .message-image-thumbnail {
  transform: scale(1.05);
  filter: brightness(1.1);
}
.message.bot .message-images {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}
/* Text Queue Chips */
.message-text-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(249, 115, 22, 0.2);
}
.message-text-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(249, 115, 22, 0.3);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(249, 115, 22, 0.5);
  animation: fadeInScale 0.3s ease-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message.bot .message-text-queue {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}
.message.bot .message-text-chip {
  background-color: rgba(249, 115, 22, 0.15);
  color: #7a3f2d;
  border: 1px solid rgba(249, 115, 22, 0.3);
}
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Typing indicator animation */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0;
  background-color: transparent;
  border-radius: 0;
}
.typing-indicator span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #6b7280;
  animation: bounce-dots 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes bounce-dots {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}
.loading-status-text {
  margin-left: 12px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  animation: fadeInOut 0.6s ease-in-out;
  white-space: nowrap;
}
.message.loading .message-content {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Message Footer Styles */
.message-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  margin-right: 40px;
  margin-left: 40px;
}
.message-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.feedback-btn {
  background: none;
  border: none;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  color: #999;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
}
.feedback-btn i {
  font-size: 12px;
}
.feedback-btn:hover {
  opacity: 0.8;
  background-color: rgba(234, 88, 12, 0.08);
}
.feedback-btn.active {
  color: #ea580c;
  opacity: 1;
  background-color: rgba(234, 88, 12, 0.12);
}
.copy-btn {
  margin-left: auto;
}
/* TTS Button */
.tts-btn {
  background: none;
  border: none;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  color: #999;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
}
.tts-btn:hover:not(:disabled) {
  opacity: 0.8;
  background-color: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
}
.tts-btn.playing {
  color: #3b82f6;
  opacity: 1;
  background-color: rgba(59, 130, 246, 0.12);
  animation: pulse 1.5s infinite;
}
.tts-btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
}
.tts-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
@keyframes pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
  }
}
.message-attribution {
  font-size: 11px;
  color: #bbb;
  opacity: 0.5;
  font-style: italic;
  margin-top: 2px;
}
.message-divider {
  width: 100%;
  height: 1px;
  margin: 16px 0;
  background: linear-gradient(to right, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.7), rgba(148, 163, 184, 0));
  position: relative;
}
.message-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background-color: #94a3b8;
}
@keyframes fadeInOut {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
.error-banner {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  border-top: 1px solid #fca5a5;
  box-shadow: 0 -2px 8px rgba(220, 38, 38, 0.1);
}
.error-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
}
.error-message {
  flex: 1;
}
.error-message p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #b91c1c;
}
.error-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.retry-button {
  background-color: #dc2626;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.retry-button:hover:not(:disabled) {
  background-color: #b91c1c;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}
.retry-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.error-close {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.error-close:hover {
  opacity: 1;
}
/* Uploaded Files Display */
.uploaded-files-container {
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(254, 243, 230, 0.4) 0%, rgba(254, 240, 220, 0.4) 100%);
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
  animation: slideDown 0.3s ease;
}
.uploaded-files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #d97706;
}
.clear-files-btn {
  background: none;
  border: none;
  color: #f97316;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: all 0.2s ease;
  border-radius: 4px;
}
.clear-files-btn:hover {
  opacity: 1;
  background: rgba(249, 115, 22, 0.1);
}
.uploaded-files-container {
  position: relative;
  z-index: 101;
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid rgba(71, 85, 105, 0.15);
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px 12px 0 0;
  margin-bottom: 12px;
}
.uploaded-files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}
.uploaded-files-header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.minimize-files-btn,
.clear-files-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: all 0.2s ease;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
}
.minimize-files-btn:hover,
.clear-files-btn:hover {
  opacity: 1;
  background: rgba(71, 85, 105, 0.1);
}
.uploaded-files-container.minimized {
  max-height: 60px;
  overflow: hidden;
  border-radius: 12px;
}
.uploaded-files-list,
.uploaded-attachments-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  opacity: 1;
  max-height: 80px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-right: 8px;
  scroll-behavior: smooth;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.uploaded-attachments-container {
  position: relative;
  z-index: 101;
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid rgba(71, 85, 105, 0.15);
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px 12px 0 0;
  margin-bottom: 12px;
}
.uploaded-attachments-container.minimized {
  max-height: 60px;
  overflow: hidden;
  border-radius: 12px;
}
.uploaded-attachments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}
.uploaded-attachments-header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.minimize-files-btn,
.clear-files-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: all 0.2s ease;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
}
.minimize-files-btn:hover,
.clear-files-btn:hover {
  opacity: 1;
  background: rgba(71, 85, 105, 0.1);
}
.uploaded-files-list::-webkit-scrollbar,
.uploaded-attachments-list::-webkit-scrollbar {
  height: 6px;
}
.uploaded-files-list::-webkit-scrollbar-track,
.uploaded-attachments-list::-webkit-scrollbar-track {
  background: transparent;
}
.uploaded-files-list::-webkit-scrollbar-thumb,
.uploaded-attachments-list::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}
.uploaded-files-list::-webkit-scrollbar-thumb:hover,
.uploaded-attachments-list::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}
.uploaded-file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-size: 12px;
  color: #334155;
  animation: chipIn 0.3s ease;
  transition: all 0.2s ease;
  max-width: 260px;
  flex-shrink: 0;
  white-space: nowrap;
}
@keyframes chipIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.file-icon {
  font-size: 16px;
}
.file-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.file-name {
  font-weight: 500;
  color: #1e293b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta {
  font-size: 11px;
  color: #64748b;
}
.remove-file-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  opacity: 0.6;
  transition: all 0.2s ease;
  border-radius: 3px;
  margin-left: 4px;
  flex-shrink: 0;
}
.remove-file-btn:hover {
  opacity: 1;
  background: rgba(71, 85, 105, 0.1);
  color: #ef4444;
}
/* ===== UPLOADED IMAGES SECTION ===== */
.uploaded-images-container {
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid rgba(71, 85, 105, 0.15);
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px 12px 0 0;
  margin-bottom: 12px;
}
.uploaded-images-container.minimized {
  position: fixed;
  bottom: 120px;
  top: auto;
  left: 0;
  width: 50vw;
  max-width: 50vw;
  min-width: 320px;
  max-height: 120px;
  overflow: hidden;
  z-index: 30;
  border-right: 1px solid rgba(71, 85, 105, 0.15);
  border-top: 1px solid rgba(71, 85, 105, 0.15);
  background: rgba(255, 255, 255, 0.98);
  padding: 12px 16px;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}
.uploaded-images-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  transition: margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.uploaded-images-container.minimized .uploaded-images-header {
  margin-bottom: 0;
}
.uploaded-images-header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.minimize-images-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  opacity: 0.7;
  transition: all 0.2s ease;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-width: 20px;
  min-height: 20px;
}
.minimize-images-btn:hover {
  opacity: 1;
  background: rgba(71, 85, 105, 0.1);
}
.clear-images-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  opacity: 0.7;
  transition: all 0.2s ease;
  border-radius: 3px;
  line-height: 1;
}
.clear-images-btn:hover {
  opacity: 1;
  background: rgba(71, 85, 105, 0.1);
}
.uploaded-images-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  opacity: 1;
  max-height: 80px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-right: 8px;
  scroll-behavior: smooth;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.uploaded-images-container.minimized .uploaded-images-list {
  display: none;
}
.uploaded-image-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-size: 12px;
  color: #334155;
  animation: chipIn 0.3s ease;
  transition: all 0.2s ease;
  max-width: 220px;
  flex-shrink: 0;
  white-space: nowrap;
}
.uploaded-image-chip.status-queued {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.05);
}
.uploaded-image-chip.status-analyzing {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}
.uploaded-image-chip.status-analyzed {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}
.uploaded-image-chip.status-error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}
.image-preview-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(71, 85, 105, 0.15);
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-chip-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.image-file-name {
  font-weight: 500;
  color: #1e293b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-status {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.remove-image-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  opacity: 0.6;
  transition: all 0.2s ease;
  border-radius: 3px;
  margin-left: 4px;
  flex-shrink: 0;
}
.remove-image-btn:hover {
  opacity: 1;
  background: rgba(71, 85, 105, 0.1);
  color: #ef4444;
}
/* File attached badge in input area */
.file-attached-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 12px;
  min-width: 32px;
  text-align: center;
  animation: badgeBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}
@keyframes badgeBounce {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.input-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 186, 124, 0.05) 100%);
  backdrop-filter: none;
  border-top: none;
  position: sticky;
  bottom: 0;
  z-index: 100;
}
.input-form::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: radial-gradient(ellipse at center bottom, rgba(255, 127, 80, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(20px);
}
.input-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #fffbf7 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 127, 80, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 32px rgba(255, 127, 80, 0.2), 0 4px 12px rgba(255, 127, 80, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  overflow: visible;
  padding: 10px 12px 10px 20px;
  gap: 10px;
  min-height: 56px;
}
.input-container.generating {
  animation: rotatingContainerGlow 2s linear infinite;
}
.source-strip {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 10px 14px;
  margin-top: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 127, 80, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: sourceStripFade 0.35s ease-out;
}
.source-strip:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 127, 80, 0.15), 0 10px 20px rgba(255, 127, 80, 0.08);
}
.source-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.source-strip-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
}
.source-strip-text span:first-child {
  font-weight: 600;
  color: #c2410b;
}
.source-strip-count {
  font-size: 12px;
  color: #92400e;
}
.source-strip-label {
  font-size: 12px;
  color: #9d6b53;
}
.source-logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.source-logo-chip {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(234, 88, 12, 0.2);
  background: linear-gradient(135deg, #fff7ed, #fff1e0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c2410b;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.source-logo-chip:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 18px rgba(234, 88, 12, 0.18);
}
.source-strip.sources-above-output {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 10px 12px;
  margin: 0 0 14px 0;
}
.source-strip.sources-above-output .source-strip-header {
  gap: 8px;
}
.source-strip.sources-above-output .source-strip-text span:first-child {
  font-size: 12px;
}
.source-strip.sources-above-output .source-strip-count {
  font-size: 11px;
}
.source-strip.sources-above-output {
  animation: sourceStripFade 0.25s ease-out;
}
.source-strip.sources-above-output .source-strip-header {
  gap: 8px;
}
.source-strip.sources-above-output .source-strip-text span:first-child {
  font-size: 12px;
}
.source-strip.sources-above-output .source-strip-count {
  font-size: 11px;
}
.source-strip.sources-above-output .source-logo-row {
  gap: 6px;
}
.source-strip.sources-above-output .source-logo-chip {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.source-strip.sources-above-output .source-logo-more {
  min-width: 30px;
  height: 30px;
  font-size: 12px;
}
.source-logo-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.source-logo-more {
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px dashed rgba(234, 88, 12, 0.3);
  background: #fff8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c2410b;
  font-size: 13px;
  font-weight: 700;
}
@keyframes sourceStripFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.input-container:focus-within {
  border-color: rgba(255, 127, 80, 0.4);
  box-shadow: 0 16px 40px rgba(255, 127, 80, 0.25), 0 6px 16px rgba(255, 127, 80, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}
.message-input {
  flex: 1;
  padding: 16px 12px;
  border: none;
  font-size: 16px;
  outline: none;
  background-color: transparent;
  color: #ea580c;
  transition: all 0.2s ease;
  resize: none;
  font-family: inherit;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
}
.message-input:focus {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
}
.message-input:disabled {
  background-color: transparent;
  color: #9ca3af;
  cursor: not-allowed;
}
.message-input::placeholder {
  color: #9ca3af;
}
/* Ensure ChatBot message input is always properly styled and visible */
.input-form .message-input {
  color: #ea580c !important;
  background: transparent !important;
  border: none !important;
  padding: 16px 12px !important;
  font-size: 16px !important;
  outline: none !important;
}
.input-form .message-input:focus {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: #ea580c !important;
}
/* Action button base styles */
.action-button {
  padding: 0;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}
.action-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.action-button:active::before {
  width: 100px;
  height: 100px;
}
.button-icon {
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.button-icon.fa-solid {
  font-size: 18px;
}
.action-button:hover .button-icon {
  transform: scale(1.1);
}
/* SEND MODE */
.action-button.send-mode {
  background: linear-gradient(135deg, #ff7f50 0%, #ff6b35 100%);
  animation: slideInFromBottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.action-button.send-mode:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff8c69 0%, #ff7f50 100%);
  box-shadow: 0 8px 20px rgba(255, 127, 80, 0.4);
  transform: translateY(-3px) scale(1.05);
}
.action-button.send-mode:active:not(:disabled) {
  transform: translateY(-1px) scale(0.96);
}
.action-button.send-mode:disabled {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  cursor: not-allowed;
  color: #9ca3af;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
/* STOP MODE */
.action-button.stop-mode {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  animation: slideInFromBottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.action-button.stop-mode:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.4);
  transform: translateY(-3px) scale(1.05);
}
.action-button.stop-mode:active {
  transform: translateY(-1px) scale(0.96);
}
/* File Upload Button */
.file-upload-action-btn {
  padding: 10px 14px;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}
.file-upload-action-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.3);
  transform: translateY(-2px);
}
.file-upload-action-btn:active:not(:disabled) {
  transform: translateY(0px) scale(0.97);
  box-shadow: 0 3px 8px rgba(249, 115, 22, 0.2);
}
.file-upload-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.1);
}
.file-upload-action-btn .button-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
@keyframes slideInFromBottom {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* Scroll to bottom button */
.scroll-to-bottom-btn {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 44px;
  height: 44px;
  background-color: #1f3a93;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 58, 147, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: slideUpIn 0.3s ease-out;
}
@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.scroll-to-bottom-btn:hover {
  background-color: #1e3a8a;
  box-shadow: 0 6px 16px rgba(31, 58, 147, 0.4);
  transform: scale(1.08);
}
.scroll-to-bottom-btn:active {
  transform: scale(0.95);
}
/* Show previous messages button */
.show-previous-btn {
  position: fixed;
  bottom: 115px;
  right: 32px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #ffb86b 0%, #fb923c 100%);
  color: #2b1a12;
  border: none;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.3);
  transition: all 0.3s ease;
  z-index: 200;
  animation: slideUpIn 0.3s ease-out;
  white-space: nowrap;
}
.show-previous-btn:hover {
  background: linear-gradient(135deg, #ffd19a 0%, #fb923c 100%);
  box-shadow: 0 6px 16px rgba(251, 146, 60, 0.4);
  transform: translateY(-2px);
}
/* Inline version - inside messages container at the top */
.show-previous-btn-inline {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background: linear-gradient(135deg, #ffb86b 0%, #fb923c 100%);
  color: #2b1a12;
  border: none;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  animation: fadeIn 0.3s ease-out;
}
.show-previous-btn-inline:hover {
  background: linear-gradient(135deg, #ffd19a 0%, #fb923c 100%);
  box-shadow: 0 6px 16px rgba(251, 146, 60, 0.4);
  transform: translateY(-2px);
}
.show-previous-btn:active {
  transform: translateY(0px);
}
/* Scrollbar styling */
.messages-container::-webkit-scrollbar {
  width: 6px;
}
.messages-container::-webkit-scrollbar-track {
  background: transparent;
}
.messages-container::-webkit-scrollbar-thumb {
  background-color: #e5e7eb;
  border-radius: 3px;
}
/* Image queue horizontal scrollbar */
.uploaded-images-list::-webkit-scrollbar {
  height: 6px;
}
.uploaded-images-list::-webkit-scrollbar-track {
  background: transparent;
}
.uploaded-images-list::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}
.uploaded-images-list::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}
/* Reason button styling */
.reason-button {
  padding: 10px 14px;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}
.reason-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}
.reason-button:active:not(:disabled) {
  transform: translateY(0px) scale(0.97);
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.2);
}
.reason-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.1);
}
.reason-button.active {
  background: linear-gradient(135deg, #c084fc 0%, #a78bfa 100%);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}
/* API Dashboard Styles */
.settings-row.api-dashboard-row {
  padding: 16px 0;
  border-top: 1px solid rgba(234, 88, 12, 0.08);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.settings-row.api-dashboard-row label {
  color: #ea580c;
  font-weight: 600;
}
.api-dashboard-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #ea580c 0%, #dc4c1f 100%);
  color: white;
  border: 1px solid #ea580c;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.2);
}
.api-dashboard-btn:hover {
  background: linear-gradient(135deg, #dc4c1f 0%, #c94318 100%);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
  transform: translateY(-1px);
}
.api-dashboard-btn:active {
  transform: translateY(0px);
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.2);
}
/* API Dashboard Modal */
.modal-overlay.api-dashboard-overlay {
  z-index: 3000;
}
.modal-content.api-dashboard-modal {
  width: 95vw;
  height: 95vh;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}
.api-dashboard-modal .modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
/* API Dashboard Fullscreen */
.api-dashboard-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  z-index: 2000;
  background: linear-gradient(180deg, #fffaf6 0%, #fff7f0 100%);
  overflow: auto;
  animation: slideUp 0.3s ease;
}
.api-dashboard-close {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2001;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  font-weight: 600;
}
.api-dashboard-close:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.2) 0%, rgba(239,68,68,0.05) 100%);
  border-color: rgba(239,68,68,0.4);
  color: #ef4444;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(239,68,68,0.2);
}
.api-dashboard-modal .modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
}
/* Textarea wrapper */
.textarea-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  position: relative;
}
/* File menu container */
.file-menu-container {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.file-menu-label {
  font-size: 11px;
  color: #f97316;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
/* File menu toggle button */
.file-menu-toggle {
  padding: 10px 14px;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}
.file-menu-toggle:hover:not(:disabled) {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.3);
  transform: translateY(-2px);
}
.file-menu-toggle:active:not(:disabled) {
  transform: translateY(0px) scale(0.97);
  box-shadow: 0 3px 8px rgba(249, 115, 22, 0.2);
}
.file-menu-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.1);
}
/* File menu dropdown */
.file-menu-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: #ffffff;
  border: 1px solid rgba(234, 88, 12, 0.2);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 1000;
  animation: slideUpDropdown 0.2s ease-out;
  overflow: hidden;
}
@keyframes slideUpDropdown {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes rotatingContainerGlow {
  0% {
    box-shadow: 0 12px 32px rgba(255, 127, 80, 0.2), 
                0 4px 12px rgba(255, 127, 80, 0.15), 
                inset 0 1px 2px rgba(255, 255, 255, 0.8),
                20px 0 40px rgba(234, 88, 12, 0.5),
                0 20px 40px rgba(234, 88, 12, 0.3);
  }
  25% {
    box-shadow: 0 12px 32px rgba(255, 127, 80, 0.2), 
                0 4px 12px rgba(255, 127, 80, 0.15), 
                inset 0 1px 2px rgba(255, 255, 255, 0.8),
                0 20px 40px rgba(234, 88, 12, 0.5),
                -20px 0 40px rgba(234, 88, 12, 0.3);
  }
  50% {
    box-shadow: 0 12px 32px rgba(255, 127, 80, 0.2), 
                0 4px 12px rgba(255, 127, 80, 0.15), 
                inset 0 1px 2px rgba(255, 255, 255, 0.8),
                -20px 0 40px rgba(234, 88, 12, 0.5),
                0 -20px 40px rgba(234, 88, 12, 0.3);
  }
  75% {
    box-shadow: 0 12px 32px rgba(255, 127, 80, 0.2), 
                0 4px 12px rgba(255, 127, 80, 0.15), 
                inset 0 1px 2px rgba(255, 255, 255, 0.8),
                0 -20px 40px rgba(234, 88, 12, 0.5),
                20px 0 40px rgba(234, 88, 12, 0.3);
  }
  100% {
    box-shadow: 0 12px 32px rgba(255, 127, 80, 0.2), 
                0 4px 12px rgba(255, 127, 80, 0.15), 
                inset 0 1px 2px rgba(255, 255, 255, 0.8),
                20px 0 40px rgba(234, 88, 12, 0.5),
                0 20px 40px rgba(234, 88, 12, 0.3);
  }
}
/* Menu item */
.menu-item {
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-item:hover:not(:disabled) {
  background: rgba(234, 88, 12, 0.08);
  color: #ea580c;
}
.menu-item:active:not(:disabled) {
  background: rgba(234, 88, 12, 0.12);
}
.menu-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.menu-item.active {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
}
.menu-icon {
  font-size: 14px;
  font-weight: 600;
  min-width: 14px;
  text-align: center;
}
.menu-label {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: transparent;
}
.menu-divider {
  height: 1px;
  background: rgba(234, 88, 12, 0.1);
  margin: 4px 0;
}
/* Message reasoning styles - Static white box with auto-scroll */
.message-reasoning {
  margin-bottom: 8px;
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.reasoning-window {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  height: 52px;
}
.reasoning-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 1;
}
.reasoning-window::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 1;
}
.reasoning-window-header {
  display: none;
}
.reasoning-window-icon {
  display: none;
}
.reasoning-window-title {
  display: none;
}
.reasoning-window-status {
  display: none;
}
.reasoning-window-body {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #4b5563;
  height: 52px;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
  z-index: 2;
  scroll-behavior: smooth;
}
.reasoning-window-body::-webkit-scrollbar {
  width: 4px;
}
.reasoning-window-body::-webkit-scrollbar-track {
  background: transparent;
}
.reasoning-window-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}
.reasoning-window-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
/* Collapsed reasoning text - shows when streaming done */
.reasoning-collapsed-text {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  padding: 4px 8px;
  margin: 6px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-style: italic;
  border-bottom: 1px dashed #d1d5db;
}
.reasoning-collapsed-text:hover {
  color: #ea580c;
  border-bottom-color: #ea580c;
  text-decoration: underline;
}
/* Reasoning modal overlay */
.reasoning-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}
.reasoning-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}
.reasoning-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f9f7f5 0%, #faf9f8 100%);
}
.reasoning-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #34221c;
}
.reasoning-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.reasoning-modal-close:hover {
  background: #f3f4f6;
  color: #6b7280;
}
.reasoning-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.reasoning-modal-body::-webkit-scrollbar {
  width: 6px;
}
.reasoning-modal-body::-webkit-scrollbar-track {
  background: #f9f7f5;
}
.reasoning-modal-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
.reasoning-modal-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes reasoningSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes reasoningFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes reasoningPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}
/* Reasoning styling removed - now using reasoning-window structure */
.reasoning-content::-webkit-scrollbar-track {
  background: transparent;
}
.reasoning-content::-webkit-scrollbar-thumb {
  background: #c4b5fd;
  border-radius: 2px;
}
.reasoning-content > * {
  margin: 6px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}
.reasoning-content p {
  margin: 6px 0;
  font-size: 14px;
  color: #5b21b6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}
.messages-container::-webkit-scrollbar-thumb:hover {
  background-color: #d1d5db;
}
/* Sidebar scrollbar */
.conversations-list::-webkit-scrollbar {
  width: 4px;
}
.conversations-list::-webkit-scrollbar-track {
  background: transparent;
}
/* Table styling for markdown tables - IMPROVED */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 1.5em 0;
  border-radius: 8px;
  background: white;
  border: 2px solid #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  -webkit-overflow-scrolling: touch;
}
.table-container:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.markdown-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  background-color: white;
  font-size: 14px;
  line-height: 1.6;
  table-layout: auto;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}
.markdown-table thead {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
  position: sticky;
  top: 0;
  z-index: 10;
}
.markdown-table th {
  padding: 14px 16px;
  text-align: center;
  font-weight: 600;
  color: #333;
  background: inherit;
  border: 2px solid #000;
  letter-spacing: 0.3px;
  font-size: 13px;
  text-transform: capitalize;
  white-space: nowrap;
}
.markdown-table td {
  padding: 12px 16px;
  border: 2px solid #000;
  color: #333;
  font-weight: 400;
  font-size: 14px;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
}
.markdown-table tbody tr {
  transition: background 0.2s ease;
  position: relative;
}
.markdown-table tbody tr:nth-child(odd) {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
}
.markdown-table tbody tr:nth-child(even) {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
}
.markdown-table tbody tr:hover {
  background: linear-gradient(135deg, #fffaf8 0%, #ffe8d9 100%);
}
.markdown-table tbody tr:hover td {
  color: #1f2937;
  font-weight: 500;
}
.markdown-table tbody tr:first-child td {
  border-top: 2px solid #000;
}
/* HTML Editor Modal Styles */
.html-editor-modal {
  max-width: 800px !important;
  height: 85vh;
  display: flex;
  flex-direction: column;
}
.html-preview-modal {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
}
.html-preview-body {
  flex: 1;
  padding: 0;
  display: flex;
  position: relative;
}
.html-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.preview-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}
.preview-close-btn:hover {
  transform: scale(1.05);
  background: white;
}
.html-editor-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex: 1;
}
.html-filename-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.html-filename-group label {
  font-size: 14px;
  font-weight: 500;
  color: #92400e;
}
.html-filename-input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #ea580c;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.html-filename-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.html-editor-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.html-editor-group label {
  font-size: 14px;
  font-weight: 500;
  color: #92400e;
}
.html-editor-textarea {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #ea580c;
  background-color: #fafbfc;
  resize: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  white-space: pre;
  overflow-wrap: normal;
}
.html-editor-textarea:focus {
  outline: none;
  border-color: #f97316;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.html-editor-textarea::placeholder {
  color: #9ca3af;
}
.html-preview-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background-color: #eff6ff;
  border-radius: 6px;
  border-left: 3px solid #fb923c;
  font-size: 13px;
  color: #ea580c;
}
.info-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #fb923c;
}
.html-editor-footer {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.html-preview-btn {
  padding: 10px 16px;
  background-color: #fffbeb;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #ea580c;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.html-preview-btn:hover {
  background-color: #fef3c7;
  border-color: #7dd3fc;
}
.html-preview-btn:active {
  transform: scale(0.98);
}
/* ============================================
   CODE BLOCK STYLING - Premium Design v2
   ============================================ */
/* Code block container - modern dark theme */
.code-block-container {
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(to bottom, #0f0f0f, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 100%;
  transition: all 0.3s ease;
}
.code-block-container:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}
/* Incomplete/streaming code block - still being generated */
.code-block-container.code-block-incomplete {
  border-color: rgba(251, 146, 60, 0.3);
  background: linear-gradient(to bottom, #0f0f0f 0%, #1a1a1a 50%, rgba(251, 146, 60, 0.02) 100%);
  animation: streamingPulse 2s ease-in-out infinite;
}
.code-block-container.code-block-incomplete:hover {
  border-color: rgba(251, 146, 60, 0.5);
  box-shadow: 0 8px 32px rgba(251, 146, 60, 0.15);
}
@keyframes streamingPulse {
  0%, 100% {
    opacity: 1;
    border-color: rgba(251, 146, 60, 0.3);
  }
  50% {
    opacity: 1;
    border-color: rgba(251, 146, 60, 0.5);
  }
}
/* Code block header - clean and minimal */
.code-block-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
}
.code-collapse-btn {
  background: none;
  border: none;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.6;
  line-height: 1;
  display: flex;
  align-items: center;
}
.code-collapse-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}
.code-block-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: #a0a0a0;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.2px;
}
.code-block-name strong {
  color: #e8e8e8;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.code-copy-btn {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.6;
  line-height: 1;
  display: flex;
  align-items: center;
}
.code-copy-btn:hover {
  opacity: 1;
  background: rgba(74, 222, 128, 0.2);
}
.code-copy-btn:active {
  background: rgba(74, 222, 128, 0.3);
}
/* Code content wrapper - scrollable with nice scrollbar */
.code-content-wrapper {
  display: flex;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 500px;
  max-width: 100%;
  background: #0a0a0a;
  width: 100%;
}
.code-content-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.code-content-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.code-content-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
.code-content-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
/* Line numbers - subtle and clean */
.code-line-numbers {
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}
.code-line-numbers div {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.25);
  padding: 0 10px 0 0;
  min-height: 19.2px;
}
/* Code block pre/code - safe rendering without HTML execution */
pre.code-block {
  flex: 0 1 auto;
  margin: 0;
  padding: 14px 16px;
  overflow: hidden;
  background: transparent;
  border: none;
  border-radius: 0;
  width: auto;
}
pre.code-block code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #e0e0e0;
  white-space: pre;
  tab-size: 2;
  -moz-tab-size: 2;
  word-break: keep-all;
  overflow-wrap: normal;
  display: block;
  width: max-content;
}
/* Simpler code block variant: light, compact, colorful */
.simple-code-wrapper {
  margin: 12px 0;
}
.simple-code-meta {
  font-size: 12px;
  color: #6b7280;
  margin: 6px 6px 4px 6px;
}
.simple-code-block {
  background: linear-gradient(180deg,#071021 0%, #0b1220 100%);
  color: #e6eef8;
  padding: 12px 14px;
  border-radius: 8px;
  overflow: auto;
  font-family: 'Fira Code', 'Monaco', Menlo, 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 6px 18px rgba(3,7,18,0.6) inset;
}
.simple-code-block, .simple-code-block code {
  white-space: pre-wrap; /* preserve newlines, allow wrapping */
  word-break: break-word;
  overflow-wrap: anywhere;
  width: 100%;
}
.simple-code-block code {
  display: block;
}
/* Stronger, editor-like syntax colors */
.hl-keyword { color: #ff79c6; font-weight: 700; }
.hl-string { color: #98c379; }
.hl-comment { color: #6272a4; font-style: italic; opacity: 0.9; }
.hl-number { color: #f1fa8c; }
.hl-builtin { color: #8be9fd; }
.hl-function { color: #50fa7b; font-weight: 600; }
.hl-class { color: #bd93f9; }
.hl-tag { color: #ff79c6; }
.hl-attribute { color: #8be9fd; }
.hl-operator { color: #ffb86c; }
.hl-variable { color: #f8f8f2; }
.simple-code-meta {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: #93c5fd;
  margin: 6px 6px 8px 6px;
}
.simple-code-block code > span { /* ensure inline token spacing */
  white-space: pre-wrap;
}
/* Syntax highlighting colors - Catppuccin inspired */
.hl-string { color: #a6e3a1; }
.hl-comment { color: #6c7086; font-style: italic; }
.hl-number { color: #f5c2e7; }
.hl-keyword { color: #89b4fa; font-weight: 600; }
.hl-literal { color: #f5c2e7; }
.hl-builtin { color: #89dceb; }
.hl-function { color: #a6e3a1; }
.hl-class { color: #f9e2af; }
.hl-property { color: #89dceb; }
.hl-attribute { color: #a6e3a1; }
.hl-tag { color: #f38ba8; }
.hl-operator { color: #89b4fa; }
.hl-variable { color: #89dceb; }
.hl-dom { color: #f9e2af; }
.hl-node { color: #a6e3a1; }
.hl-react { color: #89dceb; }
.hl-library { color: #f5c2e7; }
.hl-value { color: #a6e3a1; }
.hl-key { color: #89dceb; }
.hl-selector { color: #f38ba8; }
.hl-atrule { color: #89b4fa; }
.hl-pseudo { color: #a6e3a1; }
/* Inline code - compact style */
.inline-code {
  background: rgba(30, 30, 46, 0.1);
  color: #f5c2e7;
  padding: 3px 8px;
  border-radius: 5px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
  font-size: 0.88em;
  border: 1px solid rgba(245, 194, 231, 0.2);
  white-space: nowrap;
  overflow: auto;
}
/* Keywords - Mauve */
.hl-keyword {
  color: #cba6f7;
  font-weight: 600;
}
/* Strings - Green */
.hl-string {
  color: #a6e3a1;
}
/* Comments - Overlay0 (italic) */
.hl-comment {
  color: #6c7086;
  font-style: italic;
}
/* Numbers - Peach */
.hl-number {
  color: #fab387;
}
/* Literals (true/false/null) - Red */
.hl-literal {
  color: #f38ba8;
}
/* Built-in objects - Blue */
.hl-builtin {
  color: #89b4fa;
}
/* DOM objects - Sky */
.hl-dom {
  color: #89dceb;
}
/* Node.js - Teal */
.hl-node {
  color: #94e2d5;
}
/* React - Lavender */
.hl-react {
  color: #b4befe;
}
/* Libraries - Yellow */
.hl-library {
  color: #f9e2af;
}
/* HTML Tags - Blue */
.hl-tag {
  color: #89b4fa;
}
/* HTML Tag names - Maroon */
.hl-tagname {
  color: #eba0ac;
}
/* HTML Attributes - Yellow */
.hl-attribute {
  color: #f9e2af;
}
/* CSS Properties - Blue */
.hl-property {
  color: #89b4fa;
}
/* CSS Selectors - Mauve */
.hl-selector {
  color: #cba6f7;
}
/* CSS Values - Green */
.hl-value {
  color: #a6e3a1;
}
/* CSS At-rules - Pink */
.hl-atrule {
  color: #f5c2e7;
}
/* CSS Pseudo-classes - Peach */
.hl-pseudo {
  color: #fab387;
}
/* JSON Keys - Yellow */
.hl-key {
  color: #f9e2af;
}
/* Python Builtins - Teal */
.hl-builtin {
  color: #94e2d5;
}
/* Python Libraries - Peach */
.hl-library {
  color: #fab387;
}
/* Bash Variables - Peach */
.hl-variable {
  color: #fab387;
}
/* Class names - Yellow */
.hl-classname {
  color: #f9e2af;
}
/* Test keywords - Green */
.hl-test {
  color: #a6e3a1;
}
/* jQuery - Blue */
.hl-jquery {
  color: #89b4fa;
}
/* ============================================
   CODE STRUCTURE VIEWER
   ============================================ */
.code-structure-viewer {
  padding: 10px 14px;
  background: #11111b;
  border-bottom: 1px solid #313244;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.8;
  color: #a6adc8;
  max-height: 200px;
  overflow-y: auto;
}
.code-structure-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  transition: background 0.2s ease;
}
.code-structure-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.structure-indent {
  display: inline-block;
  min-width: 16px;
}
.structure-icon {
  font-size: 12px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.structure-label {
  color: #cdd6f4;
  font-weight: 500;
}
.structure-line {
  color: #585b70;
  font-size: 11px;
  margin-left: auto;
  flex-shrink: 0;
}
/* Structure type colors */
.structure-function .structure-label {
  color: #cba6f7;
}
.structure-class .structure-label {
  color: #f9e2af;
}
.structure-method .structure-label {
  color: #89b4fa;
}
.structure-object .structure-label {
  color: #a6e3a1;
}
.structure-property .structure-label {
  color: #fab387;
}
/* ===== Reasoning Popup Styles ===== */
.reasoning-popup-overlay {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 3000;
  animation: reasoningFadeIn 0.3s ease;
  max-width: 420px;
  width: 100%;
}
@keyframes reasoningFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.reasoning-popup-window {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 1px solid rgba(100, 149, 237, 0.3);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(100, 149, 237, 0.15);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.reasoning-popup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.reasoning-popup-icon {
  font-size: 18px;
  animation: reasoningPulse 2s infinite;
}
@keyframes reasoningPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.reasoning-popup-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #e0e0ff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.reasoning-popup-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}
/* Image Generation Message Styles */
.image-thinking-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 150px;
  gap: 16px;
}
.image-thinking-state .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(74, 158, 255, 0.1);
  border-top: 4px solid #4a9eff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.image-thinking-state .thinking-text {
  font-size: 14px;
  color: #7c6b6b;
  font-style: italic;
  font-weight: 500;
}
.message-image-container {
  margin: 12px 0;
  display: flex;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}
/* Server Overload Notification */
.server-overload-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4);
  z-index: 9999;
  animation: slideDown 0.4s ease-out;
  max-width: 90%;
  width: 100%;
  max-width: 480px;
}
.notification-content {
  padding: 20px 24px;
}
.notification-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.notification-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.notification-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.95;
}
.notification-btn {
  transition: all 0.2s ease;
}
.notification-btn:hover {
  transform: translateY(-2px);
}
/* Donation Modal Styles */
.donation-modal {
  max-width: 700px !important;
}
.donation-modal-header {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  padding: 30px;
  border-radius: 12px 12px 0 0;
  text-align: center;
  animation: slideUp 0.4s ease;
}
.donation-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  animation: fadeIn 0.5s ease 0.1s both;
}
.donation-modal-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
  animation: fadeIn 0.4s ease 0.2s both;
}
.donation-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}
.donation-message {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.donation-text-main {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.4;
  animation: slideUp 0.5s ease 0.3s both;
}
.donation-text-secondary {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
  text-align: justify;
  animation: slideUp 0.5s ease 0.4s both;
}
.donation-impact {
  background: rgba(255, 107, 107, 0.08);
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #ff6b6b;
  animation: slideUp 0.5s ease 0.5s both;
  transition: all 0.3s ease;
}
.donation-impact:hover {
  background: rgba(255, 107, 107, 0.12);
  border-left-width: 6px;
}
.donation-impact h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}
.donation-impact ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}
.donation-impact li {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 8px;
  line-height: 1.5;
  transition: all 0.3s ease;
}
.donation-impact li:hover {
  color: #ff6b6b;
  transform: translateX(4px);
}
.donation-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.qrcode-container {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.5s ease 0.3s both;
  transition: all 0.3s ease;
}
.qrcode-container:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.qrcode-image {
  width: 200px;
  height: 200px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  animation: fadeIn 0.5s ease 0.4s both;
  transition: all 0.3s ease;
}
.qrcode-image:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.2);
}
.qrcode-label {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin: 0;
  text-align: center;
  animation: fadeIn 0.5s ease 0.5s both;
}
.donation-testimonial {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(238, 90, 111, 0.05) 100%);
  border-radius: 8px;
  border-left: 4px solid #ff6b6b;
  animation: slideUp 0.5s ease 0.6s both;
  transition: all 0.3s ease;
}
.donation-testimonial:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(238, 90, 111, 0.1) 100%);
  border-left-width: 6px;
}
.testimonial-text {
  font-size: 14px;
  color: #4b5563;
  font-style: italic;
  margin: 0;
  line-height: 1.6;
  animation: fadeIn 0.5s ease 0.7s both;
}
.testimonial-author {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
  margin: 12px 0 0 0;
  text-align: right;
  animation: fadeIn 0.5s ease 0.8s both;
}
.donation-modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f9fafb;
  animation: slideUp 0.4s ease 0.7s both;
}
.donation-thanks-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !important;
  color: white !important;
  transition: all 0.3s ease !important;
}
.donation-thanks-btn:hover {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35) !important;
}
.donation-thanks-btn:active {
  transform: translateY(0) scale(0.98) !important;
}
/* Donation Button in Sidebar */
.donation-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  min-height: 34px;
}
.donation-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(255, 107, 107, 0.25);
}
.donation-btn:active {
  transform: translateY(0);
}
/* Responsive design for donation modal */
@media (max-width: 768px) {
  .donation-content {
    grid-template-columns: 1fr;
  }

  .donation-modal-header h2 {
    font-size: 20px;
  }

  .qrcode-image {
    width: 160px;
    height: 160px;
  }

  .donation-modal-body {
    padding: 20px;
  }

  .donation-text-main {
    font-size: 16px;
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
.message-image {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}
.message-image:hover {
  transform: scale(1.02);
}
.reasoning-popup-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}
.reasoning-popup-body {
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
}
.reasoning-popup-body::-webkit-scrollbar {
  width: 4px;
}
.reasoning-popup-body::-webkit-scrollbar-track {
  background: transparent;
}
.reasoning-popup-body::-webkit-scrollbar-thumb {
  background: rgba(100, 149, 237, 0.3);
  border-radius: 2px;
}
.reasoning-popup-content {
  font-size: 13px;
  line-height: 1.6;
  color: #c8d6e5;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', monospace;
}
.reasoning-popup-loading {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.reasoning-dot {
  width: 6px;
  height: 6px;
  background: #6495ed;
  border-radius: 50%;
  animation: reasoningDotBounce 1.4s infinite ease-in-out both;
}
.reasoning-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.reasoning-dot:nth-child(2) {
  animation-delay: -0.16s;
}
.reasoning-dot:nth-child(3) {
  animation-delay: 0s;
}
@keyframes reasoningDotBounce {
  0%, 80%, 100% { 
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% { 
    transform: scale(1);
    opacity: 1;
  }
}
/* Responsive for mobile */
@media (max-width: 768px) {
  .reasoning-window {
    max-height: 280px;
  }
  
  .reasoning-window-body {
    max-height: 220px;
    font-size: 12px;
    padding: 12px 14px;
  }
  
  .reasoning-window-title {
    font-size: 12px;
  }
}
/* ===== Pasted Text Queue Container (ABOVE textarea) ===== */
.pasted-text-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0 0 12px 0;
  border-radius: 8px;
  background: white;
  border: 1px solid rgba(249, 115, 22, 0.2);
  overflow: hidden;
}
.pasted-text-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.06) 0%, rgba(234, 88, 12, 0.04) 100%);
  border-bottom: 1px solid rgba(249, 115, 22, 0.1);
  font-size: 14px;
  font-weight: 600;
  color: #ea580c;
}
.clear-text-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
  color: #ea580c;
}
.clear-text-btn:hover {
  opacity: 1;
  background: rgba(234, 88, 12, 0.1);
}
.pasted-text-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 200px;
  overflow-y: auto;
  padding: 0;
}
.pasted-text-list::-webkit-scrollbar {
  width: 6px;
}
.pasted-text-list::-webkit-scrollbar-track {
  background: rgba(249, 115, 22, 0.05);
}
.pasted-text-list::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.2);
  border-radius: 3px;
}
.pasted-text-list::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.3);
}
.pasted-text-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(249, 115, 22, 0.1);
  transition: background 0.2s ease;
  cursor: pointer;
}
.pasted-text-chip:last-child {
  border-bottom: none;
}
.pasted-text-chip:hover {
  background: rgba(249, 115, 22, 0.04);
}
.text-preview-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.text-chip-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.text-chip-label {
  font-size: 13px;
  font-weight: 600;
  color: #ea580c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.text-chip-preview {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Courier New', monospace;
}
.text-chip-actions {
  display: flex;
  gap: 6px;
  margin-left: 8px;
  flex-shrink: 0;
}
.text-chip-edit-btn,
.text-chip-remove-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.text-chip-edit-btn:hover {
  opacity: 1;
  background: rgba(59, 130, 246, 0.1);
}
.text-chip-remove-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.1);
}
/* ===== Text Popup Modal Styles ===== */
.text-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3001;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}
.text-popup-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}
.text-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f9f7f5 0%, #faf9f8 100%);
}
.text-popup-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}
.popup-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1f2937;
}
.text-popup-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-height: 200px;
}
.text-popup-textarea {
  width: 100%;
  height: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #1f2937;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}
.text-popup-textarea:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}
.text-popup-textarea::placeholder {
  color: #9ca3af;
}
.text-popup-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
  justify-content: flex-end;
}
.popup-action-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.popup-action-btn.save-btn {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
}
.popup-action-btn.save-btn:hover {
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
  transform: translateY(-2px);
}
.popup-action-btn.cancel-btn {
  background: #e5e7eb;
  color: #374151;
}
.popup-action-btn.cancel-btn:hover {
  background: #d1d5db;
  transform: translateY(-2px);
}
.popup-action-btn:active {
  transform: translateY(0);
}
/* Responsive for smaller screens */
@media (max-width: 640px) {
  .image-modal-content {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 80px);
    border-radius: 12px;
  }

  .image-modal-header {
    padding: 16px;
  }

  .image-modal-header h2 {
    font-size: 18px;
  }

  .image-modal-body {
    padding: 16px;
  }

  .enlarged-image {
    max-height: calc(100vh - 220px);
  }

  .image-modal-footer {
    flex-wrap: wrap;
    padding: 12px;
  }

  .modal-btn-cancel,
  .download-btn {
    padding: 10px 16px !important;
    font-size: 13px !important;
    flex: 1;
  }

  .text-popup-modal {
    max-width: calc(100% - 20px);
  }

  .text-popup-header {
    padding: 12px 16px;
  }

  .text-popup-header h3 {
    font-size: 14px;
  }

  .text-popup-body {
    padding: 16px;
    min-height: 150px;
  }

  .text-popup-footer {
    flex-direction: column;
    gap: 10px;
  }

  .popup-action-btn {
    width: 100%;
    justify-content: center;
  }

  .pasted-text-container {
    margin-bottom: 10px;
  }

  .pasted-text-header {
    padding: 10px 12px;
    font-size: 13px;
  }

  .pasted-text-chip {
    padding: 10px 12px;
    gap: 10px;
  }

  .text-preview-icon {
    font-size: 18px;
  }

  .text-chip-label {
    font-size: 12px;
  }

  .text-chip-preview {
    font-size: 11px;
  }

  .text-chip-actions {
    gap: 4px;
  }

  .text-chip-edit-btn,
  .text-chip-remove-btn {
    font-size: 14px;
    padding: 4px 8px;
  }
}
/* ===== Guest Token Limit Modal Styles ===== */
.token-limit-modal {
  max-width: 450px !important;
  background: linear-gradient(135deg, #fff8f0 0%, #fffbf5 100%) !important;
}
.token-limit-modal .modal-header {
  background: linear-gradient(135deg, #fed7aa 0%, #fef3c7 100%);
  border-bottom: 2px solid #fbbf24;
}
.token-limit-modal .modal-header h2 {
  color: #ea580c;
  font-size: 22px;
  font-weight: 700;
}
.token-limit-content {
  padding: 24px;
}
.token-limit-message {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.08) 0%, rgba(249, 115, 22, 0.04) 100%);
  border-left: 4px solid #ea580c;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: #92400e;
  font-weight: 500;
}
.benefits-list {
  margin-bottom: 24px;
}
.benefits-list h3 {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #ea580c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.benefits-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.benefits-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid rgba(234, 88, 12, 0.1);
  font-size: 14px;
  color: #92400e;
  transition: all 0.2s ease;
}
.benefits-list li:hover {
  background: rgba(249, 115, 22, 0.06);
  border-color: rgba(234, 88, 12, 0.2);
  transform: translateX(4px);
}
.benefit-icon {
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.cooldown-info {
  background: linear-gradient(135deg, rgba(100, 149, 237, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
  border-left: 4px solid #6495ed;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.cooldown-text {
  margin: 0;
  font-size: 13px;
  color: #4c5aa0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.token-limit-actions {
  padding: 16px 24px !important;
  border-top: 1px solid rgba(234, 88, 12, 0.1) !important;
  display: flex !important;
  gap: 12px !important;
  justify-content: center !important;
}
.token-limit-actions .login-btn {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.token-limit-actions .login-btn:hover {
  background: linear-gradient(135deg, #dc4c1f 0%, #c94318 100%);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
  transform: translateY(-2px);
}
.token-limit-actions .login-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
}
.token-limit-actions .close-btn {
  padding: 12px 20px;
  background: rgba(234, 88, 12, 0.08);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.token-limit-actions .close-btn:hover {
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(234, 88, 12, 0.4);
}
.token-limit-actions .close-btn:active {
  transform: scale(0.98);
}
@media (max-width: 480px) {
  .token-limit-modal {
    max-width: 95vw !important;
  }

  .token-limit-actions {
    flex-direction: column !important;
  }

  .token-limit-actions .login-btn,
  .token-limit-actions .close-btn {
    width: 100%;
  }

  .benefits-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .benefit-icon {
    font-size: 20px;
  }
}
/* Desktop responsive styles - wider screens */
@media (min-width: 769px) {
  .chatbot-app {
    flex-direction: row;
  }

  .sidebar {
    width: 280px;
    position: relative;
    height: 100vh;
    transform: translateX(0) !important;
    z-index: auto;
  }

  .sidebar.closed {
    width: 0;
    transform: translateX(-100%);
  }

  .sidebar-backdrop {
    display: none !important;
  }

  .chat-container {
    flex: 1;
    width: auto;
    margin-left: 0;
  }

  .messages-section {
    width: 100%;
  }

  .input-container {
    width: 100%;
    max-width: 100%;
  }
}
/* Auth Forms Styling */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(180deg, #fff8f0 0%, #fff6e8 50%, #fffdf8 100%);
  padding: 20px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.auth-box {
  background: #ffffff;
  border: 1px solid #ffedd8;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(251, 146, 60, 0.12);
  padding: 36px;
  width: 100%;
  max-width: 520px;
  animation: slideUp 0.35s ease-out;
  position: relative;
  overflow: hidden;
}

.auth-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 140, 66, 0.06), transparent 30%);
  pointer-events: none;
}

.auth-box > * {
  position: relative;
  z-index: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-box h1 {
  text-align: center;
  font-size: 28px;
  margin: 0 0 6px 0;
  color: #3b2a1a;
  letter-spacing: 0.02em;
}

.auth-subtitle {
  text-align: center;
  color: #7f4f22;
  margin: 0 0 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

.error-message {
  background-color: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  color: #c33;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  animation: shake 0.3s ease-out;
}

/* Error message variants based on error type */
.error-message.user-not-found {
  background: linear-gradient(135deg, #fee 0%, #fef5f5 100%);
  border: 1px solid #fc9c9c;
  color: #d32f2f;
}

.error-message.wrong-password {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border: 1px solid #ffb74d;
  color: #e65100;
}

.error-message.validation {
  background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
  border: 1px solid #fbc02d;
  color: #f57f17;
}

.error-message.network {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  border: 1px solid #ce93d8;
  color: #7b1fa2;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 12px 14px;
  border: 1px solid #f2d6bf;
  border-radius: 12px;
  background: #fffaf5;
  color: #2f2b24;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.18s ease;
}

.form-group input::placeholder {
  color: #c99a6a;
}

.form-group input:focus {
  outline: none;
  border-color: #ff8c42;
  box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.08);
  background: #fff6ef;
}

.form-group input:disabled {
  background-color: #fff6ef;
  cursor: not-allowed;
  opacity: 0.9;
}

/* Password input wrapper */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.toggle-password:hover {
  opacity: 0.7;
}

.toggle-password:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

/* Password strength indicator */
.password-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.strength-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: #e0e0e0;
  overflow: hidden;
  position: relative;
}

.strength-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 2px;
}

.strength-bar.weak::after {
  width: 33%;
  background-color: #f44336;
}

.strength-bar.medium::after {
  width: 66%;
  background-color: #ff9800;
}

.strength-bar.strong::after {
  width: 100%;
  background-color: #4caf50;
}

.strength-text {
  font-size: 12px;
  color: #666;
  min-width: 40px;
}

/* Password match indicator */
.password-match {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.password-match.match {
  color: #4caf50;
}

.password-match.no-match {
  color: #f44336;
}

/* Buttons */
.auth-submit-btn {
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b00 100%);
  color: white;
  border: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(251, 146, 60, 0.24);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.guest-btn {
  background-color: #fffaf5;
  color: #3b2a1a;
  border: 1px solid #f2d6bf;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.guest-btn:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
}

.guest-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Divider */
.auth-divider {
  text-align: center;
  color: #c99a6a;
  margin: 18px 0;
  font-size: 13px;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background-color: rgba(148, 163, 184, 0.25);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #fff0e6;
}

.auth-footer p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.switch-auth-btn {
  background: none;
  border: none;
  color: #ff6b00;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  padding: 0;
  transition: color 0.18s ease;
}

.switch-auth-btn:hover:not(:disabled) {
  color: #c2410b;
}

.switch-auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Features list */
.auth-features {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #fff2ea;
}

.features-title {
  font-size: 12px;
  font-weight: 700;
  color: #7f4f22;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  letter-spacing: 0.4px;
}

.auth-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-features li {
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Terms */
.auth-terms {
  text-align: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #fff2ea;
  font-size: 11px;
  color: #7a7a7a;
}

.auth-terms p {
  margin: 4px 0;
}

/* Name Field Group - Prominent styling */
.name-field-group {
  background: linear-gradient(135deg, #fff6ef 0%, #fff9f5 100%);
  border: 2px solid #ffb8a3;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 8px;
  gap: 8px;
}

.name-field-label {
  font-size: 15px;
  font-weight: 700;
  color: #ff6b00;
  text-transform: none;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.name-field-description {
  font-size: 12px;
  color: #7f4f22;
  margin: 0;
  line-height: 1.4;
  font-weight: 500;
}

.name-field-input {
  padding: 14px 16px !important;
  border: 1.5px solid #f2d6bf !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #2f2b24 !important;
  font-size: 15px !important;
  font-weight: 500;
}

.name-field-input::placeholder {
  color: #d4a374 !important;
}

.name-field-input:focus {
  outline: none;
  border-color: #ff6b00 !important;
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.12) !important;
  background: #fffbf8 !important;
}

/* Responsive */
@media (max-width: 600px) {
  .auth-box {
    padding: 30px 20px;
    border-radius: 8px;
  }

  .auth-box h1 {
    font-size: 24px;
  }

  .auth-submit-btn {
    padding: 14px;
    font-size: 14px;
  }

  .form-group input {
    padding: 14px;
    font-size: 16px;
  }

  .auth-divider::before,
  .auth-divider::after {
    width: 35%;
  }
}

@media (max-width: 400px) {
  .auth-container {
    padding: 10px;
  }

  .auth-box {
    padding: 25px 15px;
  }

  .auth-box h1 {
    font-size: 22px;
  }

  .auth-subtitle {
    font-size: 12px;
  }
}
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #fff8f0 0%, #fff3da 45%, #fffdf5 100%);
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.login-box {
  background: #ffffff;
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 18px 50px rgba(251, 146, 60, 0.16);
  max-width: 450px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-box h1 {
  font-size: 32px;
  margin: 0 0 10px 0;
  color: #7c2d12;
}

.login-box h2 {
  font-size: 24px;
  margin: 0 0 15px 0;
  color: #92400e;
}

.subtitle {
  color: #926239;
  margin: 10px 0 30px 0;
  font-size: 14px;
}

/* User info styles */
.login-box.user-info {
  text-align: center;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 20px;
  border: 3px solid #fb923c;
  object-fit: cover;
}

.user-name {
  font-size: 20px;
  font-weight: 600;
  margin: 10px 0;
  color: #422006;
}

.user-email {
  font-size: 14px;
  color: #7c4f1e;
  margin: 5px 0 15px 0;
}

.guest-note {
  font-size: 12px;
  color: #b45309;
  background: #fff4e5;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 10px 0;
}

.logout-btn {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(251, 146, 60, 0.3);
}

/* Error message */
.error-message {
  background-color: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  color: #c33;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  animation: shake 0.3s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  background: #fff7f0;
  border: 2px solid #fb923c;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #92350b;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.google-login-btn:hover {
  border-color: #f97316;
  background: #fff1e6;
  box-shadow: 0 10px 18px rgba(251, 146, 60, 0.18);
}

.guest-login-btn,
.signup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  margin-bottom: 16px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.guest-login-btn {
  background: #f97316;
  color: white;
  border: 2px solid transparent;
}

.guest-login-btn:hover {
  background: #ea580c;
}

.signup-btn {
  background: #fb923c;
  color: white;
  border: 2px solid transparent;
}

.signup-btn:hover {
  background: #f97316;
}

.divider {
  margin: 20px 0;
  font-size: 14px;
  color: #999;
}

.signup-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.signup-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #f2c6a1;
  border-radius: 10px;
  font-size: 14px;
}

.signup-card input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.guest-note {
  margin-top: 10px;
  color: #555;
  font-size: 14px;
}

.google-icon {
  width: 20px;
  height: 20px;
}

.info-text {
  font-size: 14px;
  color: #666;
  margin: 20px 0 10px 0;
}

.features-list {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  font-size: 13px;
  color: #666;
}

.features-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.features-list li:last-child {
  border-bottom: none;
}

.error-message {
  background: #fee;
  color: #c00;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 13px;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 15px;
  border: 3px solid #fb923c;
}

.user-name {
  font-size: 18px;
  font-weight: 600;
  color: #422006;
  margin: 10px 0 5px 0;
}

.user-email {
  font-size: 13px;
  color: #7c4f1e;
  margin: 0 0 20px 0;
}

.logout-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: #f97316;
  box-shadow: 0 10px 20px rgba(251, 146, 60, 0.25);
}
/* ===== DOCUMENT EDITOR - MINIMAL & ANDROID-FRIENDLY ===== */
/* Clean, modern, touch-friendly design with subtle orange accent */

:root {
  --orange: #ff6b00;
  --orange-light: #fff6f0;
  --orange-border: #ffdcc0;
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #666;
  --border: #e8e8e8;
  --shadow: 0 1px 6px rgba(0,0,0,0.04);
  --radius: 10px;
  --radius-sm: 6px;
}

.document-editor-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ===== HEADER ===== */
.doc-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  gap: 10px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.back-to-chat-btn {
  padding: 5px 8px;
  background: transparent;
  color: var(--orange);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.back-to-chat-btn:active {
  background: var(--orange-light);
  transform: scale(0.96);
}

.doc-title-input {
  font-size: 14px;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: var(--text);
  padding: 8px 10px;
  flex: 1;
  min-width: 80px;
  max-width: 240px;
  border-radius: 12px;
  transition: all 0.18s ease;
}

.doc-title-input:focus {
  background: #ffffff;
  border-color: #c7d2fe;
  outline: none;
}

.doc-title-input::placeholder {
  color: #bbb;
}

/* ===== EDITOR TYPE SELECTOR ===== */
.editor-type-selector {
  display: flex;
  gap: 4px;
  background: #f8fafc;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}

.type-btn {
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.ppt-template-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.ppt-template-label {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.ppt-template-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ppt-template-btn {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #475569;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.18s ease;
}

.ppt-template-btn.active {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.3);
  color: #1d4ed8;
}

.ppt-template-btn:hover {
  background: #f8fafc;
}

.type-btn:active {
  transform: scale(0.97);
}

.type-btn.active {
  background: rgba(255, 107, 0, 0.12);
  color: var(--orange);
  box-shadow: none;
}

/* ===== HEADER BUTTONS ===== */
.export-btn {
  padding: 8px 12px;
  background: rgba(255, 107, 0, 0.12);
  color: var(--orange);
  border: 1px solid rgba(255, 107, 0, 0.2);
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.export-btn:active {
  transform: scale(0.97);
}

.export-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ppt-status {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--orange);
  background: var(--orange-light);
  border-radius: var(--radius-sm);
  animation: pulse 1.5s ease-in-out infinite;
}

.ppt-status.complete {
  color: #22c55e;
  background: #f0fdf4;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== PPT RESULTS PANEL ===== */
.ppt-results-panel {
  width: 280px;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  animation: slideInRight 0.2s ease;
}

.ppt-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(135deg, #fff6f0 0%, #ffffff 100%);
}

.ppt-results-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.3px;
}

.ppt-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}

.ppt-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.ppt-file-item:hover {
  background: #fafafa;
  border-color: var(--orange-border);
  transform: translateX(2px);
}

.ppt-file-item.uploaded {
  background: #f0fdf4;
  border-color: #dcfce7;
}

.ppt-file-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.ppt-file-info {
  flex: 1;
  min-width: 0;
}

.ppt-file-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppt-file-meta {
  display: flex;
  gap: 6px;
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
  flex-wrap: wrap;
}

.ppt-file-meta span {
  white-space: nowrap;
}

.ppt-file-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ppt-download-btn,
.ppt-view-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--orange-light);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.ppt-download-btn:active,
.ppt-view-btn:active {
  background: var(--orange-border);
  transform: scale(0.95);
}

.ppt-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  color: var(--text-secondary);
  text-align: center;
}

.ppt-empty-state p {
  margin: 4px 0;
  font-size: 12px;
}

.ppt-empty-hint {
  font-size: 10px !important;
  color: #999;
}

/* ===== PPTX LAYOUT - VERTICAL MODERN MINIMALIST ===== */
.pptx-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.pptx-editor-section {
  flex: 2;
  overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.pptx-chat-section {
  flex: 0.8;
  overflow-y: auto;
  background: #f8fafc;
  padding: 16px;
  display: flex;
  justify-content: center;
}

.pptx-chat-section .ai-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pptx-chat-section .ai-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.pptx-chat-section .ai-title {
  color: #f97316;
  font-size: 14px;
}

.pptx-chat-section .ai-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  gap: 10px;
}

.pptx-chat-section .ai-input-section {
  gap: 10px;
  align-items: flex-end;
}

.pptx-chat-section .message-input {
  width: 100% !important;
  min-height: 48px !important;
  max-height: 140px !important;
  padding: 14px 16px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  resize: none !important;
}

.pptx-chat-section .message-input:focus {
  outline: none !important;
  border-color: rgba(248, 113, 113, 0.7) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(254, 205, 211, 0.55) !important;
}
}

.pptx-chat-section .action-button {
  padding: 12px 16px;
  font-size: 14px;
}

.pptx-preview-section {
  flex: 1.5;
  overflow-y: auto;
  background: #f8f9fb;
  padding: 10px;
}

.pptx-preview-section .ppt-preview-inline {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pptx-preview-section .ppt-preview-header {
  padding: 10px 12px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
}

.pptx-preview-section .ppt-preview-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.pptx-preview-section .ppt-slide-display {
  background: transparent;
  border-radius: 12px;
  padding: 0;
  box-shadow: none;
  max-height: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pptx-preview-section .ppt-slide-number {
  font-size: 10px;
  margin-bottom: 6px;
}

.pptx-preview-section .ppt-slide-content-card {
  border-radius: 12px;
  padding: 16px;
  min-height: 200px;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pptx-preview-section .ppt-slide-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #111827;
  flex-shrink: 0;
}

.pptx-preview-section .ppt-slide-bullets {
  font-size: 13px;
  line-height: 1.7;
  color: #334155;
  margin: 0;
  padding-left: 20px;
  list-style: disc inside;
}

.pptx-preview-section .ppt-preview-controls {
  padding: 6px 10px;
  background: #fafbfc;
  border-top: 1px solid var(--border);
  gap: 4px;
}

.pptx-preview-section .ppt-nav-btn {
  padding: 4px 6px;
  font-size: 10px;
}

.pptx-preview-section .ppt-dot {
  width: 18px;
  height: 18px;
  font-size: 8px;
}

.ppt-preview-inline {
  margin: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ppt-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

.ppt-preview-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.ppt-slide-counter {
  background: var(--orange-light);
  color: var(--orange);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.ppt-preview-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--orange-light);
  color: var(--orange);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.ppt-preview-close:active {
  transform: scale(0.95);
  background: var(--orange-border);
}

.ppt-preview-content {
  padding: 18px;
}

.ppt-slide-display {
  background: #f6f8fb;
  border-radius: 18px;
  padding: 24px;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  max-height: 74vh;
  overflow-y: auto;
}

.ppt-slide-number {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.ppt-slide-content-card {
  background: white;
  border-radius: 18px;
  padding: 24px;
  min-height: 260px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.ppt-slide-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 18px;
  line-height: 1.2;
}

.ppt-slide-bullets {
  list-style: disc inside;
  padding-left: 0;
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.8;
}

.ppt-slide-bullets li {
  margin-bottom: 10px;
}

.ppt-slide-text {
  font-size: 15px;
  line-height: 1.75;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 100px;
}

.ppt-preview-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  gap: 8px;
}

.ppt-nav-btn {
  padding: 6px 12px;
  background: var(--orange-light);
  color: var(--orange);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.15s;
}

.ppt-nav-btn:active {
  transform: scale(0.95);
}

.ppt-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ppt-slide-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

.ppt-dot {
  width: 24px;
  height: 24px;
  border: none;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.15s;
  border: 1px solid var(--border);
}

.ppt-dot:hover {
  background: var(--orange-light);
  color: var(--orange);
  border-color: var(--orange);
}

.ppt-dot.active {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
  transform: scale(1.1);
}

.ai-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.ai-header-btn:active {
  background: #eef2ff;
  color: #1d4ed8;
}

/* ===== MAIN LAYOUT ===== */
.editor-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.editor-center {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-width: 0;
}

.editor-main {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
}

/* ===== TOOLBAR ===== */
.docx-editor-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.toolbar-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.toolbar-toggle:active {
  background: var(--orange-light);
  color: var(--orange);
}

.toolbar-label-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

.word-toolbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.toolbar-row {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  gap: 1px;
  align-items: center;
  background: var(--bg);
  border-radius: 5px;
  padding: 2px;
}

.toolbar-btn {
  padding: 3px 6px;
  background: transparent;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.1s;
  min-width: 24px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.toolbar-btn:active {
  background: var(--orange-light);
  color: var(--orange);
}

.toolbar-select {
  padding: 3px 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s;
}

.toolbar-select:focus {
  outline: none;
  border-color: var(--orange);
}

.toolbar-label {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
}

.toolbar-color {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
}

/* ===== TOOLBAR HEADER ACTIONS ===== */
.toolbar-header {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  gap: 6px;
  flex-shrink: 0;
}

.toolbar-header-actions {
  display: flex;
  gap: 3px;
  margin-left: auto;
}

/* ===== TABLE TOOLBAR ===== */
.table-toolbar {
  background: var(--orange-light);
  border-bottom: 1px solid var(--orange-border);
}

/* ===== IMAGE UPLOAD OVERLAY ===== */
.image-upload-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.image-upload-modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  min-width: 260px;
  text-align: center;
}

.image-upload-modal h4 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 15px;
}

.image-upload-modal input[type="file"] {
  margin-bottom: 14px;
  font-size: 13px;
}

/* ===== DOCX HEADER/FOOTER ===== */
.docx-header,
.docx-footer {
  font-size: 10px;
  color: #666;
}

/* ===== DOCX EDITOR ===== */
.docx-editor {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
}

.a4-container {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

.a4-page {
  width: 100%;
  max-width: 680px;
  min-height: 350px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  overflow: auto;
  box-sizing: border-box;
  font-family: 'Calibri', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  outline: none;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

/* Ensure paragraphs have visible spacing in the A4 page */
.a4-page p {
  margin: 0 0 12px;
  line-height: 1.6;
}
.a4-page p:last-child { margin-bottom: 0; }

/* List styling inside the a4 page to ensure wrapped lines align with text (hanging indent) */
.a4-page ul, .a4-page ol {
  margin: 0 0 12px 1.2em;
  padding: 0;
}
.a4-page ul { list-style: disc; }
.a4-page ol { list-style: decimal; }
.a4-page li {
  margin: 0 0 8px 0;
  padding-left: 0.2em;
}
.a4-page li p { margin: 0; }

.a4-page:focus {
  border-color: var(--orange-border);
}

/* ===== TABLE STYLING ===== */
.document-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  border: 1px solid var(--border);
  font-size: 12px;
}

.document-table-header {
  background: var(--orange-light);
  font-weight: 600;
  color: var(--orange);
}

.document-table th,
.document-table td {
  padding: 6px 8px;
  border: 1px solid var(--border);
  text-align: left;
}

.document-table tr:nth-child(even) {
  background: #fafafa;
}

/* ===== PPTX EDITOR ===== */
.pptx-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 680px;
}

.slide-container {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.slide {
  aspect-ratio: 16/9;
  background: #ffffff;
  padding: 22px;
  color: #111827;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  min-height: 0;
}

.slide-title {
  color: #0f172a;
}

.slide-content {
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.slide-content p,
.slide-content ul,
.slide-content li {
  margin: 0 0 10px;
}

.slide-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.slide-content {
  font-size: 13px;
  line-height: 1.5;
}

.slide-notes {
  padding: 10px 14px;
  background: var(--orange-light);
  font-size: 11px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

/* ===== EXCEL - REAL EXCEL LOOK ===== */
.excel-scroll {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #f0f0f0;
}

.spreadsheet {
  border-collapse: collapse;
  width: auto;
  min-width: 100%;
  background: var(--card);
  font-size: 12px;
  table-layout: fixed;
  border: 2px solid #999;
}

/* Column & Row Headers - Excel style */
.excel-corner {
  width: 40px;
  min-width: 40px;
  background: #e8e8e8;
  border: 1px solid #c0c0c0;
  border-top: 2px solid #999;
  border-left: 2px solid #999;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 3;
}

.excel-col-header {
  background: #e8e8e8;
  border: 1px solid #c0c0c0;
  border-top: 2px solid #999;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #333;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 2;
  min-width: 70px;
  user-select: none;
}

.excel-row-header {
  background: #e8e8e8;
  border: 1px solid #c0c0c0;
  border-left: 2px solid #999;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #333;
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 1;
  width: 40px;
  min-width: 40px;
  user-select: none;
}

/* Data Cells - Excel style with thin grid */
.excel-cell {
  border: 1px solid #d0d0d0;
  padding: 3px 5px;
  text-align: left;
  font-family: 'Calibri', 'Segoe UI', sans-serif;
  font-size: 11px;
  color: #222;
  background: white;
  cursor: cell;
  min-width: 70px;
  height: 24px;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.excel-cell:focus {
  background: white;
  box-shadow: inset 0 0 0 2px #4a90d9;
  z-index: 1;
  position: relative;
}

.excel-cell.excel-header-row {
  font-weight: 600;
  color: #222;
  background: #f5f5f5;
}

.spreadsheet tr:nth-child(even) .excel-cell:not(.excel-header-row) {
  background: white;
}

.spreadsheet tr:hover .excel-cell {
  background: #f0f8ff;
}

.spreadsheet tr:hover .excel-cell.excel-header-row {
  background: #f5f5f5;
}

/* ===== EXCEL FORMAT BAR ===== */
.excel-format-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.excel-format-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.excel-cell-ref {
  font-size: 10px;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-light);
  padding: 2px 6px;
  border-radius: 3px;
  min-width: 36px;
  text-align: center;
  white-space: nowrap;
}

.excel-cell-input {
  flex: 1;
  min-width: 50px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
}

.excel-cell-input:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--card);
}

.excel-format-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: wrap;
}

.ef-btn {
  padding: 2px 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.1s;
  min-width: 22px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.ef-btn:active {
  transform: scale(0.93);
}

.ef-btn.active {
  background: var(--orange-light);
  color: var(--orange);
  border-color: var(--orange-border);
}

.ef-sep {
  color: var(--border);
  font-size: 12px;
  margin: 0 1px;
  user-select: none;
}

.ef-label {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  position: relative;
  padding: 1px 3px;
  border-radius: 3px;
  transition: background 0.1s;
}

.ef-label:hover {
  background: var(--bg);
}

.ef-color {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.ef-select {
  padding: 2px 3px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10px;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
}

.ef-select:focus {
  outline: none;
  border-color: var(--orange);
}

/* Find/Replace Bar */
.excel-find-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: var(--orange-light);
  border-bottom: 1px solid var(--orange-border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ef-input {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 11px;
  color: var(--text);
  background: var(--card);
  min-width: 70px;
  flex: 1;
}

.ef-input:focus {
  outline: none;
  border-color: var(--orange);
}

.ef-btn-sm {
  padding: 3px 8px;
  border: 1px solid var(--orange-border);
  background: var(--card);
  color: var(--orange);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.ef-btn-sm:active {
  background: var(--orange);
  color: white;
}

/* ===== EXCEL EDITOR - ADVANCED ===== */
.excel-editor {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Sheet Tabs */
.excel-tabs {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 3px 6px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.excel-tab {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.excel-tab.active {
  color: var(--orange);
  font-weight: 600;
  border-color: var(--orange-border);
  background: var(--card);
  position: relative;
}

.excel-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card);
}

.excel-tab:active {
  transform: scale(0.97);
}

.excel-tab-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 9px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.excel-tab-close:hover {
  background: rgba(0,0,0,0.06);
  color: #e00;
}

.excel-tab-add {
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 5px 5px 0 0;
  transition: all 0.15s;
  flex-shrink: 0;
}

.excel-tab-add:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* Excel Toolbar */
.excel-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.excel-toolbar-btn {
  padding: 3px 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.excel-toolbar-btn:active {
  transform: scale(0.96);
  background: var(--orange-light);
}

.excel-toolbar-btn:hover {
  border-color: var(--orange-border);
  color: var(--orange);
}

.excel-dimension {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== AI PANEL ===== */
.ai-panel {
  width: 280px;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 2px 5px;
  border-radius: 3px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.close-btn:active {
  background: var(--orange-light);
  color: var(--orange);
}

.ai-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  overflow-y: auto;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

/* ===== AI INPUT ===== */
.ai-input-section {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 250, 0.95) 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  margin: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.textarea-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
}

.message-input {
  width: 100%;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  resize: none;
  line-height: 1.4;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  font-weight: 500;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

.message-input:focus {
  border-color: var(--orange);
  outline: none;
  background: linear-gradient(135deg, #ffffff 0%, #fff8f3 100%);
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.04),
    0 0 0 3px rgba(255, 140, 40, 0.1),
    0 4px 16px rgba(255, 140, 40, 0.15);
  transform: translateY(-1px);
}

.message-input::placeholder {
  color: rgba(100, 100, 100, 0.5);
  font-weight: 400;
}

.action-button {
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.3px;
}

.action-button.send-mode {
  background: linear-gradient(135deg, var(--orange) 0%, #ff9500 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 140, 40, 0.3);
}

.action-button.send-mode:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 140, 40, 0.4);
}

.action-button.send-mode:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 140, 40, 0.25);
}

.action-button.stop-mode {
  background: linear-gradient(135deg, rgba(255, 140, 40, 0.08) 0%, rgba(255, 140, 40, 0.05) 100%);
  color: var(--orange);
  border: 1.5px solid var(--orange);
  box-shadow: 0 2px 8px rgba(255, 140, 40, 0.12);
}

.action-button.stop-mode:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(255, 140, 40, 0.12) 0%, rgba(255, 140, 40, 0.08) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 40, 0.2);
}

.action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== AI RESPONSE ===== */
.ai-response-compact {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  max-height: 160px;
  overflow-y: auto;
}

.ai-response-compact.streaming {
  border-color: var(--orange);
  background: var(--orange-light);
}

.response-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--orange-border);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-response-content {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

.response-line {
  margin: 3px 0;
  word-wrap: break-word;
}

.response-more {
  margin: 3px 0 0;
  color: #aaa;
  font-style: italic;
  text-align: center;
  font-size: 11px;
}

/* ===== STREAMING ===== */
.streaming-dot {
  color: var(--orange);
  font-size: 9px;
  animation: pulse-dot 1s infinite;
}

.streaming-cursor {
  color: var(--orange);
  font-size: 13px;
  font-weight: bold;
  animation: cursor-blink 0.8s infinite;
  margin-top: 4px;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ===== STATUS MESSAGES ===== */
.generation-status {
  padding: 6px 8px;
  background: var(--orange-light);
  border-left: 3px solid var(--orange);
  border-radius: 3px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 600;
}

.error-message {
  padding: 6px 8px;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  border-radius: 3px;
  color: #dc2626;
  font-size: 11px;
  font-weight: 600;
}

/* ===== MODERN ARTIFACTS PANEL ===== */
.artifact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.18s ease;
  line-height: 1;
}

.artifact-btn:active {
  transform: scale(0.96);
  background: #eef2ff;
}

.artifact-btn.active {
  background: rgba(255, 107, 0, 0.14);
  color: var(--orange);
  transform: none;
}

.artifacts-panel {
  width: 280px;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  animation: slideInRight 0.2s ease;
}

@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.artifacts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(135deg, #fff6f0 0%, #ffffff 100%);
}

.artifacts-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.3px;
}

.artifacts-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auto-regen-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.15s;
  user-select: none;
}

.auto-regen-toggle:hover {
  background: var(--bg);
}

.auto-regen-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--orange);
  cursor: pointer;
}

.artifacts-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}

.artifacts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  text-align: center;
  color: var(--text-secondary);
}

.artifacts-empty p {
  margin: 4px 0;
  font-size: 13px;
}

.artifacts-empty .artifacts-hint {
  font-size: 11px;
  color: #aaa;
}

.artifact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  position: relative;
}

.artifact-item:hover {
  background: var(--bg);
  border-color: var(--border);
}

.artifact-item:active {
  transform: scale(0.98);
}

.artifact-item.active {
  background: var(--orange-light);
  border-color: var(--orange-border);
}

/* Chat-style input modern styling */
.ai-input-section .message-input,
.ai-panel .message-input {
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-input-section .message-input:focus,
.ai-panel .message-input:focus {
  outline: none;
  border-color: var(--orange);
  background: linear-gradient(135deg, #ffffff 0%, #fff8f3 100%);
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.04),
    0 0 0 3px rgba(255, 140, 40, 0.1),
    0 4px 16px rgba(255, 140, 40, 0.15);
  transform: translateY(-1px);
}

.pptx-chat-section .ai-input-section .message-input,
.pptx-chat-section .ai-panel .message-input {
  border: 1px solid #d1d5db;
  background: #f8fafc;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  padding: 14px 16px;
  border-radius: 14px;
  color: #0f172a;
  font-size: 14px;
  min-height: 48px;
  max-height: 140px;
}

.pptx-chat-section .ai-input-section .message-input:focus,
.pptx-chat-section .ai-panel .message-input:focus {
  outline: none;
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(254, 205, 211, 0.55);
  background: #ffffff;
}

.artifact-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 8px;
}

.artifact-item.active .artifact-icon {
  background: white;
}

.artifact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.artifact-prompt {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.artifact-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-secondary);
}

.artifact-type {
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-light);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.artifact-time {
  color: #aaa;
}

.artifact-delete {
  border: none;
  background: transparent;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s;
  opacity: 0;
  flex-shrink: 0;
  line-height: 1;
}

.artifact-item:hover .artifact-delete {
  opacity: 1;
}

.artifact-delete:hover {
  color: #ef4444;
  background: #fef2f2;
}

/* ===== AI HEADER CONTROLS ===== */
.ai-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== SCROLLBAR ===== */
.editor-main::-webkit-scrollbar,

.docx-editor::-webkit-scrollbar,
.ai-content::-webkit-scrollbar {
  width: 4px;
}

.editor-main::-webkit-scrollbar-track,
.docx-editor::-webkit-scrollbar-track,
.ai-content::-webkit-scrollbar-track {
  background: transparent;
}

.editor-main::-webkit-scrollbar-thumb,
.docx-editor::-webkit-scrollbar-thumb,
.ai-content::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

/* ===== PRINT ===== */
@media print {
  body, .document-editor-container, .editor-main {
    background: white !important;
  }
  .a4-page {
    box-shadow: none;
    border: none;
    padding: 20mm;
    max-width: none;
  }
  .doc-editor-header,
  .toolbar-header,
  .word-toolbar,
  .ai-panel {
    display: none !important;
  }
}

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 900px) {
  .ai-panel {
    width: 240px;
  }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
  .doc-editor-header {
    padding: 4px 8px;
  }

  .doc-title-input {
    font-size: 13px;
    max-width: 120px;
  }

  .back-to-chat-btn {
    padding: 4px 6px;
    font-size: 11px;
  }

  .type-btn {
    padding: 4px 6px;
    font-size: 10px;
  }

  .export-btn {
    padding: 4px 6px;
    font-size: 12px;
  }

  .ai-header-btn {
    display: inline-flex;
    padding: 4px 6px;
    font-size: 11px;
  }

  .editor-layout {
    flex-direction: column;
  }

  .editor-main {
    padding: 6px;
  }

  .docx-editor {
    padding: 6px;
  }

  .a4-page {
    padding: 14px 16px;
    min-height: 280px;
    border-radius: var(--radius-sm);
  }

  .slide {
    padding: 14px;
  }

  .slide-title {
    font-size: 16px;
  }

  .slide-content {
    font-size: 12px;
  }

  .ai-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 45vh;
  }

  .toolbar-header {
    padding: 3px 6px;
  }

  .word-toolbar {
    padding: 4px 6px;
  }

  .toolbar-btn {
    padding: 3px 5px;
    font-size: 11px;
    min-width: 22px;
  }

  .toolbar-select {
    font-size: 9px;
    padding: 2px 3px;
  }
}

/* ===== RESPONSIVE: SMALL PHONE ===== */
@media (max-width: 480px) {
  .doc-editor-header {
    padding: 3px 6px;
    gap: 3px;
  }

  .header-left {
    gap: 3px;
  }

  .header-right {
    gap: 3px;
  }

  .doc-title-input {
    font-size: 12px;
    max-width: 80px;
    padding: 3px 4px;
  }

  .back-to-chat-btn {
    padding: 3px 5px;
    font-size: 10px;
  }

  .type-btn {
    padding: 3px 5px;
    font-size: 9px;
  }

  .editor-type-selector {
    gap: 1px;
    padding: 1px;
  }

  .export-btn {
    padding: 3px 5px;
    font-size: 11px;
  }

  .ai-header-btn {
    padding: 3px 5px;
    font-size: 10px;
  }

  .editor-main {
    padding: 3px;
  }

  .docx-editor {
    padding: 3px;
  }

  .a4-page {
    padding: 10px 12px;
    min-height: 220px;
    font-size: 13px;
    border-radius: 4px;
  }

  .ai-panel {
    max-height: 40vh;
    padding: 0;
  }

  .ai-header {
    padding: 6px 8px;
  }

  .ai-content {
    padding: 6px 8px;
  }

  .message-input {
    font-size: 12px;
    padding: 6px 8px;
    min-height: 32px;
  }

  .action-button {
    padding: 6px 8px;
    font-size: 11px;
  }

  .toolbar-header {
    padding: 2px 4px;
  }

  .toolbar-toggle {
    padding: 2px 4px;
    font-size: 11px;
  }

  .word-toolbar {
    padding: 3px 4px;
    gap: 3px;
  }

  .toolbar-row {
    gap: 3px;
  }

  .toolbar-group {
    padding: 1px;
  }

  .toolbar-btn {
    padding: 2px 4px;
    font-size: 10px;
    min-width: 20px;
  }

  .toolbar-select {
    font-size: 8px;
    padding: 1px 2px;
  }

  .slide {
    padding: 10px;
  }

  .slide-title {
    font-size: 14px;
  }

  .slide-content {
    font-size: 11px;
  }

  .excel-cell {
    padding: 4px 6px;
    font-size: 11px;
    min-width: 50px;
    height: 28px;
  }

  .artifacts-panel {
    width: 100%;
    max-height: 50vh;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .artifact-item {
    padding: 8px 10px;
  }

  .artifact-prompt {
    font-size: 11px;
  }

  .artifact-meta {
    font-size: 9px;
  }
}

.cookie-consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-consent-modal {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 2px solid #e0e7ff;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-consent-header {
  margin-bottom: 20px;
}

.cookie-consent-header h2 {
  margin: 0;
  font-size: 24px;
  color: #1a202c;
  font-weight: 700;
}

.cookie-consent-body {
  margin-bottom: 24px;
  line-height: 1.6;
}

.cookie-consent-body p {
  margin: 12px 0;
  color: #4a5568;
  font-size: 14px;
}

.cookie-consent-body p:first-child {
  margin-top: 0;
  font-weight: 600;
}

.cookie-consent-body ul {
  list-style: none;
  padding: 12px 0;
  margin: 12px 0;
}

.cookie-consent-body li {
  padding: 8px 0;
  color: #2d3748;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.cookie-note {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 12px;
  border-radius: 4px;
  color: #92400e;
  margin: 16px 0 !important;
  font-size: 13px;
}

.cookie-consent-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-accept-all,
.btn-reject {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-accept-all {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-accept-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-accept-all:active {
  transform: translateY(0);
}

.btn-reject {
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-reject:disabled {
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
}

.cookie-footer {
  text-align: center;
  font-size: 12px;
  color: #718096;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .cookie-consent-modal {
    padding: 24px;
    max-width: 95%;
  }

  .cookie-consent-header h2 {
    font-size: 20px;
  }

  .cookie-consent-body p {
    font-size: 13px;
  }

  .cookie-consent-body li {
    font-size: 13px;
  }

  .btn-accept-all,
  .btn-reject {
    padding: 10px 12px;
    font-size: 13px;
  }
}
body {
  margin: 0;
  padding: 0;
}

#root {
  height: 100vh;
}

* {
  box-sizing: border-box;
}

.hero {
  position: relative;
}

.hero .base,
.hero .framework,
.hero .vite {
  inset-inline: 0;
  margin: 0 auto;
}

.hero .base {
  width: 170px;
  position: relative;
  z-index: 0;
}

.hero .framework,
.hero .vite {
  position: absolute;
}

.hero .framework {
  z-index: 1;
  top: 34px;
  height: 28px;
  transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
    scale(1.4);
}

.hero .vite {
  z-index: 0;
  top: 107px;
  height: 26px;
  width: auto;
  transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
    scale(0.8);
}

#center {
  display: flex;
  flex-direction: column;
  gap: 25px;
  place-content: center;
  place-items: center;
  flex-grow: 1;
}

#next-steps {
  display: flex;
  border-top: 1px solid var(--border);
  text-align: left;
}

#next-steps > div {
  flex: 1 1 0;
  padding: 32px;
}

#next-steps .icon {
  margin-bottom: 16px;
  width: 22px;
  height: 22px;
}

#docs {
  border-right: 1px solid var(--border);
}

#next-steps ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
  margin: 32px 0 0;
}

#next-steps ul .logo {
  height: 18px;
}

#next-steps ul a {
  color: var(--text-h);
  font-size: 16px;
  border-radius: 6px;
  background: var(--social-bg);
  display: flex;
  padding: 6px 12px;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: box-shadow 0.3s;
}

#next-steps ul a:hover {
  box-shadow: var(--shadow);
}

#next-steps ul a .button-icon {
  height: 18px;
  width: 18px;
}

#spacer {
  height: 88px;
  border-top: 1px solid var(--border);
}

.ticks {
  position: relative;
  width: 100%;
}

.ticks::before,
.ticks::after {
  content: '';
  position: absolute;
  top: -4.5px;
  border: 5px solid transparent;
}

.ticks::before {
  left: 0;
  border-left-color: var(--border);
}

.ticks::after {
  right: 0;
  border-right-color: var(--border);
}

/* Mobile responsive styles */
@media (max-width: 1024px) {
  #center {
    padding: 32px 20px 24px;
    gap: 18px;
  }
}

@media (max-width: 1024px) {
  #next-steps > div {
    padding: 24px 20px;
  }
}

@media (max-width: 1024px) {
  #next-steps {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 1024px) {
  #docs {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 1024px) {
  #next-steps ul {
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  #next-steps ul li {
    flex: 1 1 calc(50% - 8px);
  }

  #next-steps ul a {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

@media (max-width: 1024px) {
  #spacer {
    height: 48px;
  }
}
