anycoder-526bda47 / index.html
samirerty's picture
Upload folder using huggingface_hub
2662690 verified
1. Glassmorphism with backdrop-filter blur
2. Modern gradient background
3. Responsive grid/flex layout
4. Styled for RTL (Persian) text
5. Professional styling for all components
6. Animations for smooth UX
7. Custom scrollbars
8. Mobile responsive breakpoints
9. Hover effects and transitions
10. Proper z-indexing and shadows
The colors are purple/blue gradient based which works well with glassmorphism. All the classes from the HTML are styled. </think> ```css
/* CSS Variables for Glassmorphism Theme */
:root {
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
--glass-bg: rgba(255, 255, 255, 0.75);
--glass-bg-dark: rgba(255, 255, 255, 0.4);
--glass-border: rgba(255, 255, 255, 0.6);
--glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
--blur-amount: blur(16px);
--text-primary: #1a202c;
--text-secondary: #4a5568;
--accent-color: #667eea;
--accent-hover: #5568d3;
--success-color: #48bb78;
--error-color: #f56565;
--warning-color: #ed8936;
--border-radius-lg: 24px;
--border-radius-md: 16px;
--border-radius-sm: 12px;
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Reset & Base */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body.chat-page {
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
background: var(--primary-gradient);
background-attachment: fixed;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
color: var(--text-primary);
line-height: 1.6;
}
/* Glass Container */
.chat-container {
display: grid;
grid-template-columns: 320px 1fr;
width: 100%;
max-width: 1440px;
height: 92vh;
background: var(--glass-bg);
backdrop-filter: var(--blur-amount);
-webkit-backdrop-filter: var(--blur-amount);
border: 1px solid var(--glass-border);
border-radius: var(--border-radius-lg);
box-shadow: var(--glass-shadow);
overflow: hidden;
position: relative;
}
/* Sidebar - Glass Panel */
.chat-sidebar {
background: rgba(255, 255, 255, 0.4);
border-left: 1px solid var(--glass-border);
display: flex;
flex-direction: column;
backdrop-filter: blur(10px);
position: relative;
}
.sidebar-header {
padding: 28px 24px;
background: rgba(255, 255, 255, 0.6);
border-bottom: 1px solid var(--glass-border);
backdrop-filter: blur(8px);
}
.sidebar-header h3 {
font-size: 1.25rem;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 8px;
font-weight: 700;
}
.sidebar-header h3 i {
color: var(--accent-color);
font-size: 1.1rem;
}
.room-name {
font-size: 0.875rem;
color: var(--text-secondary);
font-weight: 500;
display: block;
padding-right: 32px;
}
.users-list {
flex: 1;
overflow-y: auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 12px;
}
.user-item {
display: flex;
align-items: center;
gap: 14px;
padding: 14px;
background: rgba(255, 255, 255, 0.6);
border-radius: var(--border-radius-sm);
border: 1px solid rgba(255, 255, 255, 0.4);
transition: var(--transition);
cursor: pointer;
position: relative;
overflow: hidden;
}
.user-item::before {
content: '';
position: absolute;
right: 0;
top: 0;
height: 100%;
width: 4px;
background: var(--accent-color);
opacity: 0;
transition: var(--transition);
}
.user-item:hover {
background: rgba(255, 255, 255, 0.9);
transform: translateX(-4px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.user-item:hover::before {
opacity: 1;
}
.user-avatar {
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--primary-gradient);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.25rem;
box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
flex-shrink: 0;
}
.user-info {
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
}
.user-name {
font-weight: 600;
font-size: 0.95rem;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.user-status {
font-size: 0.8rem;
display: flex;
align-items: center;
gap: 6px;
margin-top: 2px;
font-weight: 500;
}
.user-status.online {
color: var(--success-color);
}
.user-status.offline {
color: var(--text-secondary);
opacity: 0.7;
}
.user-status i {
font-size: 0.5rem;
animation: pulse 2s infinite;
}
.user-status.offline i {
animation: none;
}
.sidebar-footer {
padding: 24px;
border-top: 1px solid var(--glass-border);
background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(8px);
}
/* Main Chat Area */
.chat-main {
display: flex;
flex-direction: column;
background: rgba(255, 255, 255, 0.2);
position: relative;
}
.chat-header {
padding: 28px 32px;
background: rgba(255, 255, 255, 0.65);
border-bottom: 1px solid var(--glass-border);
display: flex;
justify-content: space-between;
align-items: center;
backdrop-filter: blur(12px);
z-index: 10;
}
.header-info h1 {
font-size: 1.5rem;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 6px;
font-weight: 700;
}
.header-info h1 i {
color: var(--accent-color);
background: rgba(102, 126, 234, 0.1);
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12px;
}
.header-info p {
color: var(--text-secondary);
font-size: 0.9rem;
padding-right: 52px;
}
.header-actions {
display: flex;
gap: 12px;
align-items: center;
}
/* Messages Container */
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 32px;
display: flex;
flex-direction: column;
gap: 20px;
scroll-behavior: smooth;
background: rgba(255, 255, 255, 0.3);
}
/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar,
.users-list::-webkit-scrollbar {
width: 8px;
}
.chat-messages::-webkit-scrollbar-track,
.users-list::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.2);
border-radius: 10px;
margin: 4px;
}
.chat-messages::-webkit-scrollbar-thumb,
.users-list::-webkit-scrollbar-thumb {
background: rgba(102, 126, 234, 0.4);
border-radius: 10px;
border: 2px solid transparent;
background-clip: padding-box;
}
.chat-messages::-webkit-scrollbar-thumb:hover,
.users-list::-webkit-scrollbar-thumb:hover {
background: rgba(102, 126, 234, 0.7);
border: 2px solid transparent;
background-clip: padding-box;
}
/* Message Bubbles - Glass Effect */
.message {
max-width: 75%;
padding: 18px 22px;
border-radius: 20px;
background: rgba(255, 255, 255, 0.85);
border: 1px solid rgba(255, 255, 255, 0.8);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
position: relative;
animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
backdrop-filter: blur(8px);
transition: var(--transition);
}
.message:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.message.own {
align-self: flex-start;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
color: white;
border: 1px solid rgba(255, 255, 255, 0.4);
box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}
.message:not(.own) {
align-self: flex-end;
background: rgba(255, 255, 255, 0.95);
}
.message-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
font-size: 0.85rem;
gap: 12px;
}
.message.own .message-header {
color: rgba(255, 255, 255, 0.95);
}
.message:not(.own) .message-header {
color: var(--text-secondary);
}
.message-sender {
font-weight: 700;
display: flex;
align-items: center;
gap: 6px;
}
.message-time {
font-size: 0.75rem;
opacity: 0.9;
font-weight: 500;
}
.message-content {
line-height: 1.6;
word-wrap: break-word;
font-size: 0.95rem;
}
.message-actions-admin {
display: flex;
gap: 8px;
opacity: 0;
transition: var(--transition);
position: absolute;
left: -30px;
top: 50%;
transform: translateY(-50%);
}
.message:hover .message-actions-admin {
opacity: 1;
left: 10px;
}
.message-actions-admin button {
background: rgba(245, 101, 101, 0.9);
color: white;
border: none;
width: 28px;
height: 28px;
border-radius: 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
transition: var(--transition);
backdrop-filter: blur(4px);
box-shadow: 0 2px 8px rgba(245, 101, 101, 0.3);
}
.message-actions-admin button:hover {
background: var(--error-color);
transform: scale(1.15) rotate(8deg);
}
/* Chat Footer & Input */
.chat-footer {
padding: 28px 32px;
background: rgba(255, 255, 255, 0.7);
border-top: 1px solid var(--glass-border);
backdrop-filter: blur(12px);
}
#message-form {
display: flex;
flex-direction: column;
gap: 16px;
}
.message-input {
display: flex;
gap: 16px;
align-items: center;
position: relative;
}
#message-input {
flex: 1;
padding: 16px 24px;
border: 2px solid rgba(102, 126, 234, 0.2);
border-radius: 28px;
background: rgba(255, 255, 255, 0.9);
font-size: 1rem;
color: var(--text-primary);
transition: var(--transition);
outline: none;
font-family: inherit;
}
#message-input:focus {
border-color: var(--accent-color);
background: rgba(255, 255, 255, 1);
box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.15);
}
#message-input::placeholder {
color: var(--text-secondary);
opacity: 0.6;
}
.message-actions {
display: flex;
gap: 10px;
padding: 0 8px;
align-items: center;
}
/* Buttons */
.btn {
padding: 12px 24px;
border: none;
border-radius: 14px;
font-weight: 600;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 10px;
transition: var(--transition);
font-size: 0.95rem;
backdrop-filter: blur(4px);
white-space: nowrap;
position: relative;
overflow: hidden;
}
.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: 0.5s;
}
.btn:hover::before {
left: 100%;
}
.btn-primary {
background: var(--primary-gradient);
color: white;
box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}
.btn-primary:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}
.btn-secondary {
background: rgba(255, 255, 255, 0.8);
color: var(--text-primary);
border: 1px solid rgba(0, 0, 0, 0.08);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.btn-secondary:hover {
background: rgba(255, 255, 255, 1);
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.btn-icon {
width: 40px;
height: 40px;
border-radius: 50%;
border: 1px solid rgba(0, 0, 0, 0.08);
background: rgba(255, 255, 255, 0.7);
cursor: pointer;
font-size: 1.25rem;
display: flex;
align-items: center;
justify-content: center;
transition: var(--transition);
backdrop-filter: blur(4px);
}
.btn-icon:hover {
background: rgba(255, 255, 255, 1);
transform: scale(1.15) rotate(10deg);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
/* States */
.loading, .empty-state, .error-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 40px;
text-align: center;
color: var(--text-secondary);
gap: 16px;
background: rgba(255, 255, 255, 0.5);
border-radius: var(--border-radius-md);
border: 2px dashed rgba(102, 126, 234, 0.2);
margin: 20px;
}
.loading {
border-style: solid;
background: rgba(255, 255, 255, 0.3);
}
.loading::before {
content: '';
width: 48px;
height: 48px;
border: 4px solid rgba(102, 126, 234, 0.2);
border-top-color: var(--accent-color);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
.empty-state i, .error-state i {
font-size: 3.5rem;
margin-bottom: 8px;
opacity: 0.6;
}
.empty-state i {
color: var(--accent-color);
}
.error-state i {
color: var(--error-color);
}
.small-text {
font-size: 0.9rem;
opacity: 0.8;
margin-top: 8px;
}
/* Alerts */
.alert {
padding: 18px 24px;
border-radius: var(--border-radius-sm);
display: flex;
align-items: center;
gap: 12px;
font-weight: 600;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.4);
z-index: 10000;
}
.alert.success {
background: rgba(72, 187, 120, 0.95);
color: white;
}
.alert.error {
background: rgba(245, 101, 101, 0.95);
color: white;
}
.alert i {
font-size: 1.25rem;
}
/* Temp Message */
.temp-message {
opacity: 0.8;
border-style: dashed;
}
.sending-status {
font-size: 0.75rem;
margin-right: 8px;
font-style: italic;
opacity: 0.9;
display: flex;
align-items: center;
gap: 6px;
}
/* Animations */
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(20px) scale(0.95);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
/* Responsive Design */
@media (max-width: 1024px) {
.chat-container {
grid-template-columns: 280px 1fr;
}
.chat-header {
padding: 20px 24px;
}
.header-info h1 {
font-size: 1.25rem;
}
.chat-messages {
padding: 24px;
}
}
@media (max-width: 768px) {
body.chat-page {
padding: 0;
}
.chat-container {
grid-template-columns: 1fr;
height: 100vh;
border-radius: 0;
max-width: 100%;
}
.chat-sidebar {
position: fixed;
right: -100%;
top: 0;
width: 300px;
height: 100vh;
z-index: 1000;
transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
background: rgba(255, 255, 255, 0.98);
box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}
.chat-sidebar.active {
right: 0;
}
.chat-header {
padding: 16px 20px;
flex-direction: column;
gap: 16px;
align-items: flex-start;
}
.header-actions {
width: 100%;
justify-content: flex-end;
}
.message {
max-width: 90%;
padding: 14px 18px;
}
.chat-footer {
padding: 20px;
}
.message-input {
flex-wrap: wrap;
}
#message-input {
order: 1;
flex: 1 0 100%;
margin-bottom: 12px;
}
.btn-primary[type="submit"] {
order: 3;
flex: 1;
justify-content: center;
}
.message-actions {
order: 2;
flex: 1;
justify-content: flex-end;
}
}
@media (max-width: 480px) {
.chat-messages {
padding: 16px;
gap: 12px;
}
.message {
max-width: 95%;
border-radius: 16px;
padding: 12px 16px;
}
.btn {
padding: 10px 16px;
font-size: 0.85rem;
}
.sidebar-header h3 {
font-size: 1.1rem;
}
.user-item {
padding: 10px;
}
.user-avatar {
width: 36px;
height: 36px;
font-size: 1rem;
}
}
/* Utility Classes */
.hidden {
display: none !important;
}
.fade-in {
animation: slideIn 0.4s ease-out;
}
.glass-panel {
background: var(--glass-bg);
backdrop-filter: var(--blur-amount);
border: 1px solid var(--glass-border);
border-radius: var(--border-radius-md);
}
.text-gradient {
background: var(--primary-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}