/* Modern Material Design inspired styles */
:root {
    --primary: #6200ee;
    --primary-dark: #3700b3;
    --primary-light: #bb86fc;
    --secondary: #03dac6;
    --background: #f5f5f5;
    --surface: #ffffff;
    --error: #b00020;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-on-primary: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#app {
    width: 100%;
    max-width: 600px;
}

/* Login Screen */
#login-container {
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
}

#login-container h1 {
    color: var(--primary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(98, 0, 238, 0.1);
}

button {
    background-color: var(--primary);
    color: var(--text-on-primary);
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--primary-dark);
}

button:active {
    transform: translateY(1px);
}

/* Chat Screen */
#chat-container {
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 80vh;
}

.chat-header {
    padding: 15px 20px;
    background-color: var(--primary);
    color: var(--text-on-primary);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    margin: 0;
    font-size: 18px;
}

.online-users {
    font-size: 14px;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.message {
    margin-bottom: 12px;
    max-width: 85%;
    clear: both;
}

.message.other {
    float: left;
}

.message.self {
    float: right;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    display: inline-block;
}

.message.other .message-bubble {
    background-color: #e0e0e0;
}

.message.self .message-bubble {
    background-color: var(--primary-light);
    color: var(--text-on-primary);
}

.message-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.message.self .message-info {
    text-align: right;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

.chat-input input {
    flex-grow: 1;
    margin-right: 10px;
}

/* System Messages */
.system-message {
    text-align: center;
    margin: 15px 0;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 14px;
}

/* Utility Classes */
.hidden {
    display: none;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    #login-container,
    #chat-container {
        border-radius: 0;
        box-shadow: none;
    }
    
    body {
        padding: 0;
    }
    
    #app {
        height: 100vh;
    }
    
    #chat-container {
        height: 100vh;
    }
}