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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fa" dir="rtl">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>چتروم شیشهای مات | Modern Liquid Glass</title>
|
| 7 |
+
|
| 8 |
+
<!-- Importing Vazirmatn Font for Persian -->
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
|
| 10 |
+
<!-- Importing FontAwesome for Icons -->
|
| 11 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 12 |
+
|
| 13 |
+
<style>
|
| 14 |
+
:root {
|
| 15 |
+
--bg-dark: #0f172a;
|
| 16 |
+
--glass-bg: rgba(30, 41, 59, 0.4);
|
| 17 |
+
--glass-border: rgba(255, 255, 255, 0.1);
|
| 18 |
+
--glass-shine: rgba(255, 255, 255, 0.05);
|
| 19 |
+
--primary: #3b82f6;
|
| 20 |
+
--primary-hover: #2563eb;
|
| 21 |
+
--text-main: #f8fafc;
|
| 22 |
+
--text-muted: #94a3b8;
|
| 23 |
+
--danger: #ef4444;
|
| 24 |
+
--success: #10b981;
|
| 25 |
+
--blur-amount: 24px;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
* {
|
| 29 |
+
box-sizing: border-box;
|
| 30 |
+
margin: 0;
|
| 31 |
+
padding: 0;
|
| 32 |
+
outline: none;
|
| 33 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 34 |
+
-webkit-tap-highlight-color: transparent;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
body {
|
| 38 |
+
background-color: var(--bg-dark);
|
| 39 |
+
color: var(--text-main);
|
| 40 |
+
height: 100vh;
|
| 41 |
+
width: 100vw;
|
| 42 |
+
overflow: hidden;
|
| 43 |
+
display: flex;
|
| 44 |
+
justify-content: center;
|
| 45 |
+
align-items: center;
|
| 46 |
+
position: relative;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
/* --- Animated Background Orbs --- */
|
| 50 |
+
.orb {
|
| 51 |
+
position: absolute;
|
| 52 |
+
border-radius: 50%;
|
| 53 |
+
filter: blur(80px);
|
| 54 |
+
z-index: -1;
|
| 55 |
+
animation: float 10s infinite ease-in-out alternate;
|
| 56 |
+
opacity: 0.6;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.orb-1 {
|
| 60 |
+
width: 400px;
|
| 61 |
+
height: 400px;
|
| 62 |
+
background: #4f46e5;
|
| 63 |
+
top: -100px;
|
| 64 |
+
left: -100px;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.orb-2 {
|
| 68 |
+
width: 300px;
|
| 69 |
+
height: 300px;
|
| 70 |
+
background: #ec4899;
|
| 71 |
+
bottom: -50px;
|
| 72 |
+
right: -50px;
|
| 73 |
+
animation-delay: -5s;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.orb-3 {
|
| 77 |
+
width: 200px;
|
| 78 |
+
height: 200px;
|
| 79 |
+
background: #06b6d4;
|
| 80 |
+
top: 40%;
|
| 81 |
+
left: 50%;
|
| 82 |
+
transform: translate(-50%, -50%);
|
| 83 |
+
animation: pulse 8s infinite;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
@keyframes float {
|
| 87 |
+
0% { transform: translate(0, 0); }
|
| 88 |
+
100% { transform: translate(30px, 50px); }
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
@keyframes pulse {
|
| 92 |
+
0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
|
| 93 |
+
50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
|
| 94 |
+
100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
/* --- Glassmorphism Base Class --- */
|
| 98 |
+
.glass-panel {
|
| 99 |
+
background: var(--glass-bg);
|
| 100 |
+
backdrop-filter: blur(var(--blur-amount));
|
| 101 |
+
-webkit-backdrop-filter: blur(var(--blur-amount));
|
| 102 |
+
border: 1px solid var(--glass-border);
|
| 103 |
+
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/* --- Header / Brand --- */
|
| 107 |
+
.header-brand {
|
| 108 |
+
position: absolute;
|
| 109 |
+
top: 20px;
|
| 110 |
+
left: 20px;
|
| 111 |
+
z-index: 100;
|
| 112 |
+
font-size: 0.9rem;
|
| 113 |
+
color: var(--text-muted);
|
| 114 |
+
text-decoration: none;
|
| 115 |
+
transition: color 0.3s;
|
| 116 |
+
}
|
| 117 |
+
.header-brand:hover { color: var(--text-main); }
|
| 118 |
+
|
| 119 |
+
/* --- Login Container --- */
|
| 120 |
+
.login-container {
|
| 121 |
+
width: 100%;
|
| 122 |
+
max-width: 420px;
|
| 123 |
+
padding: 2.5rem;
|
| 124 |
+
border-radius: 24px;
|
| 125 |
+
text-align: center;
|
| 126 |
+
transition: all 0.4s ease;
|
| 127 |
+
display: flex; /* Initially visible */
|
| 128 |
+
flex-direction: column;
|
| 129 |
+
gap: 1.5rem;
|
| 130 |
+
position: relative;
|
| 131 |
+
z-index: 10;
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
.app-logo {
|
| 135 |
+
font-size: 3rem;
|
| 136 |
+
background: linear-gradient(135deg, #60a5fa, #c084fc);
|
| 137 |
+
-webkit-background-clip: text;
|
| 138 |
+
-webkit-text-fill-color: transparent;
|
| 139 |
+
margin-bottom: 0.5rem;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
.title {
|
| 143 |
+
font-size: 1.5rem;
|
| 144 |
+
font-weight: 700;
|
| 145 |
+
margin-bottom: 0.5rem;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
.subtitle {
|
| 149 |
+
font-size: 0.9rem;
|
| 150 |
+
color: var(--text-muted);
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
/* --- Forms & Inputs --- */
|
| 154 |
+
.input-group {
|
| 155 |
+
position: relative;
|
| 156 |
+
margin-bottom: 1rem;
|
| 157 |
+
text-align: right;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.input-group i {
|
| 161 |
+
position: absolute;
|
| 162 |
+
right: 16px;
|
| 163 |
+
top: 50%;
|
| 164 |
+
transform: translateY(-50%);
|
| 165 |
+
color: var(--text-muted);
|
| 166 |
+
transition: color 0.3s;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.input-field {
|
| 170 |
+
width: 100%;
|
| 171 |
+
padding: 14px 45px 14px 16px;
|
| 172 |
+
background: rgba(15, 23, 42, 0.4);
|
| 173 |
+
border: 1px solid var(--glass-border);
|
| 174 |
+
border-radius: 12px;
|
| 175 |
+
color: white;
|
| 176 |
+
font-size: 1rem;
|
| 177 |
+
transition: all 0.3s;
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
.input-field:focus {
|
| 181 |
+
border-color: var(--primary);
|
| 182 |
+
background: rgba(15, 23, 42, 0.6);
|
| 183 |
+
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
.input-field:focus + i {
|
| 187 |
+
color: var(--primary);
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
/* --- Custom Checkbox / Captcha --- */
|
| 191 |
+
.captcha-container {
|
| 192 |
+
display: flex;
|
| 193 |
+
align-items: center;
|
| 194 |
+
justify-content: space-between;
|
| 195 |
+
background: rgba(0,0,0,0.2);
|
| 196 |
+
padding: 10px 15px;
|
| 197 |
+
border-radius: 12px;
|
| 198 |
+
margin-bottom: 1.5rem;
|
| 199 |
+
border: 1px solid var(--glass-border);
|
| 200 |
+
cursor: pointer;
|
| 201 |
+
user-select: none;
|
| 202 |
+
transition: background 0.3s;
|
| 203 |
+
}
|
| 204 |
+
.captcha-container:hover { background: rgba(0,0,0,0.3); }
|
| 205 |
+
|
| 206 |
+
.captcha-checkbox {
|
| 207 |
+
width: 24px;
|
| 208 |
+
height: 24px;
|
| 209 |
+
border: 2px solid var(--text-muted);
|
| 210 |
+
border-radius: 6px;
|
| 211 |
+
display: flex;
|
| 212 |
+
align-items: center;
|
| 213 |
+
justify-content: center;
|
| 214 |
+
margin-left: 10px;
|
| 215 |
+
transition: all 0.3s;
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
.captcha-checkbox.checked {
|
| 219 |
+
background: var(--success);
|
| 220 |
+
border-color: var(--success);
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
.captcha-checkbox i {
|
| 224 |
+
font-size: 14px;
|
| 225 |
+
color: white;
|
| 226 |
+
transform: scale(0);
|
| 227 |
+
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
.captcha-checkbox.checked i {
|
| 231 |
+
transform: scale(1);
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
.captcha-text {
|
| 235 |
+
flex-grow: 1;
|
| 236 |
+
font-size: 0.9rem;
|
| 237 |
+
display: flex;
|
| 238 |
+
align-items: center;
|
| 239 |
+
gap: 8px;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.captcha-spinner {
|
| 243 |
+
width: 20px;
|
| 244 |
+
height: 20px;
|
| 245 |
+
border: 2px solid var(--text-muted);
|
| 246 |
+
border-top-color: transparent;
|
| 247 |
+
border-radius: 50%;
|
| 248 |
+
animation: spin 1s linear infinite;
|
| 249 |
+
display: none;
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
@keyframes spin { to { transform: rotate(360deg); } }
|
| 253 |
+
|
| 254 |
+
/* --- Buttons --- */
|
| 255 |
+
.btn {
|
| 256 |
+
width: 100%;
|
| 257 |
+
padding: 14px;
|
| 258 |
+
border: none;
|
| 259 |
+
border-radius: 12px;
|
| 260 |
+
font-size: 1rem;
|
| 261 |
+
font-weight: 600;
|
| 262 |
+
cursor: pointer;
|
| 263 |
+
transition: all 0.3s;
|
| 264 |
+
display: flex;
|
| 265 |
+
align-items: center;
|
| 266 |
+
justify-content: center;
|
| 267 |
+
gap: 8px;
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
.btn-primary {
|
| 271 |
+
background: linear-gradient(135deg, var(--primary), #6366f1);
|
| 272 |
+
color: white;
|
| 273 |
+
box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
.btn-primary:hover {
|
| 277 |
+
transform: translateY(-2px);
|
| 278 |
+
box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
.btn-primary:active { transform: translateY(0); }
|
| 282 |
+
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
|
| 283 |
+
|
| 284 |
+
.btn-ghost {
|
| 285 |
+
background: transparent;
|
| 286 |
+
color: var(--text-muted);
|
| 287 |
+
font-size: 0.85rem;
|
| 288 |
+
padding: 5px;
|
| 289 |
+
}
|
| 290 |
+
.btn-ghost:hover { color: var(--primary); text-decoration: underline; }
|
| 291 |
+
|
| 292 |
+
/* --- Auth Steps Transitions --- */
|
| 293 |
+
.auth-step {
|
| 294 |
+
display: none;
|
| 295 |
+
animation: fadeIn 0.4s ease;
|
| 296 |
+
}
|
| 297 |
+
.auth-step.active { display: block; }
|
| 298 |
+
|
| 299 |
+
@keyframes fadeIn {
|
| 300 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 301 |
+
to { opacity: 1; transform: translateY(0); }
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
.timer-text {
|
| 305 |
+
font-size: 0.85rem;
|
| 306 |
+
color: var(--text-muted);
|
| 307 |
+
margin-top: 10px;
|
| 308 |
+
display: flex;
|
| 309 |
+
justify-content: space-between;
|
| 310 |
+
align-items: center;
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
/* --- Chat Room Layout --- */
|
| 314 |
+
#chat-room {
|
| 315 |
+
display: none; /* Hidden initially */
|
| 316 |
+
width: 95vw;
|
| 317 |
+
height: 90vh;
|
| 318 |
+
border-radius: 24px;
|
| 319 |
+
overflow: hidden;
|
| 320 |
+
flex-direction: row;
|
| 321 |
+
position: relative;
|
| 322 |
+
animation: scaleUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
@keyframes scaleUp {
|
| 326 |
+
from { opacity: 0; transform: scale(0.95); }
|
| 327 |
+
to { opacity: 1; transform: scale(1); }
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
/* Sidebar */
|
| 331 |
+
.sidebar {
|
| 332 |
+
width: 280px;
|
| 333 |
+
border-left: 1px solid var(--glass-border);
|
| 334 |
+
display: flex;
|
| 335 |
+
flex-direction: column;
|
| 336 |
+
background: rgba(0,0,0,0.2);
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
.sidebar-header {
|
| 340 |
+
padding: 20px;
|
| 341 |
+
border-bottom: 1px solid var(--glass-border);
|
| 342 |
+
display: flex;
|
| 343 |
+
align-items: center;
|
| 344 |
+
justify-content: space-between;
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
.user-profile-mini {
|
| 348 |
+
display: flex;
|
| 349 |
+
align-items: center;
|
| 350 |
+
gap: 10px;
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
.avatar {
|
| 354 |
+
width: 40px;
|
| 355 |
+
height: 40px;
|
| 356 |
+
border-radius: 50%;
|
| 357 |
+
object-fit: cover;
|
| 358 |
+
border: 2px solid var(--primary);
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
.search-bar {
|
| 362 |
+
padding: 15px;
|
| 363 |
+
}
|
| 364 |
+
.search-input {
|
| 365 |
+
width: 100%;
|
| 366 |
+
background: rgba(255,255,255,0.05);
|
| 367 |
+
border: none;
|
| 368 |
+
padding: 10px 15px;
|
| 369 |
+
border-radius: 10px;
|
| 370 |
+
color: white;
|
| 371 |
+
font-size: 0.9rem;
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
.chat-list {
|
| 375 |
+
flex-grow: 1;
|
| 376 |
+
overflow-y: auto;
|
| 377 |
+
padding: 10px;
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
/* Custom Scrollbar */
|
| 381 |
+
::-webkit-scrollbar { width: 6px; }
|
| 382 |
+
::-webkit-scrollbar-track { background: transparent; }
|
| 383 |
+
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
|
| 384 |
+
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
|
| 385 |
+
|
| 386 |
+
.chat-item {
|
| 387 |
+
display: flex;
|
| 388 |
+
align-items: center;
|
| 389 |
+
gap: 12px;
|
| 390 |
+
padding: 12px;
|
| 391 |
+
border-radius: 12px;
|
| 392 |
+
cursor: pointer;
|
| 393 |
+
transition: background 0.2s;
|
| 394 |
+
margin-bottom: 5px;
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
.chat-item:hover, .chat-item.active {
|
| 398 |
+
background: rgba(255,255,255,0.08);
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
.chat-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
|
| 402 |
+
.chat-info p { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
|
| 403 |
+
|
| 404 |
+
/* Main Chat Area */
|
| 405 |
+
.chat-area {
|
| 406 |
+
flex-grow: 1;
|
| 407 |
+
display: flex;
|
| 408 |
+
flex-direction: column;
|
| 409 |
+
position: relative;
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
.chat-top-bar {
|
| 413 |
+
padding: 15px 25px;
|
| 414 |
+
border-bottom: 1px solid var(--glass-border);
|
| 415 |
+
display: flex;
|
| 416 |
+
align-items: center;
|
| 417 |
+
justify-content: space-between;
|
| 418 |
+
background: rgba(30, 41, 59, 0.2);
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
.chat-top-info {
|
| 422 |
+
display: flex;
|
| 423 |
+
flex-direction: column;
|
| 424 |
+
}
|
| 425 |
+
.chat-top-name { font-weight: 700; }
|
| 426 |
+
.chat-top-status { font-size: 0.75rem; color: var(--success); }
|
| 427 |
+
|
| 428 |
+
.messages-container {
|
| 429 |
+
flex-grow: 1;
|
| 430 |
+
padding: 20px;
|
| 431 |
+
overflow-y: auto;
|
| 432 |
+
display: flex;
|
| 433 |
+
flex-direction: column;
|
| 434 |
+
gap: 15px;
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
.message {
|
| 438 |
+
max-width: 70%;
|
| 439 |
+
padding: 12px 16px;
|
| 440 |
+
border-radius: 18px;
|
| 441 |
+
font-size: 0.95rem;
|
| 442 |
+
line-height: 1.5;
|
| 443 |
+
position: relative;
|
| 444 |
+
animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
@keyframes popIn {
|
| 448 |
+
from { transform: scale(0.8); opacity: 0; }
|
| 449 |
+
to { transform: scale(1); opacity: 1; }
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
.message.received {
|
| 453 |
+
align-self: flex-start;
|
| 454 |
+
background: rgba(255, 255, 255, 0.1);
|
| 455 |
+
color: var(--text-main);
|
| 456 |
+
border-bottom-right-radius: 4px;
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
.message.sent {
|
| 460 |
+
align-self: flex-end;
|
| 461 |
+
background: var(--primary);
|
| 462 |
+
color: white;
|
| 463 |
+
border-bottom-left-radius: 4px;
|
| 464 |
+
box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
.message-time {
|
| 468 |
+
font-size: 0.7rem;
|
| 469 |
+
margin-top: 5px;
|
| 470 |
+
opacity: 0.7;
|
| 471 |
+
text-align: left;
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
.input-area {
|
| 475 |
+
padding: 20px;
|
| 476 |
+
background: rgba(15, 23, 42, 0.3);
|
| 477 |
+
border-top: 1px solid var(--glass-border);
|
| 478 |
+
display: flex;
|
| 479 |
+
align-items: center;
|
| 480 |
+
gap: 15px;
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
.attach-btn {
|
| 484 |
+
width: 40px;
|
| 485 |
+
height: 40px;
|
| 486 |
+
border-radius: 50%;
|
| 487 |
+
border: none;
|
| 488 |
+
background: rgba(255,255,255,0.05);
|
| 489 |
+
color: var(--text-muted);
|
| 490 |
+
cursor: pointer;
|
| 491 |
+
transition: all 0.2s;
|
| 492 |
+
display: flex;
|
| 493 |
+
align-items: center;
|
| 494 |
+
justify-content: center;
|
| 495 |
+
}
|
| 496 |
+
.attach-btn:hover { background: rgba(255,255,255,0.1); color: white; }
|
| 497 |
+
|
| 498 |
+
.message-input {
|
| 499 |
+
flex-grow: 1;
|
| 500 |
+
background: rgba(255,255,255,0.05);
|
| 501 |
+
border: 1px solid var(--glass-border);
|
| 502 |
+
padding: 12px 20px;
|
| 503 |
+
border-radius: 25px;
|
| 504 |
+
color: white;
|
| 505 |
+
resize: none;
|
| 506 |
+
height: 45px;
|
| 507 |
+
line-height: 20px;
|
| 508 |
+
transition: all 0.3s;
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
.message-input:focus { background: rgba(0,0,0,0.2); border-color: var(--primary); }
|
| 512 |
+
|
| 513 |
+
.send-btn {
|
| 514 |
+
width: 45px;
|
| 515 |
+
height: 45px;
|
| 516 |
+
border-radius: 50%;
|
| 517 |
+
border: none;
|
| 518 |
+
background: var(--primary);
|
| 519 |
+
color: white;
|
| 520 |
+
cursor: pointer;
|
| 521 |
+
display: flex;
|
| 522 |
+
align-items: center;
|
| 523 |
+
justify-content: center;
|
| 524 |
+
transition: transform 0.2s;
|
| 525 |
+
}
|
| 526 |
+
.send-btn:hover { transform: scale(1.1); background: var(--primary-hover); }
|
| 527 |
+
.send-btn:active { transform: scale(0.95); }
|
| 528 |
+
|
| 529 |
+
/* --- Toast Notification --- */
|
| 530 |
+
.toast-container {
|
| 531 |
+
position: fixed;
|
| 532 |
+
top: 20px;
|
| 533 |
+
left: 50%;
|
| 534 |
+
transform: translateX(-50%);
|
| 535 |
+
z-index: 1000;
|
| 536 |
+
display: flex;
|
| 537 |
+
flex-direction: column;
|
| 538 |
+
gap: 10px;
|
| 539 |
+
}
|
| 540 |
+
|
| 541 |
+
.toast {
|
| 542 |
+
padding: 12px 24px;
|
| 543 |
+
border-radius: 50px;
|
| 544 |
+
color: white;
|
| 545 |
+
font-size: 0.9rem;
|
| 546 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
| 547 |
+
display: flex;
|
| 548 |
+
align-items: center;
|
| 549 |
+
gap: 10px;
|
| 550 |
+
animation: slideDown 0.3s ease;
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
.toast.error { background: rgba(239, 68, 68, 0.9); }
|
| 554 |
+
.toast.success { background: rgba(16, 185, 129, 0.9); }
|
| 555 |
+
.toast.info { background: rgba(59, 130, 246, 0.9); }
|
| 556 |
+
|
| 557 |
+
@keyframes slideDown {
|
| 558 |
+
from { transform: translateY(-20px); opacity: 0; }
|
| 559 |
+
to { transform: translateY(0); opacity: 1; }
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
/* --- Responsive Design --- */
|
| 563 |
+
@media (max-width: 768px) {
|
| 564 |
+
.login-container { padding: 1.5rem; width: 90%; }
|
| 565 |
+
.sidebar { display: none; /* Hide sidebar on mobile for simplicity */ }
|
| 566 |
+
#chat-room { width: 100%; height: 100%; border-radius: 0; }
|
| 567 |
+
.top-bar-back-btn { display: block; }
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
+
.top-bar-back-btn { display: none; background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; }
|
| 571 |
+
|
| 572 |
+
</style>
|
| 573 |
+
</head>
|
| 574 |
+
<body>
|
| 575 |
+
|
| 576 |
+
<!-- Background Orbs -->
|
| 577 |
+
<div class="orb orb-1"></div>
|
| 578 |
+
<div class="orb orb-2"></div>
|
| 579 |
+
<div class="orb orb-3"></div>
|
| 580 |
+
|
| 581 |
+
<!-- Branding Link -->
|
| 582 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="header-brand">
|
| 583 |
+
Built with anycoder <i class="fas fa-external-link-alt" style="font-size: 0.7em;"></i>
|
| 584 |
+
</a>
|
| 585 |
+
|
| 586 |
+
<!-- Toast Container -->
|
| 587 |
+
<div class="toast-container" id="toastContainer"></div>
|
| 588 |
+
|
| 589 |
+
<!-- LOGIN / AUTH SECTION -->
|
| 590 |
+
<div class="glass-panel login-container" id="loginSection">
|
| 591 |
+
<div class="app-logo"><i class="fas fa-comment-dots"></i></div>
|
| 592 |
+
<h1 class="title">ورود به حساب</h1>
|
| 593 |
+
<p class="subtitle">به چتروم شیشهای خوش آمدید</p>
|
| 594 |
+
|
| 595 |
+
<!-- Step 1: Phone & Captcha -->
|
| 596 |
+
<div id="step1" class="auth-step active">
|
| 597 |
+
<div class="captcha-container" id="captchaBox" onclick="toggleCaptcha()">
|
| 598 |
+
<div class="captcha-checkbox" id="captchaCheck">
|
| 599 |
+
<i class="fas fa-check"></i>
|
| 600 |
+
</div>
|
| 601 |
+
<div class="captcha-text">
|
| 602 |
+
<span>من ربات نیستم</span>
|
| 603 |
+
<div class="captcha-spinner" id="captchaSpinner"></div>
|
| 604 |
+
</div>
|
| 605 |
+
<i class="fas fa-robot" style="color: var(--text-muted);"></i>
|
| 606 |
+
</div>
|
| 607 |
+
|
| 608 |
+
<div class="input-group">
|
| 609 |
+
<input type="tel" id="phoneInput" class="input-field" placeholder="شماره موبایل (مثال: 09123456789)" maxlength="11">
|
| 610 |
+
<i class="fas fa-mobile-alt"></i>
|
| 611 |
+
</div>
|
| 612 |
+
|
| 613 |
+
<button class="btn btn-primary" onclick="sendCode()">
|
| 614 |
+
دریافت کد تایید <i class="fas fa-paper-plane"></i>
|
| 615 |
+
</button>
|
| 616 |
+
</div>
|
| 617 |
+
|
| 618 |
+
<!-- Step 2: Verify Code -->
|
| 619 |
+
<div id="step2" class="auth-step">
|
| 620 |
+
<div class="input-group">
|
| 621 |
+
<input type="text" id="otpInput" class="input-field" placeholder="کد ۵ رقمی را وارد کنید" maxlength="5" style="letter-spacing: 5px; text-align: center; direction: ltr;">
|
| 622 |
+
<i class="fas fa-shield-alt"></i>
|
| 623 |
+
</div>
|
| 624 |
+
|
| 625 |
+
<button class="btn btn-primary" id="verifyBtn" onclick="verifyCode()">
|
| 626 |
+
تایید و ورود <i class="fas fa-sign-in-alt"></i>
|
| 627 |
+
</button>
|
| 628 |
+
|
| 629 |
+
<div class="timer-text">
|
| 630 |
+
<span id="timerDisplay">02:00</span>
|
| 631 |
+
<button class="btn-ghost" id="resendBtn" onclick="sendCode()" disabled>ارسال مجدد کد</button>
|
| 632 |
+
</div>
|
| 633 |
+
|
| 634 |
+
<button class="btn-ghost" onclick="resetAuth()" style="margin-top: 10px;">
|
| 635 |
+
<i class="fas fa-arrow-right"></i> تغییر شماره
|
| 636 |
+
</button>
|
| 637 |
+
</div>
|
| 638 |
+
</div>
|
| 639 |
+
|
| 640 |
+
<!-- CHAT ROOM SECTION -->
|
| 641 |
+
<div class="glass-panel" id="chat-room">
|
| 642 |
+
<!-- Sidebar -->
|
| 643 |
+
<aside class="sidebar">
|
| 644 |
+
<div class="sidebar-header">
|
| 645 |
+
<div class="user-profile-mini">
|
| 646 |
+
<img src="https://picsum.photos/seed/user1/100/100" class="avatar" alt="User">
|
| 647 |
+
<div style="font-size: 0.9rem; font-weight: bold;">کاربر من</div>
|
| 648 |
+
</div>
|
| 649 |
+
<div style="display: flex; gap: 10px;">
|
| 650 |
+
<i class="fas fa-cog" style="color: var(--text-muted); cursor: pointer;"></i>
|
| 651 |
+
<i class="fas fa-edit" style="color: var(--text-muted); cursor: pointer;"></i>
|
| 652 |
+
</div>
|
| 653 |
+
</div>
|
| 654 |
+
|
| 655 |
+
<div class="search-bar">
|
| 656 |
+
<input type="text" class="search-input" placeholder="جستجو...">
|
| 657 |
+
</div>
|
| 658 |
+
|
| 659 |
+
<div class="chat-list">
|
| 660 |
+
<div class="chat-item active">
|
| 661 |
+
<img src="https://picsum.photos/seed/tech/100/100" class="avatar" style="border-color: var(--success);">
|
| 662 |
+
<div class="chat-info">
|
| 663 |
+
<h4>گروه برنامهنویسی</h4>
|
| 664 |
+
<p>علی: پروژه جدید کی شروع میشه؟</p>
|
| 665 |
+
</div>
|
| 666 |
+
<span style="font-size: 0.7rem; color: var(--text-muted); margin-right: auto;">10:30</span>
|
| 667 |
+
</div>
|
| 668 |
+
<div class="chat-item">
|
| 669 |
+
<img src="https://picsum.photos/seed/friend/100/100" class="avatar">
|
| 670 |
+
<div class="chat-info">
|
| 671 |
+
<h4>سارا احمدی</h4>
|
| 672 |
+
<p>سلام، چطوری؟</p>
|
| 673 |
+
</div>
|
| 674 |
+
</div>
|
| 675 |
+
<div class="chat-item">
|
| 676 |
+
<img src="https://picsum.photos/seed/work/100/100" class="avatar">
|
| 677 |
+
<div class="chat-info">
|
| 678 |
+
<h4>اتاق گفتگوی عمومی</h4>
|
| 679 |
+
<p>پیام جدیدی وجود ندارد</p>
|
| 680 |
+
</div>
|
| 681 |
+
</div>
|
| 682 |
+
</div>
|
| 683 |
+
</aside>
|
| 684 |
+
|
| 685 |
+
<!-- Main Chat -->
|
| 686 |
+
<main class="chat-area">
|
| 687 |
+
<div class="chat-top-bar">
|
| 688 |
+
<div style="display: flex; align-items: center; gap: 15px;">
|
| 689 |
+
<button class="top-bar-back-btn"><i class="fas fa-arrow-right"></i></button>
|
| 690 |
+
<img src="https://picsum.photos/seed/tech/100/100" class="avatar" style="width: 35px; height: 35px; border-color: var(--success);">
|
| 691 |
+
<div class="chat-top-info">
|
| 692 |
+
<span class="chat-top-name">گروه برنامهنویسی</span>
|
| 693 |
+
<span class="chat-top-status"><i class="fas fa-circle" style="font-size: 8px;"></i> آنلاین</span>
|
| 694 |
+
</div>
|
| 695 |
+
</div>
|
| 696 |
+
<div>
|
| 697 |
+
<i class="fas fa-phone" style="margin-left: 15px; cursor: pointer; color: var(--text-muted);"></i>
|
| 698 |
+
<i class="fas fa-video" style="margin-left: 15px; cursor: pointer; color: var(--text-muted);"></i>
|
| 699 |
+
<i class="fas fa-ellipsis-v" style="cursor: pointer; color: var(--text-muted);"></i>
|
| 700 |
+
</div>
|
| 701 |
+
</div>
|
| 702 |
+
|
| 703 |
+
<div class="messages-container" id="messagesList">
|
| 704 |
+
<div style="text-align: center; font-size: 0.8rem; color: var(--text-muted); margin: 10px 0;">امروز</div>
|
| 705 |
+
<div class="message received">
|
| 706 |
+
سلام به همه! خوشحالم که اینجا هستید.
|
| 707 |
+
<div class="message-time">09:15</div>
|
| 708 |
+
</div>
|
| 709 |
+
<div class="message sent">
|
| 710 |
+
سلام وقت بخیر، منم خوشحالم.
|
| 711 |
+
<div class="message-time">09:16</div>
|
| 712 |
+
</div>
|
| 713 |
+
<div class="message received">
|
| 714 |
+
کسی درباره استایل جدید Liquid Glass چیزی میدونه؟
|
| 715 |
+
<div class="message-time">09:18</div>
|
| 716 |
+
</div>
|
| 717 |
+
<div class="message sent">
|
| 718 |
+
آره، خیلی ترند شده. توی همین صفحه هم داریم ازش استفاده میکنیم!
|
| 719 |
+
<div class="message-time">09:20</div>
|
| 720 |
+
</div>
|
| 721 |
+
</div>
|
| 722 |
+
|
| 723 |
+
<div class="input-area">
|
| 724 |
+
<button class="attach-btn"><i class="fas fa-paperclip"></i></button>
|
| 725 |
+
<button class="attach-btn"><i class="far fa-smile"></i></button>
|
| 726 |
+
<input type="text" class="message-input" id="msgInput" placeholder="پیام خود را بنویسید..." onkeypress="handleEnter(event)">
|
| 727 |
+
<button class="send-btn" onclick="sendMessage()"><i class="fas fa-paper-plane"></i></button>
|
| 728 |
+
</div>
|
| 729 |
+
</main>
|
| 730 |
+
</div>
|
| 731 |
+
|
| 732 |
+
<script>
|
| 733 |
+
// --- State Management ---
|
| 734 |
+
let captchaVerified = false;
|
| 735 |
+
let phoneNumber = "";
|
| 736 |
+
let countdownInterval;
|
| 737 |
+
const RESEND_TIME = 120; // 2 minutes in seconds
|
| 738 |
+
|
| 739 |
+
// --- DOM Elements ---
|
| 740 |
+
const loginSection = document.getElementById('loginSection');
|
| 741 |
+
const chatRoom = document.getElementById('chat-room');
|
| 742 |
+
const step1 = document.getElementById('step1');
|
| 743 |
+
const step2 = document.getElementById('step2');
|
| 744 |
+
const captchaBox = document.getElementById('captchaBox');
|
| 745 |
+
const captchaCheck = document.getElementById('captchaCheck');
|
| 746 |
+
const captchaSpinner = document.getElementById('captchaSpinner');
|
| 747 |
+
const phoneInput = document.getElementById('phoneInput');
|
| 748 |
+
const otpInput = document.getElementById('otpInput');
|
| 749 |
+
const timerDisplay = document.getElementById('timerDisplay');
|
| 750 |
+
const resendBtn = document.getElementById('resendBtn');
|
| 751 |
+
const messagesList = document.getElementById('messagesList');
|
| 752 |
+
const msgInput = document.getElementById('msgInput');
|
| 753 |
+
|
| 754 |
+
// --- Functions ---
|
| 755 |
+
|
| 756 |
+
function showToast(message, type = 'info') {
|
| 757 |
+
const container = document.getElementById('toastContainer');
|
| 758 |
+
const toast = document.createElement('div');
|
| 759 |
+
toast.className = `toast ${type}`;
|
| 760 |
+
|
| 761 |
+
let icon = 'info-circle';
|
| 762 |
+
if (type === 'success') icon = 'check-circle';
|
| 763 |
+
if (type === 'error') icon = 'exclamation-circle';
|
| 764 |
+
|
| 765 |
+
toast.innerHTML = `<i class="fas fa-${icon}"></i> ${message}`;
|
| 766 |
+
container.appendChild(toast);
|
| 767 |
+
|
| 768 |
+
setTimeout(() => {
|
| 769 |
+
toast.style.opacity = '0';
|
| 770 |
+
setTimeout(() => toast.remove(), 300);
|
| 771 |
+
}, 3000);
|
| 772 |
+
}
|
| 773 |
+
|
| 774 |
+
function toggleCaptcha() {
|
| 775 |
+
if (captchaVerified) return; // Already verified
|
| 776 |
+
|
| 777 |
+
captchaSpinner.style.display = 'block';
|
| 778 |
+
|
| 779 |
+
// Simulate API check delay
|
| 780 |
+
setTimeout(() => {
|
| 781 |
+
captchaSpinner.style.display = 'none';
|
| 782 |
+
captchaCheck.classList.add('checked');
|
| 783 |
+
captchaVerified = true;
|
| 784 |
+
showToast('ربات نبودن شما تایید شد', 'success');
|
| 785 |
+
}, 800);
|
| 786 |
+
}
|
| 787 |
+
|
| 788 |
+
function sendCode() {
|
| 789 |
+
// Validation Step 1
|
| 790 |
+
if (!captchaVerified) {
|
| 791 |
+
showToast('لطفاً تیک "من ربات نیستم" را بزنید', 'error');
|
| 792 |
+
return;
|
| 793 |
+
}
|
| 794 |
+
|
| 795 |
+
const phone = phoneInput.value.trim();
|
| 796 |
+
const phoneRegex = /^09\d{9}$/;
|
| 797 |
+
|
| 798 |
+
if (!phoneRegex.test(phone)) {
|
| 799 |
+
showToast('شماره موبایل نامعتبر است (۱۰ رقمی با ۰۹)', 'error');
|
| 800 |
+
return;
|
| 801 |
+
}
|
| 802 |
+
|
| 803 |
+
phoneNumber = phone;
|
| 804 |
+
|
| 805 |
+
// Simulate Sending Code
|
| 806 |
+
showToast(`کد تایید برای ${phoneNumber} ارسال شد`, 'success');
|
| 807 |
+
|
| 808 |
+
// Switch Step
|
| 809 |
+
step1.classList.remove('active');
|
| 810 |
+
step2.classList.add('active');
|
| 811 |
+
|
| 812 |
+
startTimer();
|
| 813 |
+
}
|
| 814 |
+
|
| 815 |
+
function startTimer() {
|
| 816 |
+
let timeLeft = RESEND_TIME;
|
| 817 |
+
resendBtn.disabled = true;
|
| 818 |
+
resendBtn.style.opacity = '0.5';
|
| 819 |
+
resendBtn.style.cursor = 'not-allowed';
|
| 820 |
+
|
| 821 |
+
clearInterval(countdownInterval);
|
| 822 |
+
|
| 823 |
+
countdownInterval = setInterval(() => {
|
| 824 |
+
const minutes = Math.floor(timeLeft / 60);
|
| 825 |
+
const seconds = timeLeft % 60;
|
| 826 |
+
|
| 827 |
+
timerDisplay.textContent = `0${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
|
| 828 |
+
|
| 829 |
+
if (timeLeft <= 0) {
|
| 830 |
+
clearInterval(countdownInterval);
|
| 831 |
+
timerDisplay.textContent = "ارسال مجدد";
|
| 832 |
+
resendBtn.disabled = false;
|
| 833 |
+
resendBtn.style.opacity = '1';
|
| 834 |
+
resendBtn.style.cursor = 'pointer';
|
| 835 |
+
}
|
| 836 |
+
timeLeft--;
|
| 837 |
+
}, 1000);
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
+
function verifyCode() {
|
| 841 |
+
const code = otpInput.value.trim();
|
| 842 |
+
|
| 843 |
+
if (code.length < 4) {
|
| 844 |
+
showToast('کد تایید نامعتبر است', 'error');
|
| 845 |
+
return;
|
| 846 |
+
}
|
| 847 |
+
|
| 848 |
+
// Simulate Verification Success
|
| 849 |
+
showToast('ورود موفقیتآمیز!', 'success');
|
| 850 |
+
|
| 851 |
+
// Transition to Chat
|
| 852 |
+
setTimeout(() => {
|
| 853 |
+
loginSection.style.display = 'none';
|
| 854 |
+
chatRoom.style.display = 'flex';
|
| 855 |
+
}, 1000);
|
| 856 |
+
}
|
| 857 |
+
|
| 858 |
+
function resetAuth() {
|
| 859 |
+
step2.classList.remove('active');
|
| 860 |
+
step1.classList.add('active');
|
| 861 |
+
clearInterval(countdownInterval);
|
| 862 |
+
otpInput.value = '';
|
| 863 |
+
}
|
| 864 |
+
|
| 865 |
+
// --- Chat Functions ---
|
| 866 |
+
|
| 867 |
+
function handleEnter(e) {
|
| 868 |
+
if (e.key === 'Enter') sendMessage();
|
| 869 |
+
}
|
| 870 |
+
|
| 871 |
+
function sendMessage() {
|
| 872 |
+
const text = msgInput.value.trim();
|
| 873 |
+
if (!text) return;
|
| 874 |
+
|
| 875 |
+
// Add User Message
|
| 876 |
+
addMessage(text, 'sent');
|
| 877 |
+
msgInput.value = '';
|
| 878 |
+
|
| 879 |
+
// Simulate Auto Reply
|
| 880 |
+
setTimeout(() => {
|
| 881 |
+
const replies = [
|
| 882 |
+
"جالب بود!",
|
| 883 |
+
"میشه بیشتر توضیح بدی؟",
|
| 884 |
+
"باشه، حتما.",
|
| 885 |
+
"من موافقم.",
|
| 886 |
+
"الان سرم شلوغه، بعدا صحبت میکنیم."
|
| 887 |
+
];
|
| 888 |
+
const randomReply = replies[Math.floor(Math.random() * replies.length)];
|
| 889 |
+
addMessage(randomReply, 'received');
|
| 890 |
+
}, 2000 + Math.random() * 2000);
|
| 891 |
+
}
|
| 892 |
+
|
| 893 |
+
function addMessage(text, type) {
|
| 894 |
+
const msgDiv = document.createElement('div');
|
| 895 |
+
msgDiv.className = `message ${type}`;
|
| 896 |
+
|
| 897 |
+
const now = new Date();
|
| 898 |
+
const timeString = `${now.getHours()}:${now.getMinutes() < 10 ? '0' : ''}${now.getMinutes()}`;
|
| 899 |
+
|
| 900 |
+
msgDiv.innerHTML = `
|
| 901 |
+
${text}
|
| 902 |
+
<div class="message-time">${timeString}</div>
|
| 903 |
+
`;
|
| 904 |
+
|
| 905 |
+
messagesList.appendChild(msgDiv);
|
| 906 |
+
messagesList.scrollTop = messagesList.scrollHeight;
|
| 907 |
+
}
|
| 908 |
+
|
| 909 |
+
</script>
|
| 910 |
+
</body>
|
| 911 |
+
</html>
|