body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

.chat-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 10px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.chat-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.chat-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.explanation-text {
    text-align: center;
    font-size: 16px;
    padding: 10px;
    margin: 10px 0;
    color: #333;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

#name {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 18px;
    outline: none;
    box-sizing: border-box;
    height: 38px;
}

.message-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

textarea#message {
    flex: 1;
    resize: vertical;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 18px;
    outline: none;
    height: 38px;
    min-height: 38px;
    max-height: 158px;
    box-sizing: border-box;
    margin-right: 10px;
    overflow-y: auto;
    max-height: calc(3 * 1.5em + 20px);
}

#send-button {
    width: 40px;
    height: 40px;
    background-color: #3B5998;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.message-box {
    background-color: #3B5998;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    word-wrap: break-word;
}

.error {
    color: red;
    font-size: 12px;
    display: none;
}

.error-border {
    border: 1px solid #FF6B6B;
}

.error-background {
    background-color: #FF6B6B;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.moderation-message-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 10px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #e6f4ea;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    opacity: 0;
}

.moderation-message-container.visible {
    animation: fadeIn 2s forwards;
}

.moderation-message-container.hidden {
    animation: fadeOut 2s forwards;
}

#moderation-message {
    color: #004d40;
}

.chat-footer {
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

.chat-footer a {
    color: #3B5998;
    text-decoration: none;
}

.chat-footer a:hover {
    text-decoration: underline;
}

@media screen and (max-width: 425px) {
    .chat-container {
        max-width: 90%;
    }
}

@media screen and (max-width: 460px) {
    .chat-container {
        max-width: 90%;
    }
}

@media screen and (max-width: 500px) {
    .chat-container {
        max-width: 90%;
    }
}

@media screen and (min-width: 1920px) {
    .chat-container {
        max-width: 400px;
    }
}

@media screen and (min-width: 4096px) {
    .chat-container {
        max-width: 400px;
    }
}
