添加德古拉主题

This commit is contained in:
captain committed 2026-02-16 17:28:07 +08:00
1 parent 27fe919ae8
commit 8be65cc588
1 file changed
+290 -128
+290 -128
View File
@@ -1,78 +1,82 @@
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
margin: 0;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 0;
background: #282a36;
height: 100vh;
overflow: hidden;
color: #f8f8f2;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
border-radius: 12px;
padding: 30px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
height: 100vh;
display: flex;
flex-direction: column;
background: #282a36;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 2px solid #f0f0f0;
padding: 15px 20px;
background: #44475a;
color: #f8f8f2;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
h1 {
margin: 0;
color: #333;
color: #bd93f9;
font-size: 24px;
}
h2 {
color: #555;
color: #f8f8f2;
font-size: 18px;
margin-bottom: 15px;
}
#edit-name-btn {
background: #667eea;
color: white;
background: #bd93f9;
color: #282a36;
border: none;
padding: 10px 20px;
padding: 8px 16px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: background 0.3s;
transition: all 0.3s;
font-weight: 600;
}
#edit-name-btn:hover {
background: #5568d3;
background: #ff79c6;
}
.edit-panel {
background: #f8f9fa;
background: #44475a;
padding: 20px;
margin: 0 20px 20px 20px;
border-radius: 8px;
margin-bottom: 20px;
border: 1px solid #e0e0e0;
border: 1px solid #6272a4;
}
#new-name-input {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border: 2px solid #6272a4;
border-radius: 6px;
font-size: 16px;
box-sizing: border-box;
margin-bottom: 10px;
transition: border-color 0.3s;
background: #282a36;
color: #f8f8f2;
}
#new-name-input:focus {
outline: none;
border-color: #667eea;
border-color: #bd93f9;
}
.button-group {
@@ -88,40 +92,42 @@ h2 {
font-size: 14px;
cursor: pointer;
transition: all 0.3s;
font-weight: 600;
}
#save-name-btn {
background: #28a745;
color: white;
background: #50fa7b;
color: #282a36;
}
#save-name-btn:hover:not(:disabled) {
background: #218838;
background: #5af78e;
}
#save-name-btn:disabled {
background: #ccc;
background: #44475a;
color: #6272a4;
cursor: not-allowed;
}
#cancel-name-btn {
background: #6c757d;
color: white;
background: #6272a4;
color: #f8f8f2;
}
#cancel-name-btn:hover {
background: #5a6268;
background: #44475a;
}
.error-msg {
color: #dc3545;
color: #ff5555;
font-size: 14px;
margin-top: 10px;
min-height: 20px;
}
.user-list-container {
margin-top: 20px;
margin-top: 0;
}
#user-list {
@@ -131,41 +137,42 @@ h2 {
}
#user-list li {
background: #f8f9fa;
padding: 15px;
margin-bottom: 10px;
border-radius: 8px;
background: #44475a;
padding: 15px 20px;
border-bottom: 1px solid #6272a4;
display: flex;
justify-content: space-between;
align-items: center;
transition: background 0.3s;
cursor: pointer;
}
#user-list li:hover {
background: #e9ecef;
background: #6272a4;
}
#user-list li.offline {
background: #fff3cd;
opacity: 0.7;
background: #44475a;
opacity: 0.6;
}
#user-list li.offline:hover {
background: #ffe69c;
background: #6272a4;
opacity: 0.8;
}
.user-name {
font-weight: 600;
color: #333;
color: #f8f8f2;
}
.user-addr {
color: #6c757d;
color: #8be9fd;
font-size: 14px;
}
.user-status {
color: #856404;
color: #f1fa8c;
font-size: 12px;
font-style: italic;
margin-left: 10px;
@@ -175,41 +182,34 @@ h2 {
content: "暂无在线用户";
display: block;
text-align: center;
color: #999;
padding: 20px;
color: #6272a4;
padding: 40px 20px;
font-style: italic;
}
/* 主内容区域 - 左右布局 */
/* 主内容区域 - 左右布局(横屏)*/
.main-content {
display: flex;
gap: 20px;
margin-top: 20px;
flex: 1;
overflow: hidden;
}
.user-list-container {
flex: 0 0 300px;
margin-top: 0;
}
#user-list li {
cursor: pointer;
}
#user-list li:hover {
background: #e9ecef;
border-right: 1px solid #6272a4;
overflow-y: auto;
background: #282a36;
}
#user-list li.active {
background: #667eea;
color: white;
background: #bd93f9;
color: #282a36;
}
#user-list li.active .user-name,
#user-list li.active .user-addr,
#user-list li.active .user-status {
color: white;
color: #282a36;
}
/* 聊天容器 */
@@ -217,33 +217,51 @@ h2 {
flex: 1;
display: flex;
flex-direction: column;
background: #f8f9fa;
border-radius: 8px;
background: #282a36;
overflow: hidden;
}
/* 小屏幕上聊天容器默认隐藏,打开时占满屏幕 */
@media (max-width: 768px) {
.chat-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
display: none; /* 默认隐藏 */
}
/* 当 display: flex 时会占满屏幕 */
}
.chat-header {
background: #667eea;
color: white;
padding: 15px;
background: #44475a;
color: #f8f8f2;
padding: 15px 20px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
#close-chat-btn {
background: transparent;
border: none;
color: white;
color: #ff5555;
font-size: 20px;
cursor: pointer;
padding: 0;
padding: 5px;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
}
#close-chat-btn:hover {
background: rgba(255, 255, 255, 0.2);
background: rgba(255, 85, 85, 0.2);
border-radius: 4px;
}
@@ -251,8 +269,7 @@ h2 {
flex: 1;
padding: 20px;
overflow-y: auto;
max-height: 400px;
background: white;
background: #282a36;
}
.message {
@@ -277,86 +294,102 @@ h2 {
}
.message.sent .message-content {
background: #667eea;
color: white;
background: #bd93f9;
color: #282a36;
font-weight: 500;
}
.message.received .message-content {
background: #e9ecef;
color: #333;
background: #44475a;
color: #f8f8f2;
}
.message-time {
font-size: 11px;
color: #999;
color: #6272a4;
margin-top: 5px;
}
.chat-input-container {
display: flex;
gap: 10px;
padding: 15px;
background: white;
border-top: 1px solid #e0e0e0;
padding: 15px 20px;
background: #44475a;
border-top: 1px solid #6272a4;
}
#attach-file-btn {
background: #6c757d;
color: white;
background: #6272a4;
color: #f8f8f2;
border: none;
padding: 10px 15px;
border-radius: 6px;
cursor: pointer;
font-size: 18px;
flex-shrink: 0;
}
#attach-file-btn:hover {
background: #5a6268;
background: #ff79c6;
}
#chat-input {
flex: 1;
padding: 10px;
border: 2px solid #ddd;
border: 2px solid #6272a4;
border-radius: 6px;
font-size: 14px;
background: #282a36;
color: #f8f8f2;
}
#chat-input:focus {
outline: none;
border-color: #667eea;
border-color: #bd93f9;
}
#send-btn {
background: #667eea;
color: white;
background: #50fa7b;
color: #282a36;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
flex-shrink: 0;
font-weight: 600;
}
#send-btn:hover {
background: #5568d3;
background: #5af78e;
}
#send-btn:disabled {
background: #ccc;
background: #44475a;
color: #6272a4;
cursor: not-allowed;
}
.message-file {
background: #f0f0f0;
background: #44475a;
padding: 10px;
border-radius: 8px;
margin-top: 5px;
cursor: pointer;
border: 1px solid #6272a4;
}
.message-file:hover {
background: #e0e0e0;
background: #6272a4;
}
.message.sent .message-file {
background: #6272a4;
border-color: #bd93f9;
}
.message.sent .message-file:hover {
background: #44475a;
}
.file-icon {
@@ -371,10 +404,15 @@ h2 {
.file-name {
font-weight: 600;
color: #f8f8f2;
}
.message.sent .file-name {
color: #f8f8f2;
}
.file-size {
color: #666;
color: #8be9fd;
font-size: 12px;
margin-left: 10px;
}
@@ -386,33 +424,34 @@ h2 {
}
#settings-btn {
background: #764ba2;
color: white;
background: #ff79c6;
color: #282a36;
border: none;
padding: 10px 20px;
padding: 8px 16px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: background 0.3s;
transition: all 0.3s;
font-weight: 600;
}
#settings-btn:hover {
background: #5a3a7a;
background: #ff92d0;
}
/* 设置面板 */
.settings-panel {
background: #f9f9f9;
border: 1px solid #ddd;
background: #44475a;
border: 1px solid #6272a4;
border-radius: 8px;
padding: 20px;
margin-bottom: 20px;
margin: 0 20px 20px 20px;
}
.settings-panel h2 {
margin-top: 0;
margin-bottom: 20px;
color: #333;
color: #bd93f9;
}
.settings-content {
@@ -429,7 +468,7 @@ h2 {
.setting-item label {
font-weight: 500;
color: #555;
color: #f8f8f2;
display: flex;
align-items: center;
gap: 8px;
@@ -449,66 +488,71 @@ h2 {
#download-path-input {
flex: 1;
padding: 10px;
border: 1px solid #ddd;
border: 1px solid #6272a4;
border-radius: 6px;
background: #f5f5f5;
background: #282a36;
color: #f8f8f2;
font-size: 14px;
}
#choose-path-btn {
background: #667eea;
color: white;
background: #8be9fd;
color: #282a36;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: background 0.3s;
flex-shrink: 0;
font-weight: 600;
}
#choose-path-btn:hover {
background: #5568d3;
background: #a0f0ff;
}
#save-settings-btn {
background: #4caf50;
color: white;
background: #50fa7b;
color: #282a36;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: background 0.3s;
font-weight: 600;
}
#save-settings-btn:hover {
background: #45a049;
background: #5af78e;
}
#cancel-settings-btn {
background: #f44336;
color: white;
background: #ff5555;
color: #f8f8f2;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: background 0.3s;
font-weight: 600;
}
#cancel-settings-btn:hover {
background: #da190b;
background: #ff6e6e;
}
#settings-error-msg {
color: #f44336;
color: #ff5555;
font-size: 14px;
margin-top: 10px;
}
/* 文件待接收状态 */
.file-pending {
color: #ff9800;
color: #f1fa8c;
font-size: 12px;
margin-top: 4px;
font-weight: 500;
@@ -516,7 +560,7 @@ h2 {
/* 文件接收完成状态 */
.file-finish {
color: #4caf50;
color: #50fa7b;
font-size: 12px;
margin-top: 4px;
font-weight: 500;
@@ -524,7 +568,7 @@ h2 {
/* 文件下载中状态 */
.file-downloading {
color: #2196f3;
color: #8be9fd;
font-size: 12px;
margin-top: 4px;
font-weight: 500;
@@ -533,7 +577,7 @@ h2 {
/* 文件上传中状态 */
.file-uploading {
color: #ff9800;
color: #f1fa8c;
font-size: 12px;
margin-top: 4px;
font-weight: 500;
@@ -551,8 +595,8 @@ h2 {
/* 接收文件按钮 */
.accept-file-btn {
background: #4caf50;
color: white;
background: #50fa7b;
color: #282a36;
border: none;
padding: 8px 16px;
border-radius: 4px;
@@ -560,16 +604,17 @@ h2 {
font-size: 14px;
margin-top: 10px;
transition: background 0.3s;
font-weight: 600;
}
.accept-file-btn:hover {
background: #45a049;
background: #5af78e;
}
/* 取消下载按钮 */
.cancel-download-btn {
background: #f44336;
color: white;
background: #ff5555;
color: #f8f8f2;
border: none;
padding: 8px 16px;
border-radius: 4px;
@@ -578,23 +623,25 @@ h2 {
margin-top: 10px;
margin-left: 10px;
transition: background 0.3s;
font-weight: 600;
}
.cancel-download-btn:hover {
background: #da190b;
background: #ff6e6e;
}
/* 成功消息样式 */
.success-msg {
color: #28a745;
background: #d4edda;
border: 1px solid #c3e6cb;
color: #282a36;
background: #50fa7b;
border: 1px solid #5af78e;
padding: 10px 15px;
border-radius: 6px;
font-size: 14px;
margin-top: 10px;
display: none;
animation: fadeIn 0.3s ease-in;
font-weight: 600;
}
.success-msg.show {
@@ -611,3 +658,118 @@ h2 {
transform: translateY(0);
}
}
/* 滚动条样式 */
.user-list-container::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
width: 8px;
}
.user-list-container::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
background: #282a36;
}
.user-list-container::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
background: #44475a;
border-radius: 4px;
}
.user-list-container::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
background: #6272a4;
}
/* 响应式布局 - 竖屏/小屏幕 */
@media (max-width: 768px) {
/* 按钮横向排布 */
.header-buttons {
flex-direction: row;
gap: 10px;
}
#edit-name-btn,
#settings-btn {
padding: 6px 12px;
font-size: 13px;
}
/* 主内容区域 */
.main-content {
flex-direction: column;
}
.user-list-container {
flex: 1;
max-height: none;
border-right: none;
border-bottom: none;
}
.message-content {
max-width: 85%;
}
.header {
padding: 12px 15px;
}
h1 {
font-size: 20px;
}
.chat-input-container {
padding: 10px 15px;
}
#attach-file-btn {
padding: 8px 12px;
font-size: 16px;
}
#send-btn {
padding: 8px 15px;
}
}
/* 超小屏幕优化 */
@media (max-width: 480px) {
/* 保持按钮横向排布 */
.header-buttons {
flex-direction: row;
gap: 8px;
}
#edit-name-btn,
#settings-btn {
padding: 6px 10px;
font-size: 12px;
flex: 1;
}
.user-list-container {
max-height: none;
}
#user-list li {
padding: 12px 15px;
}
.message-content {
max-width: 90%;
font-size: 14px;
}
.path-input-group {
flex-direction: column;
}
#choose-path-btn {
width: 100%;
}
h1 {
font-size: 18px;
}
}