 * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #333;
            line-height: 1.6;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }
        
        .chat-container {
            width: 100%;
            max-width: 800px;
            height: 90vh;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .chat-header {
            background-color: #4a6fa5;
            color: white;
            padding: 20px;
            text-align: center;
            position: relative;
        }
        
        .user-info {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 10px;
        }
        
        #username {
            padding: 5px 10px;
            border: none;
            border-radius: 20px;
            width: 150px;
            text-align: center;
        }
        
        #setUsername {
            background-color: #2c3e50;
            color: white;
            border: none;
            padding: 5px 15px;
            border-radius: 20px;
            cursor: pointer;
        }
        
        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .message {
            max-width: 70%;
            padding: 12px 15px;
            border-radius: 18px;
            position: relative;
            word-wrap: break-word;
        }
        
        .message.sent {
            align-self: flex-end;
            background-color: #4a6fa5;
            color: white;
            border-bottom-right-radius: 5px;
        }
        
        .message.received {
            align-self: flex-start;
            background-color: #f1f1f1;
            border-bottom-left-radius: 5px;
        }
        
        .message-info {
            font-size: 0.8em;
            opacity: 0.7;
            margin-top: 5px;
        }
        
        .chat-input {
            display: flex;
            padding: 15px;
            background-color: #f8f9fa;
            border-top: 1px solid #eaeaea;
        }
        
        #messageInput {
            flex: 1;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 30px;
            font-size: 16px;
            outline: none;
        }
        
        #sendMessage {
            background-color: #4a6fa5;
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 30px;
            cursor: pointer;
            margin-left: 10px;
            font-size: 16px;
            transition: background-color 0.3s;
        }
        
        #sendMessage:hover {
            background-color: #3a5a80;
        }
        
        #sendMessage:disabled {
            background-color: #cccccc;
            cursor: not-allowed;
        }
        
        .typing-indicator {
            padding: 5px 15px;
            font-style: italic;
            color: #666;
            display: none;
        }
        
        .online-users {
            background-color: #f8f9fa;
            padding: 10px 15px;
            border-top: 1px solid #eaeaea;
            font-size: 0.9em;
            color: #666;
        }
        
        .status {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 5px;
        }
        
        .status.online {
            background-color: #2ecc71;
        }
        
        .status.offline {
            background-color: #e74c3c;
        }
        
        @media (max-width: 600px) {
            .chat-container {
                height: 95vh;
            }
            
            .message {
                max-width: 85%;
            }
        }