/* ==========================
   Saathi Anonymous Chat CSS (Improved)
   ========================== */

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #0054fd, #2b7bff);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Chat wrapper and container */
.chat-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 12px;
}

.chat-container {
    width: 100%;
    max-width: 420px;
    height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

/* Chat header */
.chat-header {
    padding: 14px;
    background: linear-gradient(135deg, #0d6efd, #2563eb);
    color: #fff;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 0.5px;
    /* display:inline-block; */
}

/* Chat messages box */
.chat-box {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background: #f5f7fb;
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.chat-box::-webkit-scrollbar {
    width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
    background: #cbd5ff;
    border-radius: 10px;
}

/* Individual messages */
.message {
    max-width: 75%;
    padding: 10px 14px;
    margin: 6px 0;
    border-radius: 16px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    animation: fadeIn 0.2s ease-in-out;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sent message style (own messages) */
.own-message {
    background: linear-gradient(135deg, #0d6efd, #2563eb);
    color: white;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 4px;
}

/* Received message style */
.message.received {
    background: #e9edf5;
    color: #000;
    margin-right: auto;
    text-align: left;
    border-bottom-left-radius: 4px;
}

/* Chat input section */
.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eee;
    background: #ffffff;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #d0d7ff;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: #f9fbff;
    transition: border 0.2s ease;
}

.chat-input input:focus {
    border-color: #0d6efd;
}

/* Buttons */
.chat-input button {
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: bold;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
}

/* Send button */
#sendBtn {
    background: #0d6efd;
}
#sendBtn:hover {
    background: #084cdf;
}

/* Responsive */
@media (max-width: 480px) {
    .chat-container {
        border-radius: 14px;
        height: 80vh;
    }

    .message {
        max-width: 85%;
    }

    .chat-input {
        flex-direction: column;
    }

    .chat-input input,
    .chat-input button {
        width: 100%;
        height: 42px;
    }
}