na-kakuyu-temu-mozhno-sozdat/app.css

683 lines
11 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
background: #0a0a0a;
color: #ffffff;
overflow: hidden;
}
.app-container {
display: grid;
grid-template-columns: 360px 1fr;
height: 100vh;
}
/* Sidebar */
.sidebar {
background: #1d1d1f;
border-right: 1px solid rgba(255,255,255,0.08);
display: flex;
flex-direction: column;
}
.sidebar-header {
padding: 20px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.user-info {
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
padding: 8px;
border-radius: 12px;
transition: background 0.3s;
}
.user-info:hover {
background: rgba(255,255,255,0.05);
}
.user-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
}
.user-name {
font-weight: 600;
font-size: 15px;
}
.btn-new-chat {
width: 36px;
height: 36px;
border-radius: 50%;
background: linear-gradient(135deg, #667eea, #764ba2);
border: none;
color: white;
font-size: 20px;
cursor: pointer;
transition: all 0.3s;
}
.btn-new-chat:hover {
transform: scale(1.1);
}
.search-box {
padding: 16px 20px;
}
.search-box input {
width: 100%;
padding: 12px 16px;
background: #0a0a0a;
border: 1px solid rgba(255,255,255,0.1);
border-radius: 12px;
color: white;
font-size: 15px;
transition: border-color 0.3s;
}
.search-box input:focus {
outline: none;
border-color: #667eea;
}
.chat-list {
flex: 1;
overflow-y: auto;
}
.chat-item {
padding: 16px 20px;
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
transition: background 0.3s;
border-bottom: 1px solid rgba(255,255,255,0.03);
}
.chat-item:hover {
background: rgba(255,255,255,0.05);
}
.chat-item.active {
background: rgba(102, 126, 234, 0.15);
border-left: 3px solid #667eea;
}
.chat-avatar {
width: 48px;
height: 48px;
border-radius: 50%;
object-fit: cover;
}
.chat-item-info {
flex: 1;
min-width: 0;
}
.chat-item-name {
font-weight: 600;
font-size: 15px;
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-item-last {
color: #86868b;
font-size: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-item-time {
font-size: 12px;
color: #6e6e73;
margin-left: 8px;
}
.chat-type-badge {
font-size: 11px;
padding: 2px 8px;
border-radius: 980px;
background: rgba(102, 126, 234, 0.2);
color: #667eea;
margin-left: 8px;
}
/* Chat Area */
.chat-area {
display: flex;
flex-direction: column;
background: #0a0a0a;
}
.chat-header {
padding: 20px 24px;
border-bottom: 1px solid rgba(255,255,255,0.08);
background: #1d1d1f;
}
.chat-header-info {
display: flex;
align-items: center;
gap: 16px;
}
.chat-header-avatar {
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
}
.chat-header-info h3 {
font-size: 18px;
font-weight: 600;
margin-bottom: 4px;
}
.status {
font-size: 13px;
color: #86868b;
}
.status.online {
color: #34c759;
}
/* Messages */
.messages-container {
flex: 1;
overflow-y: auto;
padding: 24px;
}
.empty-chat {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
text-align: center;
color: #86868b;
}
.empty-icon {
font-size: 80px;
margin-bottom: 24px;
opacity: 0.5;
}
.empty-chat h3 {
font-size: 22px;
color: #f5f5f7;
margin-bottom: 8px;
}
.messages-list {
display: flex;
flex-direction: column;
gap: 16px;
}
.message {
display: flex;
gap: 12px;
max-width: 70%;
animation: messageSlide 0.3s ease;
}
@keyframes messageSlide {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.message.sent {
align-self: flex-end;
flex-direction: row-reverse;
}
.message-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
object-fit: cover;
flex-shrink: 0;
}
.message-content {
background: #1d1d1f;
padding: 12px 16px;
border-radius: 18px;
border: 1px solid rgba(255,255,255,0.08);
}
.message.sent .message-content {
background: linear-gradient(135deg, #667eea, #764ba2);
border: none;
}
.message-sender {
font-size: 13px;
font-weight: 600;
margin-bottom: 4px;
color: #667eea;
}
.message.sent .message-sender {
color: rgba(255,255,255,0.9);
}
.message-text {
font-size: 15px;
line-height: 1.5;
word-wrap: break-word;
}
.message-time {
font-size: 11px;
color: #86868b;
margin-top: 6px;
text-align: right;
}
.message.sent .message-time {
color: rgba(255,255,255,0.7);
}
/* Message Input */
.message-input-container {
padding: 20px 24px;
border-top: 1px solid rgba(255,255,255,0.08);
background: #1d1d1f;
position: relative;
}
.message-input-wrapper {
display: flex;
align-items: center;
gap: 12px;
}
.btn-emoji {
background: transparent;
border: none;
font-size: 24px;
cursor: pointer;
padding: 8px;
border-radius: 50%;
transition: background 0.3s;
}
.btn-emoji:hover {
background: rgba(255,255,255,0.1);
}
.emoji-picker {
position: absolute;
bottom: 80px;
left: 24px;
background: #1d1d1f;
border: 1px solid rgba(255,255,255,0.15);
border-radius: 16px;
padding: 16px;
display: none;
box-shadow: 0 10px 40px rgba(0,0,0,0.4);
z-index: 100;
}
.emoji-picker.active {
display: block;
}
.emoji-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
}
.emoji-item {
font-size: 24px;
cursor: pointer;
padding: 8px;
border-radius: 8px;
transition: background 0.3s;
}
.emoji-item:hover {
background: rgba(255,255,255,0.1);
}
.message-input {
flex: 1;
padding: 14px 20px;
background: #0a0a0a;
border: 1px solid rgba(255,255,255,0.1);
border-radius: 980px;
color: white;
font-size: 15px;
transition: border-color 0.3s;
}
.message-input:focus {
outline: none;
border-color: #667eea;
}
.btn-send {
width: 44px;
height: 44px;
border-radius: 50%;
background: linear-gradient(135deg, #667eea, #764ba2);
border: none;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s;
}
.btn-send:hover {
transform: scale(1.1);
}
/* Modal */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(10px);
z-index: 1000;
justify-content: center;
align-items: center;
}
.modal.active {
display: flex;
}
.modal-content {
background: #1d1d1f;
border-radius: 24px;
padding: 32px;
width: 100%;
max-width: 480px;
border: 1px solid rgba(255,255,255,0.1);
position: relative;
max-height: 80vh;
overflow-y: auto;
}
.modal-close {
position: absolute;
top: 16px;
right: 16px;
background: transparent;
border: none;
color: #86868b;
font-size: 28px;
cursor: pointer;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.3s;
}
.modal-close:hover {
background: rgba(255,255,255,0.1);
color: white;
}
.modal-content h2 {
font-size: 24px;
margin-bottom: 24px;
}
.modal-tabs {
display: flex;
gap: 8px;
margin-bottom: 24px;
}
.tab {
flex: 1;
padding: 12px;
background: transparent;
border: 1px solid rgba(255,255,255,0.15);
border-radius: 12px;
color: #86868b;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s;
}
.tab.active {
background: linear-gradient(135deg, #667eea, #764ba2);
border-color: transparent;
color: white;
}
.user-list {
display: flex;
flex-direction: column;
gap: 8px;
max-height: 300px;
overflow-y: auto;
}
.user-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
border-radius: 12px;
cursor: pointer;
transition: background 0.3s;
}
.user-item:hover {
background: rgba(255,255,255,0.05);
}
.user-item-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
}
.user-item-name {
font-weight: 500;
}
.modal-input {
width: 100%;
padding: 14px 18px;
background: #0a0a0a;
border: 1px solid rgba(255,255,255,0.15);
border-radius: 12px;
color: white;
font-size: 16px;
margin-bottom: 16px;
}
.modal-input:focus {
outline: none;
border-color: #667eea;
}
.btn-submit {
width: 100%;
padding: 16px;
background: linear-gradient(135deg, #667eea, #764ba2);
border: none;
border-radius: 12px;
color: white;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.btn-submit:hover {
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}
/* Settings */
.settings-content {
max-width: 420px;
}
.settings-avatar {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 32px;
}
.settings-avatar img {
width: 100px;
height: 100px;
border-radius: 50%;
margin-bottom: 16px;
}
.btn-change-avatar {
padding: 8px 20px;
background: transparent;
border: 1px solid rgba(255,255,255,0.2);
border-radius: 980px;
color: #667eea;
font-size: 14px;
cursor: pointer;
transition: all 0.3s;
}
.btn-change-avatar:hover {
border-color: #667eea;
background: rgba(102, 126, 234, 0.1);
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
font-size: 14px;
color: #86868b;
margin-bottom: 8px;
font-weight: 500;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 14px 18px;
background: #0a0a0a;
border: 1px solid rgba(255,255,255,0.15);
border-radius: 12px;
color: white;
font-size: 16px;
font-family: inherit;
transition: border-color 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
outline: none;
border-color: #667eea;
}
.btn-logout {
width: 100%;
padding: 16px;
margin-top: 20px;
background: transparent;
border: 2px solid #ff3b30;
border-radius: 12px;
color: #ff3b30;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.btn-logout:hover {
background: #ff3b30;
color: white;
}
/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(255,255,255,0.1);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255,255,255,0.2);
}
/* Responsive */
@media (max-width: 768px) {
.app-container {
grid-template-columns: 1fr;
}
.sidebar {
display: none;
}
.sidebar.mobile-active {
display: flex;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
}