* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f5f5f5;
    height: 100vh;
}

.screen {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

/* Auth Screen */
.auth-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.auth-container h1 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

#auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#auth-form button {
    width: 100%;
    padding: 12px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#auth-form button:hover {
    background-color: #3367d6;
}

/* Chat Screen */
#chat-screen {
    display: flex;
}

.sidebar {
    width: 300px;
    background: #2c3e50;
    color: white;
    height: 100vh;
    padding: 1rem;
    overflow-y: auto;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #34495e;
}

#logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.chat-types {
    display: flex;
    margin-bottom: 1.5rem;
}

.chat-types button {
    flex: 1;
    padding: 8px;
    background: #34495e;
    color: white;
    border: none;
    cursor: pointer;
}

.chat-types button.active {
    background: #4285f4;
}

#create-group-form {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #34495e;
    border-radius: 4px;
}

#create-group-form input {
    width: 100%;
    padding: 8px;
    margin-bottom: 0.5rem;
    border: none;
    border-radius: 4px;
}

#create-group-submit {
    width: 100%;
    padding: 8px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.contacts-list h3 {
    margin: 1rem 0;
    color: #bdc3c7;
}

.contacts-list ul {
    list-style: none;
}

.contacts-list li {
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
}

.contacts-list li:hover {
    background: #34495e;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-header {
    padding: 1rem;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

#messages-container {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #ecf0f1;
}

.message {
    margin-bottom: 1rem;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    max-width: 70%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.sent {
    margin-left: auto;
    background: #dcf8c6;
}

.message-info {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.message-input {
    display: flex;
    padding: 1rem;
    background: white;
    border-top: 1px solid #ddd;
}

#message-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 8px;
}

#send-btn {
    padding: 12px 20px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
