* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}
body {
    background: #1a1a2e;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}
.auth-box {
    background: #16213e;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.auth-box h1 {
    color: #e94560;
    text-align: center;
    margin-bottom: 30px;
}
.auth-box h2 {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}
.auth-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: white;
    font-size: 16px;
}
.auth-box button {
    width: 100%;
    padding: 12px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}
.auth-box button:hover { background: #ff6b6b; }
.auth-box p { color: #aaa; text-align: center; margin-top: 20px; }
.auth-box a { color: #e94560; text-decoration: none; }
.chat-app {
    display: flex;
    width: 100%;
    height: 100vh;
    background: #1a1a2e;
}
.sidebar {
    width: 320px;
    background: #16213e;
    border-right: 1px solid #0f3460;
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #0f3460;
}
.sidebar-header h2 {
    color: #e94560;
    margin-bottom: 10px;
}
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #0f3460;
}
.user-info span { color: white; font-weight: 500; }
.logout-btn {
    background: #e94560;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
}
.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.user-item {
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 5px;
    transition: background 0.3s;
}
.user-item:hover { background: #0f3460; }
.user-item.active { background: #e94560; }
.user-name { color: white; font-weight: 500; }
.user-status {
    font-size: 12px;
    margin-top: 4px;
}
.user-status.online { color: #4caf50; }
.user-status.offline { color: #888; }
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.chat-header {
    padding: 20px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}
.chat-header h3 { color: white; }
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
}
.message.sent {
    background: #e94560;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}
.message.received {
    background: #16213e;
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}
.message-info {
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.7;
}
.message-input-container {
    padding: 20px;
    background: #16213e;
    border-top: 1px solid #0f3460;
    display: flex;
    gap: 10px;
}
.message-input-container textarea {
    flex: 1;
    padding: 12px;
    border: 1px solid #0f3460;
    border-radius: 24px;
    background: #1a1a2e;
    color: white;
    resize: none;
    font-size: 14px;
}
.message-input-container button {
    padding: 0 20px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
}
.loading {
    color: #aaa;
    text-align: center;
    padding: 20px;
}
@media (max-width: 768px) {
    .sidebar { width: 280px; }
    .message { max-width: 85%; }
}
