* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #e5ddd5;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
}

.header {
    background-color: #075e54;
    color: white;
    padding: 12px 16px;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout {
    color: #fff;
    font-size: 14px;
    text-decoration: underline;
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #dcf8c6;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.message {
    background-color: #fff;
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.message strong {
    color: #075e54;
    font-weight: bold;
    font-size: 13px;
}

.timestamp {
    font-size: 11px;
    color: #888;
    position: absolute;
    right: 10px;
    bottom: 6px;
}

form {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f0f0f0;
}

form textarea {
    flex-grow: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    resize: none;
    height: 45px;
    overflow: hidden;
    background-color: #fff;
    margin-right: 10px;
}

form button {
    background-color: #075e54;
    border: none;
    color: white;
    font-size: 18px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover {
    background-color: #064e48;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    border-radius: 8px;
    padding: 30px 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #4a76a8;
    font-size: 22px;
}

.login-container input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    border: none;
    background-color: #4a76a8;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

/* Responsive Tweaks */
@media screen and (max-width: 480px) {
    .header {
        font-size: 16px;
        padding: 10px;
    }

    .logout {
        font-size: 12px;
    }

    .message {
        font-size: 13px;
        max-width: 90%;
    }

    form textarea {
        height: 40px;
        font-size: 13px;
    }

    form button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .login-container {
        margin: 40px 15px;
        padding: 20px;
    }
}
