251 lines
4.5 KiB
CSS
251 lines
4.5 KiB
CSS
:root {
|
|
--primary-color: #3b82f6;
|
|
--primary-hover: #2563eb;
|
|
--bg-color: #f8fafc;
|
|
--card-bg: #ffffff;
|
|
--border-color: #e2e8f0;
|
|
--text-primary: #1e293b;
|
|
--text-secondary: #64748b;
|
|
--success-color: #22c55e;
|
|
--danger-color: #ef4444;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'HarmonyOS Sans SC Medium', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background-color: var(--bg-color);
|
|
color: var(--text-primary);
|
|
line-height: 1.6;
|
|
padding: 20px;
|
|
}
|
|
|
|
.title {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.card {
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
background-color: var(--card-bg);
|
|
transition: box-shadow 0.2s ease;
|
|
}
|
|
|
|
.card:hover {
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
#container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
gap: 20px;
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
#msg-list {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
min-width: 0;
|
|
}
|
|
|
|
#online-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
width: 320px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#sysmsg {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
padding-right: 8px;
|
|
}
|
|
|
|
#sysmsg::-webkit-scrollbar {
|
|
width: 4px;
|
|
}
|
|
|
|
#sysmsg::-webkit-scrollbar-thumb {
|
|
background-color: var(--border-color);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
#usrmsg {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
max-height: calc(100vh - 280px);
|
|
padding-right: 8px;
|
|
}
|
|
|
|
#usrmsg::-webkit-scrollbar {
|
|
width: 4px;
|
|
}
|
|
|
|
#usrmsg::-webkit-scrollbar-thumb {
|
|
background-color: var(--border-color);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
#usrmsg > span {
|
|
padding: 10px 14px;
|
|
background-color: var(--bg-color);
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
word-break: break-word;
|
|
}
|
|
|
|
#online {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 8px;
|
|
padding-top: 12px;
|
|
}
|
|
|
|
#online > span {
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 8px;
|
|
padding: 8px 12px;
|
|
text-align: center;
|
|
font-size: 13px;
|
|
background-color: var(--bg-color);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
#online > span:hover {
|
|
border-color: var(--primary-color);
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
input[type="text"] {
|
|
padding: 10px 14px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
width: 100%;
|
|
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
outline: none;
|
|
}
|
|
|
|
input[type="text"]:focus {
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
}
|
|
|
|
button {
|
|
padding: 10px 20px;
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: var(--primary-hover);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
button:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.input-group {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
.input-group input {
|
|
flex: 1;
|
|
}
|
|
|
|
.input-group button {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.status-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 4px 10px;
|
|
border-radius: 20px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.status-badge.connected {
|
|
background-color: rgba(34, 197, 94, 0.1);
|
|
color: var(--success-color);
|
|
}
|
|
|
|
.status-badge.disconnected {
|
|
background-color: rgba(239, 68, 68, 0.1);
|
|
color: var(--danger-color);
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background-color: currentColor;
|
|
}
|
|
|
|
.username-display {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--primary-color);
|
|
padding: 12px 16px;
|
|
background-color: rgba(59, 130, 246, 0.05);
|
|
border-radius: 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.login-prompt {
|
|
text-align: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.login-prompt p {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 12px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
@media screen and (max-width: 900px) {
|
|
#container {
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
#online-list {
|
|
width: 100%;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
#online-list .card {
|
|
flex: 1;
|
|
min-width: 280px;
|
|
}
|
|
} |