:root { --bg: #0a0e17; --card: #0f1525; --muted: #8b9bb8; --soft: #151e30; --accent: #3a86ff; --accent-2: #5e60ce; --danger: #ff4d6d; --success: #38b000; --text: #e6edf3; --border: #1c2a44; --star-color: rgba(255, 255, 255, 0.7); } * { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; } body { margin: 0; font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial; background: var(--bg); color: var(--text); overflow-x: hidden; position: relative; } @keyframes fall { from { transform: translateY(-100px) translateX(0) rotate(0deg); opacity: 1; } to { transform: translateY(100vh) translateX(100px) rotate(360deg); opacity: 0; } } .stars { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; } .star { position: absolute; background: var(--star-color); border-radius: 50%; animation: fall linear infinite; } .app { max-width: 1100px; margin: 3rem auto; padding: 0 1rem; position: relative; } .hidden { display: none !important; } .card { background: linear-gradient(145deg, var(--card), #0d1321); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: fadeIn 0.3s ease; position: relative; overflow: hidden; } .card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); } .card-sm { border: 1px solid var(--border); border-radius: 10px; padding: 1rem; background: rgba(255, 255, 255, 0.03); } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } } h1, h2, h3, h4 { color: var(--text); margin-bottom: 0.8rem; font-weight: 600; } h1 { font-size: 1.8rem; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; } .field { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; } input, textarea, button { font: inherit; border: none; outline: none; } input, textarea { background: var(--soft); border: 1px solid #253143; color: var(--text); border-radius: 8px; padding: 0.8rem 1rem; transition: all 0.2s ease; } input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.2); } input::placeholder, textarea::placeholder { color: #6b7688; } button { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; font-weight: 600; padding: 0.8rem 1.5rem; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; position: relative; overflow: hidden; } button::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: 0.5s; } button:hover::after { left: 100%; } button:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(58, 134, 255, 0.3); } button:active { transform: translateY(0); } button.danger { background: linear-gradient(135deg, var(--danger), #c1121f); } button.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); } .muted { color: var(--muted); } .chat__header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); } .presence { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); } .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, #38b000, #38bdf8); box-shadow: 0 0 10px #38b000; animation: pulse 2s infinite; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } } .lock-banner { margin-top: 0.8rem; padding: 0.5rem; background: rgba(239, 68, 68, 0.1); border: 1px dashed #ef4444; border-radius: 8px; color: #ef4444; text-align: center; animation: shake 0.5s ease; } @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } } #chat { display: grid; grid-template-columns: 260px 1fr; grid-template-rows: auto 1fr auto; gap: 1rem; grid-template-areas: "header header" "sidebar messages" "sidebar composer"; min-height: 70vh; } #chat .chat__header { grid-area: header; } .sidebar { grid-area: sidebar; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; } .you { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.5rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); } .avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); position: relative; } .avatar::after { content: ''; position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--success); border: 2px solid var(--card); } .you__nick { font-weight: 700; color: var(--accent); } .peers { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; } .peers li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; background: rgba(15, 22, 33, 0.5); border: 1px solid var(--border); padding: 0.6rem; border-radius: 8px; transition: all 0.2s ease; } .peers li:hover { background: rgba(58, 134, 255, 0.1); transform: translateX(5px); } .peers .nick { font-weight: 600; } .badge { font-size: 0.75rem; color: #06121a; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 999px; padding: 0.2rem 0.5rem; } .messages { grid-area: messages; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; overflow: auto; display: flex; flex-direction: column; gap: 0.8rem; scroll-behavior: smooth; } .msg { display: flex; gap: 0.8rem; align-items: flex-start; max-width: 80%; background: rgba(15, 22, 33, 0.7); border: 1px solid var(--border); padding: 0.8rem; border-radius: 12px; animation: pop 0.2s ease; position: relative; transition: all 0.2s ease; } .msg:hover { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); } .msg.me { align-self: flex-end; background: rgba(15, 28, 40, 0.7); border-color: #253143; } .msg .author { font-weight: 700; color: var(--accent); } .msg .time { color: var(--muted); font-size: 0.8rem; margin-left: 0.5rem; } .msg.private { border: 1px dashed #7dd3fc; background: rgba(15, 22, 33, 0.9); } .msg .trash { position: absolute; top: 6px; right: 6px; cursor: pointer; font-size: 0.9rem; opacity: 0.6; transition: opacity 0.2s ease; } .msg .trash:hover { opacity: 1; } .system { color: var(--muted); font-style: italic; text-align: center; margin: 0.5rem 0; } @keyframes pop { from { transform: scale(0.95); opacity: 0.7; } to { transform: none; opacity: 1; } } .composer { grid-area: composer; display: flex; gap: 0.8rem; } #messageInput { flex: 1; } .fab { position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35); z-index: 1001; transition: all 0.3s ease; } .fab:hover { transform: rotate(45deg); } .modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; } .modal:not(.hidden) { opacity: 1; pointer-events: all; } .modal__card { width: 100%; max-width: 900px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); transform: scale(0.9); transition: transform 0.3s ease; } .modal:not(.hidden) .modal__card { transform: scale(1); } .modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); } .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } .panel h4 { margin: 0.2rem 0 0.8rem; color: var(--accent); } .row { display: flex; gap: 0.5rem; align-items: center; margin: 0.8rem 0; } .switch { display: flex; gap: 0.5rem; align-items: center; cursor: pointer; } .admin-users { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; } .admin-users li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; background: rgba(15, 22, 33, 0.5); border: 1px solid var(--border); padding: 0.6rem; border-radius: 10px; } .admin-users button { padding: 0.4rem 0.8rem; font-size: 0.85rem; } .admin-only { display: none; } .admin-only:not(.hidden) { display: inline; } button:focus, input:focus, textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 2px; } @media (max-width: 768px) { #chat { grid-template-columns: 1fr; grid-template-areas: "header" "messages" "composer"; } .sidebar { display: none; } .grid { grid-template-columns: 1fr; } .app { margin: 1rem auto; } .msg { max-width: 90%; } }