main.css 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. @import url('fonts.css');
  2. /* ===== BASE STYLES ===== */
  3. * {
  4. margin: 0;
  5. padding: 0;
  6. box-sizing: border-box;
  7. }
  8. body {
  9. overflow: hidden;
  10. font-family: 'Montserrat', 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  11. font-weight: 400;
  12. background-color: rgb(31, 25, 60);
  13. height: 100vh;
  14. }
  15. a {
  16. text-decoration: none;
  17. color: inherit;
  18. }
  19. /* ===== LAYOUT ===== */
  20. .app-container {
  21. display: flex;
  22. height: 100vh;
  23. background-color: rgb(31, 25, 60);
  24. }
  25. /* ===== SIDEBAR ===== */
  26. .sidebar {
  27. width: 350px;
  28. min-width: 300px;
  29. background-color: rgb(26, 21, 50);
  30. border-right: 2px solid rgb(45, 55, 89);
  31. display: flex;
  32. flex-direction: column;
  33. height: 100vh;
  34. }
  35. .settings-header {
  36. padding: 15px;
  37. border-bottom: 1px solid rgb(45, 55, 89);
  38. }
  39. .menu {
  40. background: transparent;
  41. border: none;
  42. cursor: pointer;
  43. padding: 8px;
  44. border-radius: 5px;
  45. transition: background-color 0.3s ease;
  46. }
  47. .menu:hover {
  48. background-color: rgb(43, 35, 82);
  49. }
  50. .settings-icon {
  51. width: 30px;
  52. height: 30px;
  53. object-fit: cover;
  54. }
  55. .chats-list {
  56. flex: 1;
  57. overflow-y: auto;
  58. padding: 10px 0;
  59. }
  60. /* ===== CHAT ITEM ===== */
  61. .chat-elem {
  62. display: flex;
  63. align-items: center;
  64. padding: 15px;
  65. transition: background-color 0.3s ease;
  66. border-bottom: 1px solid rgba(45, 55, 89, 0.5);
  67. }
  68. .chat-elem:hover {
  69. background-color: rgb(43, 35, 82);
  70. }
  71. .avatar-image {
  72. width: 50px;
  73. height: 50px;
  74. border-radius: 50%;
  75. object-fit: cover;
  76. margin-right: 15px;
  77. flex-shrink: 0;
  78. }
  79. .chat-info {
  80. flex: 1;
  81. min-width: 0;
  82. }
  83. .chat-name {
  84. font-size: 16px;
  85. color: rgb(229, 228, 238);
  86. margin-bottom: 5px;
  87. white-space: nowrap;
  88. overflow: hidden;
  89. text-overflow: ellipsis;
  90. }
  91. .last-massege {
  92. font-size: 13px;
  93. color: rgb(204, 204, 204);
  94. white-space: nowrap;
  95. overflow: hidden;
  96. text-overflow: ellipsis;
  97. }
  98. /* ===== MAIN CHAT AREA ===== */
  99. .chat-area {
  100. flex: 1;
  101. display: flex;
  102. flex-direction: column;
  103. height: 100vh;
  104. background-color: rgb(35, 29, 70);
  105. }
  106. .chat-header {
  107. padding: 15px 20px;
  108. border-bottom: 2px solid rgb(57, 70, 112);
  109. background-color: rgb(26, 21, 50);
  110. }
  111. .chat-title {
  112. font-size: 18px;
  113. color: rgb(229, 228, 238);
  114. }
  115. /* ===== MESSAGES CONTAINER ===== */
  116. .massages {
  117. flex: 1;
  118. overflow-y: auto;
  119. padding: 20px;
  120. display: flex;
  121. flex-direction: column;
  122. gap: 15px;
  123. max-height: calc(100vh - 140px);
  124. }
  125. /* ===== MESSAGE STYLES ===== */
  126. .massage {
  127. display: flex;
  128. align-items: flex-start;
  129. gap: 10px;
  130. max-width: 70%;
  131. }
  132. .massage-from-me {
  133. align-self: flex-end;
  134. flex-direction: row-reverse;
  135. }
  136. .avatar-massage {
  137. width: 35px;
  138. height: 35px;
  139. border-radius: 50%;
  140. object-fit: cover;
  141. flex-shrink: 0;
  142. margin-top: 5px;
  143. }
  144. .message-content {
  145. background-color: rgb(53, 20, 161);
  146. padding: 12px 15px;
  147. border-radius: 18px;
  148. max-width: 100%;
  149. word-wrap: break-word;
  150. }
  151. .massage-from-me .message-content {
  152. background-color: rgb(82, 55, 240);
  153. }
  154. .massage-text {
  155. color: rgb(229, 228, 238);
  156. margin: 0;
  157. line-height: 1.4;
  158. font-size: 14px;
  159. }
  160. /* ===== MESSAGE INPUT ===== */
  161. .message-input-container {
  162. padding: 20px;
  163. background-color: rgb(26, 21, 50);
  164. border-top: 2px solid rgb(57, 70, 112);
  165. }
  166. .type-massage {
  167. display: flex;
  168. gap: 10px;
  169. align-items: center;
  170. }
  171. .type-massage-input {
  172. flex: 1;
  173. height: 45px;
  174. padding: 0 15px;
  175. border: 2px solid rgb(45, 55, 89);
  176. border-radius: 25px;
  177. background-color: rgb(68, 83, 130);
  178. color: rgb(229, 228, 238);
  179. font-size: 14px;
  180. outline: none;
  181. transition: border-color 0.3s ease;
  182. }
  183. .type-massage-input:focus {
  184. border-color: rgb(82, 55, 240);
  185. }
  186. .type-massage-input::placeholder {
  187. color: rgb(204, 204, 204);
  188. }
  189. .send-massage {
  190. height: 45px;
  191. padding: 0 20px;
  192. background-color: rgb(82, 55, 240);
  193. color: rgb(229, 228, 238);
  194. border: none;
  195. border-radius: 25px;
  196. cursor: pointer;
  197. font-size: 14px;
  198. transition: background-color 0.3s ease;
  199. }
  200. .send-massage:hover {
  201. background-color: rgb(102, 75, 255);
  202. }
  203. /* ===== SCROLLBAR ===== */
  204. .massages::-webkit-scrollbar {
  205. width: 8px;
  206. }
  207. .massages::-webkit-scrollbar-track {
  208. background: rgba(45, 55, 89, 0.3);
  209. border-radius: 4px;
  210. margin: 5px 0;
  211. }
  212. .massages::-webkit-scrollbar-thumb {
  213. background: linear-gradient(180deg,
  214. rgba(82, 55, 240, 0.8) 0%,
  215. rgba(53, 20, 161, 0.8) 100%);
  216. border-radius: 4px;
  217. border: 2px solid transparent;
  218. background-clip: content-box;
  219. }
  220. .massages::-webkit-scrollbar-thumb:hover {
  221. background: linear-gradient(180deg,
  222. rgba(102, 75, 255, 0.9) 0%,
  223. rgba(73, 40, 181, 0.9) 100%);
  224. }
  225. .chats-list::-webkit-scrollbar {
  226. width: 6px;
  227. }
  228. .chats-list::-webkit-scrollbar-thumb {
  229. background: rgba(255, 255, 255, 0.2);
  230. border-radius: 3px;
  231. }
  232. /* ===== RESPONSIVE DESIGN ===== */
  233. @media (max-width: 768px) {
  234. .app-container {
  235. flex-direction: column;
  236. }
  237. .sidebar {
  238. width: 100%;
  239. height: auto;
  240. max-height: 40vh;
  241. }
  242. .chat-area {
  243. height: 60vh;
  244. }
  245. .massage {
  246. max-width: 85%;
  247. }
  248. .type-massage-input {
  249. font-size: 16px; /* Prevent zoom on iOS */
  250. }
  251. }
  252. /* ===== UTILITY CLASSES ===== */
  253. .no-messages {
  254. text-align: center;
  255. color: rgb(204, 204, 204);
  256. padding: 40px 20px;
  257. font-style: italic;
  258. }
  259. .loading {
  260. display: flex;
  261. justify-content: center;
  262. padding: 20px;
  263. color: rgb(204, 204, 204);
  264. }