:root {
    --body-bg: #f0f2f5;
    --chat-bg: #ffffff;
    --sent-bg: #dcf8c6;
    --received-bg: #ffffff;
    --primary-color: #007bff;
    --primary-color-dark: #0056b3;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--body-bg);
}

/* --- LOGIN PAGE DESIGN --- */
.login-page {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
}
.login-box {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}
.login-box h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
    color: #333;
}
.login-box p {
    margin-bottom: 25px;
    color: #666;
}
.login-form input[type="password"] {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}
.login-form button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
.login-form button:hover {
    background-color: var(--primary-color-dark);
}
.login-box .error {
    color: #d93025;
    margin-top: 15px;
    font-weight: 500;
}


/* --- CHAT INTERFACE STYLES --- */
.chat-container {
    width: 100%;
    max-width: 450px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background-color: #e5ddd5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.chat-header {
    flex-shrink: 0;
    padding: 10px 15px;
    background-color: #f0f2f5;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    position: relative;
}
.chat-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}
.chat-header .chat-with {
    font-weight: 600;
    flex-grow: 1;
}
.chat-header .logout-btn {
    color: #54656f;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}
.chat-header .logout-btn:hover {
    background-color: #e0e0e0;
    color: #111;
}
.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.chat-input-area {
    flex-shrink: 0;
    background-color: #f0f2f5;
    border-top: 1px solid #e0e0e0;
}
#file-chosen-indicator {
    padding: 5px 15px;
    background-color: #f0f2f5;
    position: relative;
    width: 50px;
    height: 50px;
}
#indicator-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ccc;
}
#remove-file-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
}
.chat-input-form {
    display: flex;
    align-items: center;
    padding: 10px;
}
.chat-input-form form {
    display: flex;
    align-items: center;
    width: 100%;
}
.chat-input-form .attach-btn, .chat-input-form .camera-btn {
    padding: 8px;
    cursor: pointer;
    color: #54656f;
    background: none;
    border: none;
}
.input-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 20px;
    padding: 0 15px;
    margin: 0 5px;
}

/* এই পুরনো স্টাইলটি আর প্রয়োজন নেই, কারণ textarea এর জন্য নতুন স্টাইল নিচে যোগ করা হয়েছে */
/*
.input-wrapper input[type="text"] {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
}
.input-wrapper input[type="text"]:focus {
    outline: none;
}
*/

#send-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-left: 5px;
}
.message {
    max-width: 80%; margin-bottom: 10px; padding: 8px 12px;
    border-radius: 18px; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}
.message.sent { background-color: var(--sent-bg); margin-left: auto; align-self: flex-end; }
.message.received { background-color: var(--received-bg); margin-right: auto; align-self: flex-start; }
.message-image { max-width: 100%; border-radius: 15px; cursor: pointer; margin-bottom: 5px; }
.message-meta { display: flex; align-items: center; justify-content: flex-end; margin-top: 5px; }
.message-time { font-size: 11px; color: #888; }
.message-status { margin-left: 5px; display: inline-block; }
.tick { font-size: 14px; font-weight: bold; color: #888; /* sent */ }
.tick.delivered { color: #888; /* delivered */ }
.tick.seen { color: #4fc3f7; /* seen */ }

/* --- CAMERA MODAL STYLES --- */
.modal {
    position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9); display: flex; justify-content: center; align-items: center;
}
.modal-content { position: relative; width: 100%; height: 100%; max-width: 500px; max-height: 100vh; }
#camera-view { width: 100%; height: 100%; object-fit: cover; }
.modal-controls {
    position: absolute; bottom: 30px; left: 0; right: 0; padding: 20px;
    display: flex; justify-content: center; align-items: center;
}
.control-btn { background-color: transparent; border: none; color: white; cursor: pointer; width: 60px; height: 60px; font-size: 30px; }
.control-btn.shutter { width: 80px; height: 80px; background-color: white; border: 5px solid rgba(0,0,0,0.3); border-radius: 50%; }
#close-camera-btn { position: absolute; top: 15px; left: 15px; font-size: 30px; }
#switch-camera-btn { position: absolute; top: 15px; right: 15px; font-size: 30px; }


/* --- নতুন: টেক্সটএরিয়ার জন্য স্টাইল শুরু --- */
.input-wrapper textarea#message-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    overflow-y: hidden;
    line-height: 1.4;
    transition: height 0.2s ease;
}
.input-wrapper textarea#message-input:focus {
    outline: none;
}
/* --- নতুন: টেক্সটএরিয়ার জন্য স্টাইল শেষ --- */