Files
nodecrypt/client/css/style.css
T

1854 lines
32 KiB
CSS

body {
margin: 0;
font-family: 'Roboto', Arial, sans-serif;
height: 100vh;
overflow: hidden;
background: #fff;
}
.login-page{
display: flex;
justify-content: center;
flex-direction: column;
}
.container {
display: flex;
height: 100vh;
background: #fff;
}
.sidebar {
width: 250px;
background: #fff;
border-right: 1px solid #e0e0e0;
display: flex;
flex-direction: column;
box-shadow: 2px 0 8px #e0e0e0a0;
transition: width 0.3s ease;
}
.sidebar-user {
display: flex;
align-items: center;
padding: 17.2px 18px 10px 17px;
background: #fff;
border-bottom: 1px solid #dcdcdc;
position: relative;
}
.settings-btn {
margin-left: auto;
background: none;
border: none;
cursor: pointer;
padding: 4px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s ease;
}
.settings-btn:hover {
background: #f5f5f5;
}
.settings-btn svg {
display: block;
}
/* New settings sidebar styles */
.settings-sidebar {
width: 250px;
background: #fff;
border-right: 1px solid #e0e0e0;
display: flex;
flex-direction: column;
box-shadow: 2px 0 8px #e0e0e0a0;
transition: width 0.3s ease;
position: relative;
}
.settings-header {
display: flex;
align-items: center;
padding: 19.2px 18px 18px 12px;
background: #fff;
border-bottom: 1px solid #dcdcdc;
position: relative;
}
.settings-back-btn {
background: none;
border: none;
cursor: pointer;
padding: 4px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s ease;
margin-right: 12px;
}
.settings-back-btn:hover {
background: #f5f5f5;
}
.settings-title {
font-size: 1.3rem;
font-weight: 600;
margin: 0;
color: #30a8f7;
}
.settings-content {
flex: 1;
padding: 20px;
overflow-y: auto;
background: #fff;
}
.settings-section {
margin-bottom: 24px;
}
.settings-section-title {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 12px;
color: #222;
border-bottom: 1px solid #f0f0f0;
padding-bottom: 8px;
}
.settings-item {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 1rem;
color: #222;
margin-bottom: 12px;
padding: 8px 0;
}
.settings-item-label {
flex: 1;
margin-right: 12px;
}
.settings-item-description {
font-size: 0.9rem;
color: #666;
margin-top: 4px;
}
/* Language switcher specific styles */
/* 语言切换器专用样式 */npx browserify ChatCrypt.cjs -o ChatCrypt.js
.language-current {
font-weight: 500;
color: #30a8f7;
font-size: 0.85rem;
letter-spacing: 0.3px;
}
.settings-item .switch + .language-indicator {
display: none;
}
/* Language selector styles */
/* 语言选择器样式 */
.language-selector {
position: relative;
}
.language-select {
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 8px 32px 8px 12px;
font-size: 14px;
color: #333;
cursor: pointer;
outline: none;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
min-width: 120px;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 8px center;
background-size: 16px;
}
.language-select:hover {
border-color: #30a8f7;
}
.language-select:focus {
border-color: #30a8f7;
box-shadow: 0 0 0 3px rgba(48,168,247,0.1);
}
.language-select option {
padding: 8px 12px;
color: #333;
background: #fff;
}
.language-select option:hover {
background: #f5f5f5;
}
/* Theme selector styles */
/* 主题选择器样式 */
.theme-selector {
display: flex;
gap: 12px;
overflow-x: auto;
padding: 8px 4px;
border-radius: 8px;
background: #f8f9fa;
/* Hide scrollbars */
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE and Edge */
cursor: grab;
}
.theme-selector::-webkit-scrollbar {
display: none; /* Webkit browsers */
}
.theme-selector.dragging {
cursor: grabbing;
user-select: none;
}
.theme-item {
flex-shrink: 0;
width: 70px;
height: 70px;
border-radius: 12px;
border: 3px solid transparent;
cursor: pointer;
transition: all 0.3s ease;
user-select: none;
background-size: cover !important;
background-position: center !important;
background-repeat: no-repeat !important;
position: relative;
overflow: hidden;
}
.theme-item::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.1);
border-radius: 9px;
transition: all 0.3s ease;
}
.theme-item:hover {
border-color: #30a8f7;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(48, 168, 247, 0.25);
}
.theme-item:hover::before {
background: rgba(48, 168, 247, 0.1);
}
.theme-item.active {
border-color: #30a8f7;
box-shadow: 0 0 0 2px rgba(48, 168, 247, 0.3);
}
.theme-item.active::before {
background: rgba(48, 168, 247, 0.15);
}
/* Old settings panel - hide */
.settings-panel {
display: none !important;
}
/* Old settings panel styles - remove */
.settings-panel-card,
.settings-panel-card.open-anim,
.settings-panel-card.close-anim {
display: none !important;
}
.switch {
position: relative;
display: inline-block;
width: 38px;
height: 22px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #e0e0e0;
border-radius: 22px;
transition: background-color 0.3s ease;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 3px;
bottom: 3px;
background: #fff;
border-radius: 50%;
box-shadow: 0 1px 4px #0001;
transition: transform 0.3s ease;
}
.switch input:checked+.slider {
background: #30a8f7;
}
.switch input:checked+.slider:before {
transform: translateX(16px);
}
.settings-close {
position: absolute;
right: 18px;
top: 14px;
background: none;
border: none;
font-size: 1.7rem;
color: #888;
cursor: pointer;
z-index: 3;
line-height: 1;
border-radius: 50%;
transition: background-color 0.2s ease, color 0.2s ease;
}
.settings-close:hover {
background: #f5f5f5;
color: #30a8f7;
}
.sidebar .join-room {
display: flex;
align-items: center;
justify-content: flex-start;
padding: 18px 0 18px 0;
background: #fff;
border-bottom: 1px solid #e0e0e0;
font-size: 1.13rem;
font-weight: 600;
letter-spacing: 1px;
cursor: pointer;
user-select: none;
transition: background-color 0.2s ease;
}
.sidebar .join-room input,
.sidebar .join-room .menu-icon {
display: none !important;
}
.sidebar .join-room:hover {
background: #f5f5f5;
}
.sidebar .rooms {
flex: 1;
overflow-y: auto;
background: #fff;
}
.room {
display: flex;
align-items: center;
padding: 20px 15px;
border-bottom: 2px solid #ededed3b;
cursor: pointer;
background: #fff;
border-radius: 10px;
margin: 6px 8px;
box-sizing: border-box;
position: relative;
box-shadow: none;
transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.room.active {
background: #7bc0ff;
}
.room.active:hover {
background: #7bc0ff;
}
.room:hover:not(.active) {
background: #f5f5f5;
}
.room .info {
flex: 1;
}
.room .title {
font-weight: 500;
font-size: 16px;
}
.room .lastmsg {
font-size: 13px;
color: #888;
margin-top: 2px;
}
.room .time {
font-size: 12px;
color: #999;
}
.room .unread {
background: #30a8f7;
color: #fff;
font-size: 12px;
border-radius: 10px;
padding: 2px 7px;
margin-left: 8px;
min-width: 20px;
text-align: center;
}
.room-unread-badge {
position: absolute;
right: 18px;
top: 50%;
transform: translateY(-50%);
min-width: 22px;
height: 22px;
background: linear-gradient(135deg, #ff3b30 60%, #ff5e62 100%);
color: #fff;
font-size: 13px;
font-weight: bold;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 0.5px;
z-index: 2;
user-select: none;
pointer-events: none;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.room:not(.active) .room-unread-badge {
animation: badge-pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes badge-pop {
0% {
transform: scale(0.3) translateY(-50%);
opacity: 0;
}
50% {
transform: scale(1.1) translateY(-50%);
opacity: 1;
}
100% {
transform: scale(1) translateY(-50%);
opacity: 1;
}
}
.main {
display: flex;
flex-direction: column;
background-size: 100% 100%;
position: relative;
flex: 2.5;
}
.main::before { content: "";
position: absolute;
inset: 0;
background: url(../assets/wallpaper.png) left top / auto 100% no-repeat;
opacity: 0.15;
mix-blend-mode: multiply;
pointer-events: none;
z-index: 0;
}
.main-header {
display: flex;
align-items: center;
padding: 14.6px;
background: #fff;
justify-content: space-between;
min-height: 30px;
position: relative;
z-index: 3;
}
.main-header .group-title {
font-weight: bold;
font-size: 18px;
margin-left: 16px;
color: #222;
}
.main-header-right {
position: relative;
display: flex;
align-items: center;
height: 100%;
}
.main-header-actions {
position: relative;
display: flex;
align-items: center;
height: 100%;
}
.pinned {
padding: 2px 24px;
background: #fff;
font-size: 13px;
color: #2a5d8f;
border-bottom: 1px solid #eee;
min-height: 18px;
border-left: 4px solid #30a8f7;
font-weight: 500;
}
.chat-area {
flex: 1;
overflow-y: auto;
padding: 32px 24px 24px 24px;
display: flex;
flex-direction: column;
background: none;
z-index: 1;
}
.bubble {
max-width: 80%;
padding: 12px 18px;
border-radius: 13px;
margin-bottom: .375rem;
font-size: 15px;
line-height: 1.6;
position: relative;
word-break: break-all;
display: flex;
flex-direction: column;
}
.bubble-content {
display: block;
word-break: break-all;
}
.bubble-meta {
font-size: 12px;
color: #999;
margin-left: 0;
align-self: flex-end;
position: absolute;
right: 3px;
bottom: 7px;
display: inline-block;
background: transparent;
line-height: 1;
}
.bubble.me {
background: #e3fee0;
color: #222;
margin-left: auto;
border-bottom-right-radius: 0px;
padding: 10px 39px 7px 10px;
}
.bubble.other {
background: #fff;
max-width: 100%;
color: #222;
border-bottom-left-radius: 0px;
margin-left: 0px;
padding: 1px 40px 5px 10px;
}
.bubble.other .bubble-meta {
right: 4px;
}
.bubble .bubble-meta {
font-size: 12px;
color: #999;
text-align: right;
}
/* Special positioning for file message bubbles */
/* 文件消息气泡的特殊定位 */
.bubble:has(.file-message) .bubble-meta {
position: static;
margin-left: 0;
align-self: flex-end;
text-align: right;
}
/* Remove right padding for file message bubbles since timestamp is not absolute */
/* 移除文件消息气泡的右边距,因为时间戳不是绝对定位 */
.bubble.me:has(.file-message) {
padding: 10px 10px 7px 10px;
}
.bubble.other:has(.file-message) {
padding: 1px 10px 5px 10px;
}
/* Fallback for browsers that don't support :has() */
/* 为不支持 :has() 的浏览器提供后备方案 */
.bubble.file-bubble .bubble-meta {
position: static;
margin-left: 0;
align-self: flex-end;
text-align: right;
}
/* Fallback: Remove right padding for file message bubbles */
/* 后备方案:移除文件消息气泡的右边距 */
.bubble.me.file-bubble {
padding: 10px 10px 7px 10px;
}
.bubble.other.file-bubble {
padding: 1px 10px 5px 10px;
}
.bubble-other-wrap {
display: flex;
align-items: flex-end;
position: relative;
z-index: 2;
margin-bottom: .375rem;
}
.bubble-other-main {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.bubble-other-name {
font-size: 13px;
color: #30a8f7;
font-weight: 500;
margin-left: -5px;
}
:root {
--chat-input-border-radius: 1rem;
--chat-input-size: 3.25rem;
--chat-input-inner-padding: 1.25rem;
--surface-color: #fff;
}
.chat-input-area {
display: flex;
justify-content: center;
align-items: flex-end;
padding: 3px 30px 17px 30px;
background: none;
}
.rows-wrapper {
transform: translate(0) scaleX(1);
border-end-end-radius: 0;
min-height: 37px;
max-height: none;
}
.chat-input-wrapper {
--padding-vertical: .6000rem;
--padding-horizontal: var(--chat-input-inner-padding);
--padding: var(--padding-vertical) var(--padding-horizontal);
--button-size: 2.125rem;
--button-horizontal-margin: .125rem;
display: flex;
align-items: center;
flex-direction: column;
width: 80%;
justify-content: center;
border-radius: var(--chat-input-border-radius);
min-height: 37px;
max-height: none;
flex: 0 0 auto;
position: relative;
z-index: 3;
background: none;
}
.chat-input-wrapper::before {
content: " ";
position: absolute;
inset: 0;
border-radius: inherit;
box-shadow: 0 1px 8px 1px #0000001f;
background-color: var(--surface-color);
opacity: 1;
z-index: -1;
}
.bubble-tail {
position: absolute;
left: 12px;
bottom: 0;
fill: #fff;
z-index: 2;
display: none;
}
.new-message-wrapper {
display: flex;
align-items: flex-end;
width: 100%;
padding: var(--padding);
position: relative;
}
.btn-icon.toggle-emoticons {
width: var(--button-size);
height: var(--button-size);
border: none;
background: none;
margin-right: var(--button-horizontal-margin);
font-size: 1.5rem;
color: #30a8f7;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-icon.toggle-emoticons:hover {
background: #f5f5f5;
}
.btn-icon.toggle-emoticons:active {
transform: scale(0.95);
}
.chat-emoji-btn {
background: none;
border: none;
cursor: pointer;
color: #808080;
display: flex;
align-items: center;
justify-content: center;
margin: 0px 10px 3px 10px;
padding-left: unset;
padding-right: unset;
transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.chat-emoji-btn:hover {
color: #007bff;
background: #f5f5f5;
border-radius: 50%;
}
.chat-emoji-btn:active {
transform: scale(0.95);
}
.btn-icon.rp.btn-menu-toggle {
position: relative;
width: 2.125rem;
height: 2.125rem;
border: none;
background: none;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
overflow: hidden;
transition: background-color 0.2s ease;
}
.btn-icon.rp.btn-menu-toggle:hover {
background: rgba(48, 168, 247, 0.10);
}
.c-ripple {
position: absolute;
border-radius: 50%;
pointer-events: none;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(48, 168, 247, 0.18);
opacity: 0;
transform: scale(0.5);
z-index: 1;
transition: opacity 0.3s ease, transform 0.3s ease;
}
.btn-icon.rp.btn-menu-toggle:active .c-ripple {
opacity: 1;
transform: scale(1.2);
}
.tgico.button-icon {
font-size: 1.3rem;
z-index: 2;
position: relative;
}
.input-message-container {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
margin: 0 30px 0 0;
justify-content: center;
min-height: 37px;
max-height: none;
}
.input-message-input {
min-height: 37px;
max-height: calc(37px * 14);
outline: none;
border: none;
background: transparent;
font-size: 16px;
line-height: 37px;
padding: 0;
margin: 0;
resize: none;
color: #222;
width: 99%;
overflow-y: auto !important;
display: block;
white-space: pre-wrap;
word-break: break-word;
word-wrap: break-word;
overflow-wrap: break-word;
max-width: 99%;
}
.input-field-placeholder {
position: absolute;
left: 0;
top: 0;
color: #aaa;
font-size: 16px;
pointer-events: none;
padding: 0;
margin: 0;
line-height: 37px;
white-space: pre;
display: flex;
align-items: center;
opacity: 1;
transition: opacity 0.2s ease;
}
.input-message-input:not(:empty)+.input-field-placeholder {
opacity: 0;
}
.input-message-input:empty+.input-field-placeholder {
opacity: 1;
}
.input-field-input-fake {
display: none;
}
.chat-input {
display: none !important;
}
.more-btn {
width: 40px;
height: 40px;
border: none;
background: none;
border-radius: 50%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
position: relative;
overflow: hidden;
gap: 3px;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.more-btn:hover {
background: #f5f5f5;
}
.more-btn:active {
transform: scale(0.95);
}
.more-menu {
display: none;
position: absolute;
right: 0;
top: 44px;
background: #fff;
border-radius: 10px;
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.18);
min-width: 120px;
z-index: 100;
font-size: 1rem;
width: max-content;
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
--transform-extra: translateX(0);
--transform-origin-x: center;
--transform-origin-y: center;
transform-origin: var(--transform-origin-x) var(--transform-origin-y);
transform: var(--transform-extra);
opacity: 0;
pointer-events: none;
transform: translateY(-10px) scale(0.95);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.more-menu.open {
display: block;
opacity: 1;
pointer-events: auto;
transform: translateY(0) scale(1);
}
.more-menu.close {
opacity: 0;
pointer-events: none;
transform: translateY(-10px) scale(0.95);
}
.more-menu-item {
padding: 6px 40px;
cursor: pointer;
border-radius: 6px;
font-size: 15px;
color: #222;
margin: 5px 5px;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.more-menu-item:hover {
background: #f5f5f5;
transform: translateX(2px);
}
.rightbar {
width: 250px;
background: #fff;
border-left: 1px solid #e0e0e0;
display: flex;
flex-direction: column;
box-shadow: -2px 0 8px #e0e0e0a0;
transition: width 0.3s ease;
}
.rightbar-header {
padding: 20.27px 18px 24px 18px;
border-bottom: 1px solid #dcdcdc;
}
.rightbar-group {
display: flex;
align-items: center;
justify-content: space-around;
}
.rightbar .group-info .title {
font-size: 18px;
font-weight: 600;
color: #222;
}
.rightbar .group-info .group-desc {
font-size: 13px;
color: #888;
}
.rightbar-tabs {
background: #fff;
border-radius: 0 0 0 0;
box-shadow: 0 2px 8px #e0e0e020;
}
.rightbar .tabs {
display: flex;
border-bottom: 1px solid #f3f3f3;
margin: 0 18px;
}
.rightbar .tabs div {
padding: 10px 16px;
cursor: pointer;
font-size: 15px;
color: #30a8f7;
font-weight: 500;
border-bottom: 1px solid #f3f3f3;
border-radius: 8px 8px 0 0;
margin-right: 8px;
transition: background-color 0.2s ease, color 0.2s ease, border-bottom-color 0.2s ease;
}
.rightbar .tabs .active {
background: #fff;
color: #30a8f7;
border-bottom: 2px solid #30a8f7;
}
.members {
flex: 1;
overflow-y: auto;
padding: 10px 0;
background: #fff;
}
.member {
display: flex;
align-items: center;
padding: 10px 18px;
border-radius: 8px;
margin: 6px 8px;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.member:hover {
background: #f5f5f5;
transform: translateX(2px);
}
.member .member-info {
flex: 1;
}
.member .member-name {
font-weight: 500;
font-size: 15px;
color: #222;
}
.member .member-status {
font-size: 12px;
color: #30a8f7;
}
.member-tip {
font-size: 13px;
color: #888;
padding: 4px 18px 2px 18px;
margin: 0 0 2px 0;
user-select: none;
}
.member-tip-center {
text-align: center;
justify-content: center;
display: flex;
}
::-webkit-scrollbar {
width: 4px;
background: #fff;
}
::-webkit-scrollbar-thumb {
background: #e0e0e0;
border-radius: 4px;
}
/* File message styles */
/* 文件消息样式 */
.file-message {
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
max-width: 320px;
width: 100%;
position: relative;
}
.file-main-content {
display: flex;
align-items: center;
padding: 3px 3px;
gap: 12px;
max-width: 200px;
}
.file-info {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
}
.file-icon {
font-size: 24px;
margin-right: 12px;
flex-shrink: 0;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
.file-details {
flex: 1;
min-width: 0;
}
.file-name {
font-weight: 600;
font-size: 14px;
color: #2c3e50;
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.2;
}
.file-meta {
font-size: 12px;
color: #7f8c8d;
font-weight: 500;
}
.file-download-btn {
padding: 10px;
background: linear-gradient(135deg, #52abff, #4fc3f7);
color: white;
border: none;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: none;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
flex-shrink: 0;
opacity: 0;
transform: scale(0.8) translateY(5px);
position: relative;
overflow: hidden;
}
.file-download-btn.show {
opacity: 1;
transform: scale(1) translateY(0);
display: flex;
}
.file-download-btn.show.animate-in {
animation: downloadBtnAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes downloadBtnAppear {
0% {
opacity: 0;
transform: scale(0.6) translateY(10px) rotate(-5deg);
}
60% {
opacity: 1;
transform: scale(1.1) translateY(-2px) rotate(2deg);
}
100% {
opacity: 1;
transform: scale(1) translateY(0) rotate(0deg);
}
}
.file-download-btn svg {
width: 20px;
height: 20px;
fill: currentColor;
}
.file-download-btn:hover {
background: linear-gradient(135deg, #2196f3, #42a5f5);
transform: translateY(-2px);
}
.file-download-btn:active {
transform: translateY(0);
}
.file-download-btn:disabled {
background: linear-gradient(135deg, #bdc3c7, #95a5a6);
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.file-progress-container {
padding: 0 16px 12px;
margin-top: -4px;
opacity: 1;
max-height: 60px;
overflow: hidden;
transition: opacity 0.4s ease, max-height 0.4s ease, padding 0.4s ease;
}
.file-progress-container.fade-out {
opacity: 0;
max-height: 0;
padding: 0 16px 0;
}
.file-progress-bar {
width: 100%;
height: 6px;
background: rgba(48, 168, 247, 0.1);
border-radius: 6px;
overflow: hidden;
margin-bottom: 8px;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
transition: opacity 0.3s ease;
}
.file-progress {
height: 100%;
background: linear-gradient(90deg, #30a8f7, #4fc3f7, #66d9ef);
border-radius: 6px;
transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
width: 0%;
position: relative;
overflow: hidden;
}
.file-progress::after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
animation: shimmer 2s infinite;
}
@keyframes shimmer {
0% { left: -100%; }
100% { left: 100%; }
}
.file-status {
font-size: 11px;
color: #5a6c7d;
text-align: center;
font-weight: 500;
background: rgba(48, 168, 247, 0.05);
padding: 4px 8px;
border-radius: 8px;
display: inline-block;
width: 100%;
box-sizing: border-box;
}
.bubble.private-message .file-meta,
.bubble.private-message .file-name{
color:#ffffff !important;
}
.bubble.private-message .file-message .file-download-btn {
background: linear-gradient(135deg, #ff9800, #ffb74d);
box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}
.bubble.private-message .file-message .file-download-btn:hover {
background: linear-gradient(135deg, #f57c00, #ff9800);
box-shadow: 0 4px 16px rgba(255, 152, 0, 0.4);
}
.bubble.private-message .file-message .file-progress {
background: linear-gradient(90deg, #ff9800, #ffb74d, #ffcc80);
}
.bubble.private-message .file-message .file-status {
background: rgba(255, 152, 0, 0.05);
color: #ffffff !important;
}
/* File Upload Modal Styles */
/* 文件上传模态框样式 */
.file-upload-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10000;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.file-upload-modal.show {
opacity: 1;
visibility: visible;
}
.file-upload-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
}
.file-upload-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
border-radius: 12px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
width: 90%;
max-width: 600px;
max-height: 80vh;
display: flex;
flex-direction: column;
}
.file-upload-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 24px;
border-bottom: 1px solid #e0e0e0;
}
.file-upload-header h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #333;
}
.file-upload-close {
background: none;
border: none;
font-size: 24px;
color: #666;
cursor: pointer;
padding: 0;
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s ease;
}
.file-upload-close:hover {
background: #f5f5f5;
}
.file-upload-content {
flex: 1;
padding: 24px;
overflow-y: auto;
}
.file-drop-zone {
border: 2px dashed #ddd;
border-radius: 8px;
padding: 40px 20px;
text-align: center;
transition: all 0.3s ease;
background: #fafafa;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 200px;
}
.file-drop-zone:hover,
.file-drop-zone.drag-over {
border-color: #007bff;
background: #f0f8ff;
}
.file-drop-icon {
font-size: 48px;
margin-bottom: 16px;
opacity: 0.6;
}
.file-drop-text p {
margin: 8px 0;
color: #666;
}
.file-drop-text p:first-child {
font-size: 16px;
color: #333;
}
.file-browse-btn {
background: none;
border: none;
color: #007bff;
cursor: pointer;
text-decoration: underline;
font-size: inherit;
padding: 0;
}
.file-browse-btn:hover {
color: #0056b3;
}
.file-list-container {
animation: fadeInUp 0.3s ease;
}
.file-list-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid #e0e0e0;
}
.file-list-title {
font-weight: 600;
color: #333;
}
.file-clear-all-btn {
background: none;
border: 1px solid #dc3545;
color: #dc3545;
padding: 6px 12px;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
transition: all 0.2s ease;
}
.file-clear-all-btn:hover {
background: #dc3545;
color: #fff;
}
.file-list {
max-height: 300px;
overflow-y: auto;
margin-bottom: 16px;
}
.file-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px;
background: #f8f9fa;
border-radius: 6px;
margin-bottom: 8px;
transition: background-color 0.2s ease;
}
.file-item:hover {
background: #e9ecef;
}
.file-item-info {
flex: 1;
min-width: 0;
}
.file-item-name {
font-weight: 500;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 4px;
}
.file-item-size {
font-size: 12px;
color: #666;
}
.file-item-remove {
background: none;
border: none;
color: #dc3545;
cursor: pointer;
padding: 4px;
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
transition: background-color 0.2s ease;
margin-left: 12px;
}
.file-item-remove:hover {
background: rgba(220, 53, 69, 0.1);
}
.file-list-summary {
padding: 12px;
background: #e3f2fd;
border-radius: 6px;
color: #1976d2;
font-size: 14px;
text-align: center;
}
.file-upload-footer {
display: flex;
justify-content: flex-end;
gap: 12px;
padding: 20px 24px;
border-top: 1px solid #e0e0e0;
}
.file-upload-cancel-btn,
.file-upload-send-btn {
padding: 10px 24px;
border-radius: 6px;
border: none;
cursor: pointer;
font-weight: 500;
transition: all 0.2s ease;
}
.file-upload-cancel-btn {
background: #f8f9fa;
color: #6c757d;
border: 1px solid #dee2e6;
}
.file-upload-cancel-btn:hover {
background: #e9ecef;
}
.file-upload-send-btn {
background: #007bff;
color: #fff;
}
.file-upload-send-btn:hover:not(:disabled) {
background: #0056b3;
}
.file-upload-send-btn:disabled {
background: #6c757d;
cursor: not-allowed;
opacity: 0.6;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Responsive design for mobile */
@media (max-width: 768px) {
.file-upload-container {
width: 95%;
max-height: 90vh;
}
.file-upload-content {
padding: 16px;
}
.file-drop-zone {
padding: 30px 15px;
min-height: 150px;
}
.file-drop-icon {
font-size: 36px;
}
}
/* Responsive Design for File Messages */
/* 文件消息响应式设计 */
@media (max-width: 768px) {
.file-message {
max-width: 280px;
}
.file-main-content {
padding: 3px 3px;
gap: 10px;
}
.file-icon {
font-size: 20px;
margin-right: 10px;
}
.file-name {
font-size: 13px;
}
.file-meta {
font-size: 11px;
}
.file-download-btn {
padding: 8px;
width: 36px;
height: 36px;
}
.file-download-btn svg {
width: 18px;
height: 18px;
}
.file-progress-container {
padding: 0 14px 10px;
}
.file-progress-bar {
height: 5px;
}
.file-status {
font-size: 10px;
padding: 3px 6px;
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.file-download-btn {
position: relative;
overflow: hidden;
}
.file-download-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: left 0.6s ease;
}
.file-download-btn:hover::before {
left: 100%;
}
/* Image preview in input */
/* 输入框图片预览样式 */
.input-image-preview {
position: relative;
display: inline-block; /* 改为 inline-block 以便并排显示 */
margin: 4px; /* 统一 margin */
border-radius: 8px;
overflow: visible; /* 允许移除按钮稍微超出 */
background: #f8f9fa;
border: 1px solid #e9ecef; /* 边框调整 */
transition: all 0.2s ease;
max-width: 80px; /* 限制预览容器的最大宽度 */
}
.input-image-preview:hover {
border-color: #007bff;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1); /* 调整阴影 */
}
.input-image-preview-img {
display: block;
width: 100%; /* 图片宽度充满容器 */
height: 60px; /* 固定高度 */
object-fit: cover;
border-radius: 6px; /* 轻微圆角 */
}
.input-image-remove-btn {
position: absolute;
top: -10px; /* 调整位置使其更易点击 */
right: -10px; /* 调整位置使其更易点击 */
width: 22px; /* 增大点击区域 */
height: 22px; /* 增大点击区域 */
border: none;
border-radius: 50%;
background: #dc3545;
color: white;
font-size: 12px;
font-weight: bold;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.input-image-remove-btn:hover {
background: #c82333;
transform: scale(1.1);
}
.input-image-remove-btn:active {
transform: scale(0.95);
}
/* Image message in chat bubble */
/* 聊天气泡中的图片消息样式 */
.bubble-img {
max-width: 300px;
width: 100%;
height: auto;
max-height: 200px;
object-fit: contain;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
display: block;
margin: 4px 0;
}
.bubble-img:hover {
transform: scale(1.02);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.bubble-content .bubble-img:first-child {
margin-top: 0;
}
.bubble-content .bubble-img:last-child {
margin-bottom: 0;
}
/* Mixed content (text + image) */
/* 混合内容(文字 + 图片)样式 */
.bubble-content.mixed-content {
display: flex;
flex-direction: column;
gap: 8px;
}
.bubble-content.mixed-content .message-text {
margin: 0;
}
.bubble-content.mixed-content .bubble-img {
margin: 0;
}
@media (max-width: 768px) {
.input-image-preview-img {
width: 60px;
height: 45px;
}
.bubble-img {
max-width: 250px;
max-height: 180px;
}
}
@media (max-width: 480px) {
.input-image-preview-img {
width: 50px;
height: 38px;
}
.bubble-img {
max-width: 200px;
max-height: 150px;
}
}
.powered-by {
text-align: center;
color: #aaa;
font-size: 13px;
margin: 24px 0 8px 0;
letter-spacing: 0.2px;
}
.powered-by a {
color: #30a8f7;
text-decoration: none;
}
.powered-by a:hover {
text-decoration: underline;
}
h2{
margin: 0%;
}