Spaces:
Running
Running
Download styles.css from sldshr/Client_Less: direct link, hf CLI and curl.
- Browser
- Download file 21 kB
-
https://huggingface.co/spaces/sldshr/Client_Less/resolve/main/styles.css
- Command line
-
hf download hf://spaces/sldshr/Client_Less/styles.css
-
curl -L -o styles.css https://huggingface.co/spaces/sldshr/Client_Less/resolve/main/styles.css
21 kB
:root {
--bg: #12141a;
--bg-elevated: #1a1d26;
--bg-panel: #171a21;
--bg-hover: #232733;
--bg-active: #2b303d;
--border: #2a2e3a;
--border-strong: #3a3f4d;
--text: #e6e8ee;
--text-muted: #9aa0ad;
--text-faint: #6b7280;
--accent: #0dbd8b;
--accent-hover: #0fa97d;
--accent-soft: rgba(13, 189, 139, 0.14);
--danger: #ef5350;
--danger-soft: rgba(239, 83, 80, 0.12);
--radius: 10px;
--radius-sm: 7px;
--shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--mono: 'JetBrains Mono', 'Consolas', monospace;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
}
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
font-size: 14px;
line-height: 1.5;
overflow: hidden;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--border-strong);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #4a5060;
}
.hidden {
display: none !important;
}
button {
font-family: var(--font);
cursor: pointer;
}
input, textarea, select {
font-family: var(--font);
font-size: 14px;
color: var(--text);
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 12px;
outline: none;
transition: border-color 0.15s;
width: 100%;
}
input:focus, textarea:focus, select:focus {
border-color: var(--accent);
}
input::placeholder, textarea::placeholder {
color: var(--text-faint);
}
label {
display: block;
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
margin-bottom: 6px;
margin-top: 14px;
}
/* ======================= LOGIN VIEW ======================= */
.login-view {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
background:
radial-gradient(ellipse 80% 60% at 50% -20%, rgba(13, 189, 139, 0.12), transparent),
var(--bg);
}
.login-card {
width: 100%;
max-width: 420px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: 16px;
padding: 36px 32px;
box-shadow: var(--shadow);
}
.login-logo {
width: 56px;
height: 56px;
border-radius: 14px;
background: linear-gradient(135deg, var(--accent), #059669);
color: white;
font-size: 28px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 18px;
}
.login-card h1 {
text-align: center;
font-size: 22px;
font-weight: 700;
}
.login-subtitle {
text-align: center;
color: var(--text-muted);
font-size: 13px;
margin-bottom: 8px;
}
.login-tabs {
display: flex;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 3px;
margin-top: 20px;
}
.tab-btn {
flex: 1;
background: transparent;
border: none;
color: var(--text-muted);
font-size: 13px;
font-weight: 600;
padding: 8px;
border-radius: 5px;
transition: all 0.15s;
}
.tab-btn.active {
background: var(--accent-soft);
color: var(--accent);
}
.btn-primary {
width: 100%;
margin-top: 20px;
background: var(--accent);
border: none;
color: #fff;
font-weight: 600;
font-size: 14px;
padding: 11px;
border-radius: var(--radius-sm);
transition: background 0.15s;
}
.btn-primary:hover:not(:disabled) {
background: var(--accent-hover);
}
.btn-primary:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.login-error {
margin-top: 14px;
color: var(--danger);
background: var(--danger-soft);
border: 1px solid rgba(239, 83, 80, 0.3);
border-radius: var(--radius-sm);
padding: 10px 12px;
font-size: 13px;
word-break: break-word;
}
.login-hint {
margin-top: 20px;
font-size: 12px;
color: var(--text-faint);
text-align: center;
line-height: 1.6;
}
.login-hint a {
color: var(--accent);
text-decoration: none;
}
/* ======================= APP LAYOUT ======================= */
.app-view {
display: flex;
height: 100vh;
}
.sidebar {
width: 280px;
flex-shrink: 0;
background: var(--bg-elevated);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
}
.sidebar-user {
display: flex;
align-items: center;
gap: 10px;
padding: 14px 16px;
border-bottom: 1px solid var(--border);
}
.avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), #059669);
color: white;
font-size: 15px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
user-select: none;
}
.user-info {
flex: 1;
min-width: 0;
}
.user-name {
font-size: 13px;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.user-id {
font-size: 11px;
color: var(--text-faint);
font-family: var(--mono);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.icon-btn {
background: transparent;
border: none;
color: var(--text-faint);
padding: 6px;
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s;
}
.icon-btn:hover {
color: var(--danger);
background: var(--danger-soft);
}
.sidebar-actions {
display: flex;
gap: 8px;
padding: 12px 16px;
}
.action-btn {
flex: 1;
background: var(--accent-soft);
border: 1px solid rgba(13, 189, 139, 0.35);
color: var(--accent);
font-weight: 600;
font-size: 12px;
padding: 8px 10px;
border-radius: var(--radius-sm);
white-space: nowrap;
transition: all 0.15s;
}
.action-btn:hover {
background: var(--accent);
color: white;
}
.action-btn.secondary {
background: transparent;
border-color: var(--border);
color: var(--text-muted);
}
.action-btn.secondary:hover {
background: var(--bg-hover);
border-color: var(--border-strong);
color: var(--text);
}
.room-list-empty {
padding: 24px 16px;
text-align: center;
color: var(--text-faint);
font-size: 13px;
line-height: 1.5;
}
.room-search {
padding: 0 16px 10px;
}
.room-list {
flex: 1;
overflow-y: auto;
padding: 0 8px 8px;
}
.room-item {
display: flex;
align-items: center;
gap: 10px;
padding: 9px 10px;
border-radius: var(--radius-sm);
cursor: pointer;
transition: background 0.12s;
border: 1px solid transparent;
}
.room-item:hover {
background: var(--bg-hover);
}
.room-item.active {
background: var(--bg-active);
border-color: var(--border-strong);
}
.room-avatar {
width: 34px;
height: 34px;
border-radius: 50%;
background: #2b303d;
color: var(--text-muted);
font-size: 13px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
user-select: none;
}
.room-info {
flex: 1;
min-width: 0;
}
.room-name {
font-size: 13px;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.room-preview {
font-size: 11px;
color: var(--text-faint);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.room-meta {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 3px;
flex-shrink: 0;
}
.room-time {
font-size: 10px;
color: var(--text-faint);
}
.room-unread {
min-width: 18px;
height: 18px;
padding: 0 5px;
border-radius: 9px;
background: var(--accent);
color: white;
font-size: 10px;
font-weight: 700;
display: none;
align-items: center;
justify-content: center;
}
.room-unread.visible {
display: flex;
}
.sidebar-status {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-top: 1px solid var(--border);
font-size: 12px;
color: var(--text-muted);
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #f59e0b;
flex-shrink: 0;
}
.sidebar-status.connected .status-dot {
background: var(--accent);
box-shadow: 0 0 6px rgba(13, 189, 139, 0.6);
}
.sidebar-status.error .status-dot {
background: var(--danger);
}
.sidebar-status.offline .status-dot {
background: #6b7280;
}
/* ======================= MAIN PANEL ======================= */
.main-panel {
flex: 1;
display: flex;
min-width: 0;
}
.empty-state {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
color: var(--text-muted);
}
.empty-logo {
width: 72px;
height: 72px;
border-radius: 18px;
background: linear-gradient(135deg, var(--accent), #059669);
color: white;
font-size: 36px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 12px;
opacity: 0.5;
}
.empty-state h2 {
color: var(--text);
font-size: 18px;
}
.empty-state p {
font-size: 13px;
max-width: 340px;
text-align: center;
}
.chat-panel {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
}
.chat-header {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 18px;
background: var(--bg-panel);
border-bottom: 1px solid var(--border);
}
.chat-room-meta {
flex: 1;
min-width: 0;
}
.chat-room-name {
font-size: 15px;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-room-topic {
font-size: 12px;
color: var(--text-faint);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-room-count {
font-size: 12px;
color: var(--text-muted);
padding: 4px 10px;
background: var(--bg-hover);
border-radius: 12px;
white-space: nowrap;
}
/* ======================= TIMELINE ======================= */
.timeline {
flex: 1;
overflow-y: auto;
padding: 18px 22px;
display: flex;
flex-direction: column;
gap: 1px;
}
.day-divider {
display: flex;
align-items: center;
gap: 12px;
margin: 18px 0 10px;
color: var(--text-faint);
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.day-divider::before,
.day-divider::after {
content: '';
flex: 1;
height: 1px;
background: var(--border);
}
.msg {
display: flex;
gap: 10px;
padding: 4px 0;
}
.msg-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: #2b303d;
color: var(--text-muted);
font-size: 13px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-top: 2px;
user-select: none;
}
.msg-body {
flex: 1;
min-width: 0;
}
.msg-head {
display: flex;
align-items: baseline;
gap: 8px;
margin-bottom: 1px;
}
.msg-sender {
font-size: 13px;
font-weight: 600;
color: var(--text);
}
.msg-sender.self {
color: var(--accent);
}
.msg-time {
font-size: 11px;
color: var(--text-faint);
}
.msg-content {
font-size: 14px;
color: var(--text);
word-wrap: break-word;
overflow-wrap: break-word;
}
.msg-content p {
margin: 0 0 6px;
}
.msg-content p:last-child {
margin-bottom: 0;
}
.msg-content a {
color: var(--accent);
text-decoration: none;
}
.msg-content a:hover {
text-decoration: underline;
}
.msg-caption {
font-size: 12px;
color: var(--text-muted);
margin-top: 2px;
}
.msg-notice-text {
color: var(--text-muted);
}
.msg-reply-indicator {
font-size: 11px;
color: var(--text-faint);
margin-bottom: 4px;
}
.msg-content pre {
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 12px;
overflow-x: auto;
font-family: var(--mono);
font-size: 12.5px;
margin: 6px 0;
}
.msg-content code {
font-family: var(--mono);
font-size: 12.5px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 5px;
}
.msg-content pre code {
background: none;
border: none;
padding: 0;
}
.msg-content blockquote {
border-left: 3px solid var(--border-strong);
padding-left: 12px;
margin: 6px 0;
color: var(--text-muted);
}
.msg-content ul, .msg-content ol {
margin: 6px 0;
padding-left: 22px;
}
.msg-content img {
max-width: 320px;
max-height: 240px;
border-radius: var(--radius-sm);
display: block;
margin: 6px 0;
cursor: pointer;
border: 1px solid var(--border);
}
.msg-content video {
max-width: 380px;
max-height: 260px;
border-radius: var(--radius-sm);
display: block;
margin: 6px 0;
}
.msg-notice {
font-size: 12px;
color: var(--text-faint);
text-align: center;
padding: 5px 0;
}
.msg-file {
display: inline-flex;
align-items: center;
gap: 10px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 14px;
margin: 4px 0;
text-decoration: none;
color: var(--text);
transition: border-color 0.15s;
max-width: 100%;
}
.msg-file:hover {
border-color: var(--accent);
}
.msg-file-icon {
width: 36px;
height: 36px;
border-radius: 8px;
background: var(--accent-soft);
color: var(--accent);
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
flex-shrink: 0;
}
.msg-file-meta {
min-width: 0;
}
.msg-file-name {
font-size: 13px;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.msg-file-size {
font-size: 11px;
color: var(--text-faint);
}
.msg-edited {
font-size: 11px;
color: var(--text-faint);
margin-left: 4px;
}
/* ---- Reactions ---- */
.msg-reactions {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 6px;
}
.reaction-pill {
display: inline-flex;
align-items: center;
gap: 4px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 12px;
color: var(--text-muted);
font-size: 12px;
padding: 2px 9px;
transition: border-color 0.15s, color 0.15s;
}
.reaction-pill:hover {
border-color: var(--accent);
color: var(--accent);
}
.msg-actions {
position: relative;
opacity: 0;
transition: opacity 0.15s;
align-self: flex-start;
margin-top: 6px;
flex-shrink: 0;
}
.msg:hover .msg-actions {
opacity: 1;
}
.reaction-toggle {
width: 26px;
height: 26px;
border-radius: 50%;
border: 1px solid var(--border);
background: var(--bg);
color: var(--text-muted);
font-size: 14px;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s;
}
.reaction-toggle:hover {
border-color: var(--accent);
color: var(--accent);
}
.reaction-menu {
position: absolute;
top: 34px;
left: 0;
z-index: 20;
display: flex;
gap: 4px;
background: var(--bg-elevated);
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
padding: 6px;
box-shadow: var(--shadow);
}
.reaction-option {
width: 32px;
height: 32px;
border: none;
background: transparent;
border-radius: 6px;
font-size: 17px;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.12s;
}
.reaction-option:hover {
background: var(--bg-hover);
}
/* ---- Load earlier ---- */
.load-earlier {
align-self: center;
background: var(--bg);
border: 1px solid var(--border);
color: var(--text-muted);
font-size: 12px;
font-weight: 500;
padding: 7px 14px;
border-radius: 16px;
margin-bottom: 14px;
transition: all 0.15s;
}
.load-earlier:hover:not(:disabled) {
border-color: var(--accent);
color: var(--accent);
}
.load-earlier:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.sending {
opacity: 0.6;
}
.failed {
opacity: 0.7;
}
.failed .msg-content {
color: var(--danger);
}
/* ======================= COMPOSER ======================= */
.composer {
display: flex;
align-items: flex-end;
gap: 10px;
padding: 12px 18px;
background: var(--bg-panel);
border-top: 1px solid var(--border);
}
.attach-btn {
flex-shrink: 0;
margin-bottom: 8px;
color: var(--text-muted);
}
.attach-btn:hover {
color: var(--accent);
background: var(--accent-soft);
}
.composer textarea {
flex: 1;
resize: none;
max-height: 140px;
background: var(--bg);
border-radius: 12px;
padding: 11px 14px;
line-height: 1.4;
}
.send-btn {
width: 40px;
height: 40px;
flex-shrink: 0;
border-radius: 50%;
border: none;
background: var(--accent);
color: white;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s;
}
.send-btn:hover:not(:disabled) {
background: var(--accent-hover);
transform: scale(1.05);
}
.send-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* ======================= MODALS ======================= */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(2px);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
.modal {
width: 100%;
max-width: 400px;
background: var(--bg-elevated);
border: 1px solid var(--border-strong);
border-radius: 14px;
padding: 24px;
box-shadow: var(--shadow);
}
.modal h2 {
font-size: 17px;
margin-bottom: 4px;
}
.modal-actions {
display: flex;
gap: 10px;
margin-top: 24px;
}
.modal-actions .btn-primary {
margin-top: 0;
width: auto;
padding: 10px 18px;
}
.btn-ghost {
background: transparent;
border: 1px solid var(--border);
color: var(--text-muted);
padding: 10px 18px;
border-radius: var(--radius-sm);
font-weight: 600;
font-size: 13px;
transition: all 0.15s;
}
.btn-ghost:hover {
background: var(--bg-hover);
color: var(--text);
}
.modal-error {
margin-top: 12px;
color: var(--danger);
background: var(--danger-soft);
border: 1px solid rgba(239, 83, 80, 0.3);
border-radius: var(--radius-sm);
padding: 8px 10px;
font-size: 13px;
word-break: break-word;
}
/* ======================= TOASTS ======================= */
.toast-container {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
gap: 8px;
z-index: 200;
pointer-events: none;
}
.toast {
background: var(--bg-elevated);
border: 1px solid var(--border-strong);
border-left: 3px solid var(--accent);
color: var(--text);
padding: 12px 18px;
border-radius: var(--radius-sm);
font-size: 13px;
box-shadow: var(--shadow);
max-width: 420px;
animation: toast-in 0.25s ease;
}
.toast.error {
border-left-color: var(--danger);
}
.toast-actions {
display: flex;
gap: 8px;
margin-top: 10px;
}
.toast-btn {
background: var(--accent);
border: none;
color: white;
font-size: 12px;
font-weight: 600;
padding: 6px 12px;
border-radius: var(--radius-sm);
transition: background 0.15s;
}
.toast-btn:hover {
background: var(--accent-hover);
}
.toast-actions .toast-btn:last-child {
background: transparent;
border: 1px solid var(--border-strong);
color: var(--text-muted);
}
.toast-actions .toast-btn:last-child:hover {
background: var(--bg-hover);
color: var(--text);
}
@keyframes toast-in {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ======================= RESPONSIVE ======================= */
@media (max-width: 720px) {
.sidebar {
width: 220px;
}
.sidebar-actions {
flex-direction: column;
}
}
@media (max-width: 540px) {
.sidebar {
width: 100%;
max-height: 40vh;
border-right: none;
border-bottom: 1px solid var(--border);
}
.app-view {
flex-direction: column;
}
.msg-content img,
.msg-content video {
max-width: 100%;
}
}
:root {
--bg: #12141a;
--bg-elevated: #1a1d26;
--bg-panel: #171a21;
--bg-hover: #232733;
--bg-active: #2b303d;
--border: #2a2e3a;
--border-strong: #3a3f4d;
--text: #e6e8ee;
--text-muted: #9aa0ad;
--text-faint: #6b7280;
--accent: #0dbd8b;
--accent-hover: #0fa97d;
--accent-soft: rgba(13, 189, 139, 0.14);
--danger: #ef5350;
--danger-soft: rgba(239, 83, 80, 0.12);
--radius: 10px;
--radius-sm: 7px;
--shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--mono: 'JetBrains Mono', 'Consolas', monospace;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
}
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
font-size: 14px;
line-height: 1.5;
overflow: hidden;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--border-strong);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #4a5060;
}
.hidden {
display: none ;
}
button {
font-family: var(--font);
cursor: pointer;
}
input, textarea, select {
font-family: var(--font);
font-size: 14px;
color: var(--text);
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 12px;
outline: none;
transition: border-color 0.15s;
width: 100%;
}
input:focus, textarea:focus, select:focus {
border-color: var(--accent);
}
input::placeholder, textarea::placeholder {
color: var(--text-faint);
}
label {
display: block;
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
margin-bottom: 6px;
margin-top: 14px;
}
/* ======================= LOGIN VIEW ======================= */
.login-view {
height: 100vh;