Files
telegram-web-client/frontend/src/App.css
kappa e610a45fcf Initial commit: Telegram Web Client with bot chat sync
- Backend: FastAPI + Telethon v2 WebSocket server
- Frontend: React + TypeScript + Vite + Zustand
- Features: Phone auth, 2FA, real-time bot chat
- Fix: Use chats= instead of from_users= to sync messages from all devices
- Config: BOT_USERNAME=AnvilForgeBot

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:55:22 +09:00

324 lines
5.2 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #0e1621;
--bg-secondary: #17212b;
--bg-message-out: #2b5278;
--bg-message-in: #182533;
--text-primary: #ffffff;
--text-secondary: #8b9399;
--accent: #5288c1;
--accent-hover: #6ba0d5;
--error: #e53935;
--border: #0e1621;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, sans-serif;
background-color: var(--bg-primary);
color: var(--text-primary);
line-height: 1.5;
}
.app {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.app.connecting {
justify-content: center;
align-items: center;
gap: 1rem;
}
.loader {
width: 40px;
height: 40px;
border: 3px solid var(--bg-secondary);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Auth Container */
.auth-container {
max-width: 400px;
margin: auto;
padding: 2rem;
text-align: center;
}
.auth-container h2 {
margin-bottom: 0.5rem;
font-size: 1.5rem;
}
.auth-container p {
color: var(--text-secondary);
margin-bottom: 1.5rem;
}
.auth-container form {
display: flex;
flex-direction: column;
gap: 1rem;
}
.auth-container input {
padding: 1rem;
font-size: 1rem;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text-primary);
text-align: center;
}
.auth-container input:focus {
outline: none;
border-color: var(--accent);
}
.auth-container input::placeholder {
color: var(--text-secondary);
}
.auth-container button {
padding: 1rem;
font-size: 1rem;
font-weight: 600;
background: var(--accent);
border: none;
border-radius: 8px;
color: white;
cursor: pointer;
transition: background 0.2s;
}
.auth-container button:hover:not(:disabled) {
background: var(--accent-hover);
}
.auth-container button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.auth-container button.secondary {
background: var(--bg-secondary);
}
.auth-container button.secondary:hover:not(:disabled) {
background: var(--bg-message-in);
}
.error {
color: var(--error);
margin-top: 1rem;
}
/* Chat Container */
.chat-container {
display: flex;
flex-direction: column;
height: 100vh;
}
.chat-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.5rem;
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
}
.chat-header h1 {
font-size: 1.25rem;
}
.user-info {
display: flex;
align-items: center;
gap: 1rem;
}
.status {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
color: var(--text-secondary);
}
.status::before {
content: '';
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--text-secondary);
}
.status.online::before {
background: #4caf50;
}
.status.offline::before {
background: var(--error);
}
.username {
font-size: 0.875rem;
color: var(--text-secondary);
}
/* Message List */
.message-list {
flex: 1;
overflow-y: auto;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.empty-state {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: var(--text-secondary);
}
.message {
display: flex;
max-width: 70%;
}
.message.outgoing {
align-self: flex-end;
}
.message.incoming {
align-self: flex-start;
}
.message-content {
padding: 0.75rem 1rem;
border-radius: 12px;
position: relative;
}
.message.outgoing .message-content {
background: var(--bg-message-out);
border-bottom-right-radius: 4px;
}
.message.incoming .message-content {
background: var(--bg-message-in);
border-bottom-left-radius: 4px;
}
.sender {
display: block;
font-size: 0.75rem;
font-weight: 600;
color: var(--accent);
margin-bottom: 0.25rem;
}
.message.outgoing .sender {
display: none;
}
.text {
word-wrap: break-word;
white-space: pre-wrap;
}
.time {
display: block;
font-size: 0.7rem;
color: var(--text-secondary);
text-align: right;
margin-top: 0.25rem;
}
/* Message Input */
.message-input {
display: flex;
gap: 0.75rem;
padding: 1rem;
background: var(--bg-secondary);
border-top: 1px solid var(--border);
}
.message-input textarea {
flex: 1;
padding: 0.75rem 1rem;
font-size: 1rem;
font-family: inherit;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 20px;
color: var(--text-primary);
resize: none;
min-height: 44px;
max-height: 120px;
}
.message-input textarea:focus {
outline: none;
border-color: var(--accent);
}
.message-input textarea::placeholder {
color: var(--text-secondary);
}
.message-input button {
padding: 0.75rem 1.5rem;
font-size: 1rem;
font-weight: 600;
background: var(--accent);
border: none;
border-radius: 20px;
color: white;
cursor: pointer;
transition: background 0.2s;
}
.message-input button:hover:not(:disabled) {
background: var(--accent-hover);
}
.message-input button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Responsive */
@media (max-width: 600px) {
.chat-header {
flex-direction: column;
gap: 0.5rem;
text-align: center;
}
.message {
max-width: 85%;
}
}