body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 95%;
    height: 95%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    background: linear-gradient(to right, #6a82fb, #fc5c7d);
    color: white;
    text-align: center;
    padding: 1em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

header h1 {
    margin: 0;
    font-size: 2em;
}

#status {
    font-style: italic;
    opacity: 0.8;
}

header button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5em 1em;
    margin-top: 0.5em;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

header button:hover {
    background: rgba(255, 255, 255, 0.4);
}

#chat {
    flex-grow: 1;
    padding: 1em;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    background-color: #e1e1e1;
    color: #333;
    padding: 0.7em;
    border-radius: 5px;
    margin-bottom: 0.5em;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.sent {
    align-self: flex-end;
    background-color: #957dad;
    color: white;
}

.received {
    align-self: flex-start;
}

footer {
    padding: 1em;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 0.5em;
}

footer input {
    flex-grow: 1;
    padding: 0.7em;
    border: 1px solid #ddd;
    border-radius: 5px;
}

footer button {
    background: #5cb85c;
    color: white;
    border: none;
    padding: 0.7em 1.2em;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

footer button:hover {
    background: #449d44;
}