| | * { |
| | box-sizing: border-box; |
| | font-family: 'Roboto', sans-serif; |
| | } |
| |
|
| | body { |
| | margin: 0; |
| | background-image: url("https://th.bing.com/th/id/R.5703545e7adb856bbb7f70acf1881184?rik=E7MaJ3%2fN93efGA&riu=http%3a%2f%2fmedia.techeblog.com%2fimages%2fblack-hole-event-horizon.jpg&ehk=BzpbiGJNjqV3OG4GIUxCQubYD1PsEpgP5IyCs0T4eVY%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1"); |
| | background-size: cover; |
| | background-repeat: no-repeat; |
| | background-position: center; |
| | display: flex; |
| | justify-content: center; |
| | align-items: center; |
| | min-height: 100vh; |
| | } |
| |
|
| | .container { |
| | width: 100%; |
| | max-width: 500px; |
| | background: white; |
| | padding: 1rem; |
| | border-radius: 10px; |
| | box-shadow: 0 4px 10px rgba(0,0,0,0.1); |
| | } |
| |
|
| | .hidden { |
| | display: none; |
| | } |
| |
|
| | .form-group { |
| | display: flex; |
| | flex-direction: column; |
| | margin-bottom: 1rem; |
| | } |
| |
|
| | input { |
| | padding: 10px; |
| | margin-top: 4px; |
| | border: 1px solid #ccc; |
| | border-radius: 6px; |
| | } |
| |
|
| | button { |
| | padding: 10px; |
| | background: #4CAF50; |
| | color: white; |
| | border: none; |
| | border-radius: 6px; |
| | cursor: pointer; |
| | } |
| |
|
| | .chat-box { |
| | height: 300px; |
| | overflow-y: auto; |
| | margin-bottom: 10px; |
| | background: #f9f9f9; |
| | padding: 10px; |
| | border-radius: 6px; |
| | } |
| |
|
| | .message { |
| | margin: 5px 0; |
| | max-width: 80%; |
| | padding: 8px 12px; |
| | border-radius: 12px; |
| | clear: both; |
| | } |
| |
|
| | .mine { |
| | background-color: #d2f8d2; |
| | float: right; |
| | } |
| |
|
| | .other { |
| | background-color: #f0d4d4; |
| | float: left; |
| | } |
| |
|
| | .switch { |
| | text-align: center; |
| | margin-top: 1rem; |
| | } |
| |
|
| | .google-btn { |
| | background-color: #4285f4; |
| | margin-top: 5px; |
| | } |
| |
|
| | |
| | #inputArea { |
| | display: flex; |
| | padding: 10px; |
| | background: #fff; |
| | border-top: 1px solid #ccc; |
| | gap: 8px; |
| | align-items: center; |
| | } |
| |
|
| | #inputArea input[type="text"] { |
| | flex: 1; |
| | padding: 10px; |
| | border-radius: 20px; |
| | border: 1px solid #ccc; |
| | } |
| |
|
| | input[type="file"] { |
| | display: none; |
| | } |
| |
|
| | .media-btn { |
| | background: none; |
| | border: none; |
| | font-size: 20px; |
| | cursor: pointer; |
| | padding: 5px; |
| | border-radius: 50%; |
| | } |
| |
|
| | .media-btn:hover { |
| | background: #f0f0f0; |
| | } |
| |
|
| | #mediaPreview { |
| | padding: 10px; |
| | display: flex; |
| | flex-wrap: wrap; |
| | gap: 10px; |
| | border-top: 1px solid #ccc; |
| | background: #fafafa; |
| | } |
| |
|
| | #mediaPreview img, #mediaPreview video { |
| | max-width: 80px; |
| | max-height: 80px; |
| | border-radius: 8px; |
| | cursor: pointer; |
| | } |
| |
|
| | .message img { |
| | max-width: 200px; |
| | border-radius: 8px; |
| | margin-top: 5px; |
| | } |
| |
|
| | .message video { |
| | max-width: 200px; |
| | border-radius: 8px; |
| | margin-top: 5px; |
| | } |
| |
|
| | .upload-progress { |
| | background: #e0e0e0; |
| | border-radius: 10px; |
| | overflow: hidden; |
| | margin: 5px 0; |
| | } |
| |
|
| | .upload-progress-bar { |
| | height: 20px; |
| | background: #4CAF50; |
| | transition: width 0.3s ease; |
| | display: flex; |
| | align-items: center; |
| | justify-content: center; |
| | color: white; |
| | font-size: 12px; |
| | } |
| |
|
| | |
| | .chat-header { |
| | display: flex; |
| | align-items: center; |
| | padding: 10px; |
| | background: #4CAF50; |
| | color: white; |
| | gap: 10px; |
| | } |
| |
|
| | .chat-header h2 { |
| | margin: 0; |
| | flex: 1; |
| | } |
| |
|
| | .menu-btn { |
| | background: none; |
| | border: none; |
| | color: white; |
| | font-size: 18px; |
| | cursor: pointer; |
| | padding: 5px; |
| | border-radius: 3px; |
| | } |
| |
|
| | .menu-btn:hover { |
| | background: rgba(255,255,255,0.2); |
| | } |
| |
|
| | #current-room-name { |
| | font-size: 14px; |
| | opacity: 0.8; |
| | background: rgba(255,255,255,0.2); |
| | padding: 4px 8px; |
| | border-radius: 10px; |
| | } |
| |
|
| | .chat-container { |
| | display: flex; |
| | height: 400px; |
| | position: relative; |
| | } |
| |
|
| | .room-sidebar { |
| | width: 250px; |
| | background: #f8f9fa; |
| | border-right: 1px solid #ddd; |
| | transform: translateX(-100%); |
| | transition: transform 0.3s ease; |
| | overflow-y: auto; |
| | } |
| |
|
| | .room-sidebar.show { |
| | transform: translateX(0); |
| | } |
| |
|
| | .sidebar-header { |
| | padding: 15px; |
| | border-bottom: 1px solid #ddd; |
| | background: white; |
| | } |
| |
|
| | .sidebar-header h3 { |
| | margin: 0 0 10px 0; |
| | font-size: 16px; |
| | } |
| |
|
| | .room-search-input { |
| | width: 100%; |
| | padding: 8px 12px; |
| | border: 1px solid #ddd; |
| | border-radius: 5px; |
| | margin-bottom: 10px; |
| | font-size: 14px; |
| | } |
| |
|
| | .room-search-input:focus { |
| | outline: none; |
| | border-color: #4CAF50; |
| | } |
| |
|
| | .room-actions { |
| | display: flex; |
| | gap: 5px; |
| | } |
| |
|
| | .create-room-btn, .join-room-btn { |
| | background: #007bff; |
| | color: white; |
| | border: none; |
| | padding: 8px 12px; |
| | border-radius: 5px; |
| | cursor: pointer; |
| | font-size: 12px; |
| | flex: 1; |
| | } |
| |
|
| | .join-room-btn { |
| | background: #28a745; |
| | } |
| |
|
| | .create-room-btn:hover { |
| | background: #0056b3; |
| | } |
| |
|
| | .join-room-btn:hover { |
| | background: #1e7e34; |
| | } |
| |
|
| | .search-results { |
| | border-top: 1px solid #ddd; |
| | margin-top: 10px; |
| | padding-top: 10px; |
| | } |
| |
|
| | .search-results h4 { |
| | margin: 0 0 10px 10px; |
| | font-size: 14px; |
| | color: #666; |
| | } |
| |
|
| | .search-results.hidden { |
| | display: none; |
| | } |
| |
|
| | .room-list { |
| | padding: 10px; |
| | } |
| |
|
| | .room-item { |
| | display: flex; |
| | align-items: center; |
| | padding: 10px; |
| | margin-bottom: 5px; |
| | background: white; |
| | border: 1px solid #e0e0e0; |
| | border-radius: 8px; |
| | cursor: pointer; |
| | transition: all 0.2s; |
| | } |
| |
|
| | .room-item:hover { |
| | background: #f0f0f0; |
| | border-color: #4CAF50; |
| | } |
| |
|
| | .room-item.active { |
| | background: #e8f5e8; |
| | border-color: #4CAF50; |
| | } |
| |
|
| | .room-info { |
| | flex: 1; |
| | } |
| |
|
| | .room-name { |
| | font-weight: 500; |
| | margin-bottom: 2px; |
| | } |
| |
|
| | .room-last-message { |
| | font-size: 12px; |
| | color: #666; |
| | white-space: nowrap; |
| | overflow: hidden; |
| | text-overflow: ellipsis; |
| | } |
| |
|
| | .room-unread { |
| | background: #ff4444; |
| | color: white; |
| | border-radius: 10px; |
| | padding: 2px 6px; |
| | font-size: 10px; |
| | margin-left: 5px; |
| | } |
| |
|
| | .room-item.search-result { |
| | border-left: 3px solid #007bff; |
| | } |
| |
|
| | .room-item.search-result .room-info { |
| | position: relative; |
| | } |
| |
|
| | .room-join-btn { |
| | background: #28a745; |
| | color: white; |
| | border: none; |
| | padding: 4px 8px; |
| | border-radius: 3px; |
| | font-size: 10px; |
| | cursor: pointer; |
| | margin-left: 5px; |
| | } |
| |
|
| | .room-join-btn:hover { |
| | background: #1e7e34; |
| | } |
| |
|
| | .room-member-count { |
| | font-size: 11px; |
| | color: #888; |
| | margin-top: 2px; |
| | } |
| |
|
| | .no-results { |
| | padding: 20px; |
| | text-align: center; |
| | color: #666; |
| | font-style: italic; |
| | } |
| |
|
| | .chat-main { |
| | flex: 1; |
| | display: flex; |
| | flex-direction: column; |
| | } |
| |
|
| | @media (max-width: 768px) { |
| | .room-sidebar { |
| | position: absolute; |
| | top: 0; |
| | left: 0; |
| | height: 100%; |
| | z-index: 1000; |
| | box-shadow: 2px 0 5px rgba(0,0,0,0.1); |
| | } |
| | |
| | .chat-container { |
| | height: 350px; |
| | } |
| | } |
| |
|