@charset "utf-8"; :root { --bg: #0f1221; --panel: #171a2b; --panel-2: #121527; --text: #e8ebff; --muted: #a7b0d6; --accent: #6c8cff; --danger: #ff5b6e; --success: #4cd38a; --warning: #ffd35b; --border: #252a45; --shadow: 0 10px 30px rgba(0, 0, 0, 0.35); --radius: 14px; } * { box-sizing: border-box; } html, body { height: 100%; margin: 0; padding: 0; width: 100%; font-family: ui-sans-serif, sans-serif; background: var(--bg); color: var(--text); } .chat-app { display: flex; flex-direction: column; height: 100dvh; width: 100%; } header.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: linear-gradient(180deg, rgba(23, 26, 43, 0.9), rgba(23, 26, 43, 0.75)); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; } .app-brand { display: flex; align-items: center; gap: 10px; min-width: 0; } .logo { width: 28px; height: 28px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; } .app-title { font-weight: 700; min-width: 0; } .connection-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex: 0 0 auto; } .status-indicator { width: 10px; height: 10px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 4px rgba(255, 211, 91, 0.15); flex: 0 0 10px; } .status-indicator.online { background: var(--success); box-shadow: 0 0 0 4px rgba(76, 211, 138, 0.15); } .status-indicator.offline { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 91, 110, 0.15); } .header-actions { display: flex; gap: 8px; flex: 0 0 auto; } button.btn { appearance: none; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; color: var(--text); background: linear-gradient(180deg, var(--panel), var(--panel-2)); } button.btn:hover { filter: brightness(1.05); transform: translateY(-1px); } button.btn:active { transform: translateY(0); } button.btn.danger { border-color: #503046; background: linear-gradient(180deg, #3a1b2a, #321727); color: #ffdbe1; } button.btn.accent { border-color: var(--accent); background: linear-gradient(180deg, #4c6eff, #6c8cff); color: #fff; } main { flex: 1; overflow-y: auto; padding: 14px 12px 0 12px; scroll-behavior: smooth; width: 100%; } .message-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; width: 100%; } .message-item { display: flex; gap: 12px; max-width: 100%; align-items: flex-start; } .message-avatar { width: 36px; height: 36px; border-radius: 10px; background: #1a1f3b; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: #b9c3ff; font-weight: 700; text-align: center; line-height: 1; flex-shrink: 0; } .message-bubble { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); min-width: 120px; width: 100%; transition: transform 0.1s ease, background 0.2s ease, border-color 0.2s ease; position: relative; overflow: hidden; } .message-bubble::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); opacity: 0.9; } .message-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-bottom: 6px; padding-left: 2px; flex-wrap: wrap; } .message-username { font-weight: 700; color: #d6dcff; } .message-text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; color: var(--text); } footer.message-composer { position: sticky; bottom: 0; z-index: 10; background: linear-gradient(180deg, rgba(23, 26, 43, 0.75), rgba(18, 21, 39, 0.9)); border-top: 1px solid var(--border); padding: 12px; box-shadow: var(--shadow); width: 100%; } .composer-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; } .message-input-wrapper { flex: 1; display: flex; padding: 8px; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, #151936, #10132b); } textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: 4px 2px; min-height: 44px; max-height: 160px; transition: box-shadow 0.2s ease, border-color 0.2s ease; width: 100%; } textarea::placeholder { color: #7f88b6; } .send-area { display: flex; gap: 10px; } .toast-notification { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: #121631; color: #e6e9ff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 999999; } .toast-notification.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(-4px); } .modal-overlay { position: fixed; inset: 0; background: rgba(5, 6, 12, 0.55); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 20; } .modal-overlay.show { display: flex; } .modal-dialog { width: min(520px, 100%); background: #141834; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; } .modal-dialog h3 { margin: 0; font-size: 18px; } .form-field { display: flex; flex-direction: column; gap: 8px; } .form-field label { font-size: 13px; color: var(--muted); } .form-field input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #0f1330; color: var(--text); } .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; } .kbd { font-family: ui-monospace, monospace; background: #121631; border: 1px solid var(--border); border-bottom-color: #2a315a; border-radius: 8px; padding: 2px 6px; color: #c2c9ff; } .room-selector { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(23, 26, 43, 0.75), rgba(18, 21, 39, 0.9)); align-items: center; width: 100%; box-shadow: var(--shadow); } .room-selector input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #121631; color: var(--text); font-size: 14px; outline: none; transition: border 0.2s ease, box-shadow 0.2s ease; } .admin-badge { display: inline-block; line-height: 1; padding: 4px 8px; border-radius: 999px; background: #3b2850; color: #ffdbe1; font-weight: 700; margin-left: 6px; border: 1px solid rgba(255, 255, 255, 0.04); box-shadow: 0 4px 14px rgba(59, 40, 80, 0.35); } .message-bubble.admin { border-color: rgba(108, 140, 255, 0.5); box-shadow: 0 6px 18px rgba(76, 110, 255, 0.08); } .hidden { display: none !important; } @media (max-width: 820px) { html, body { font-size: 14px; } main { padding: 10px 8px 0; } header.chat-header { padding: 10px 12px; } .logo { border-radius: 8px; } .app-title { font-size: 14px; } .connection-status { font-size: 11px; } .header-actions button { padding: 6px 8px; font-size: 12px; } .message-item { gap: 8px; } .message-avatar { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; } .message-bubble { max-width: 100%; min-width: unset; padding: 10px 12px; border-radius: 14px; } .message-meta { font-size: 11px; margin-bottom: 4px; } .message-text { font-size: 14px; line-height: 1.6; } footer.message-composer { padding: 8px; } .message-input-wrapper { padding: 6px; } textarea { min-height: 38px; font-size: 14px; } .send-area { justify-content: flex-end; } .send-area button { width: 100%; padding: 10px; font-size: 14px; } } @media (max-width: 480px) { html, body { font-size: 13px; } .chat-app { height: 100dvh; } header.chat-header { padding: 8px 10px; gap: 10px; } .app-brand { gap: 8px; min-width: 0; } .logo { width: 24px; height: 24px; border-radius: 7px; } .app-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; } .connection-status { font-size: 10px; gap: 6px; } .status-indicator { width: 8px; height: 8px; box-shadow: 0 0 0 3px rgba(255, 211, 91, 0.14); } .header-actions { gap: 6px; } button.btn { padding: 6px 8px; font-size: 12px; border-radius: 8px; } main { padding: 8px 6px 0; } .message-list { gap: 10px; padding-bottom: 14px; } .message-item { gap: 6px; } .message-avatar { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; } .message-bubble { padding: 9px 11px; border-radius: 12px; max-width: 100%; min-width: 0; } .message-meta { font-size: 10px; margin-bottom: 3px; gap: 4px; } .message-username { font-size: 11px; } .message-text { font-size: 13px; line-height: 1.55; } footer.message-composer { padding: 8px; } .composer-row { gap: 8px; } .message-input-wrapper { padding: 6px; border-radius: 12px; gap: 6px; } textarea { min-height: 36px; max-height: 130px; font-size: 13px; padding: 3px 2px; } .send-area { gap: 8px; } .send-area button { width: 100%; padding: 9px 10px; font-size: 13px; border-radius: 10px; } .room-selector { padding: 8px; gap: 6px; } .room-selector input { padding: 8px 10px; font-size: 13px; border-radius: 12px; } .modal-overlay { padding: 10px; } .modal-dialog { width: 100%; padding: 14px; border-radius: 14px; } .modal-dialog h3 { font-size: 16px; } .form-field input { padding: 9px 10px; font-size: 13px; } .modal-actions { flex-direction: column; } .modal-actions .btn { width: 100%; } }