* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #e5ddd5;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #075e54;
    color: #fff;
    padding: 12px 16px;
    flex-shrink: 0;
}

.chat-header-title {
    font-size: 18px;
    font-weight: 600;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.logout-btn:active {
    background: rgba(255,255,255,0.3);
}

/* Messages area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #e5ddd5;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.message-row {
    display: flex;
    width: 100%;
}

.message-row.own {
    justify-content: flex-end;
}

.message-row.other {
    justify-content: flex-start;
}

.message-bubble {
    position: relative;
    max-width: 75%;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14.5px;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

.message-row.own .message-bubble {
    background: #dcf8c6;
    border-top-right-radius: 2px;
}

.message-row.other .message-bubble {
    background: #fff;
    border-top-left-radius: 2px;
}

.message-text {
    white-space: pre-wrap;
}

.message-image {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin-bottom: 4px;
}

.message-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.message-time {
    font-size: 11px;
    color: #999;
}

.seen-mark {
    font-size: 12px;
    color: #4fc3f7;
}

.reply-preview-inline {
    background: rgba(0,0,0,0.05);
    border-left: 3px solid #075e54;
    padding: 4px 6px;
    margin-bottom: 4px;
    font-size: 12.5px;
    color: #555;
    border-radius: 4px;
}

.reply-btn {
    position: static;
    background: none;
    border: none;
    font-size: 30px;
    color: #075e54;
    cursor: pointer;
    opacity: 0.85;
    display: inline-block;
    margin-top: 3px;
    padding: 4px 8px;
}


/* Reply preview bar (input ustida) */
.reply-preview-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f0f0;
    padding: 8px 12px;
    border-left: 4px solid #075e54;
    font-size: 13px;
    color: #444;
    flex-shrink: 0;
}

.cancel-reply-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0 6px;
}

/* Image preview bar */
.image-preview-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f0f0;
    padding: 8px 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.caption-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 16px;
    font-size: 13px;
    min-width: 100px;
}

.send-image-btn {
    background: #075e54;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
}

/* Input area */
.input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f0f0;
    flex-shrink: 0;
}

.attach-btn {
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
}

.text-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 20px;
    font-size: 14.5px;
    outline: none;
}

.send-btn {
    background: #075e54;
    color: #fff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.send-btn:active {
    background: #054c44;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .chat-container {
        max-width: 100%;
        box-shadow: none;
    }

    .message-bubble {
        max-width: 85%;
    }

    .reply-btn {
        font-size: 20px;
        padding: 8px 16px;
    }
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

body{
    background:#f3f5f9;
}

.login-container{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

.login-card{
    width:100%;
    max-width:420px;
    background:#fff;
    padding:35px;
    border-radius:18px;
    box-shadow:0 10px 30px rgba(0,0,0,.1);
}

.login-card h2{
    text-align:center;
    margin-bottom:30px;
    color:#333;
}

.form-group{
    margin-bottom:20px;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
    color:#444;
}

.form-group input{
    width:100%;
    padding:14px;
    border:1px solid #d9d9d9;
    border-radius:10px;
    font-size:16px;
    transition:.3s;
}

.form-group input:focus{
    outline:none;
    border-color:#4f46e5;
    box-shadow:0 0 8px rgba(79,70,229,.25);
}

.login-btn{
    width:100%;
    padding:14px;
    border:none;
    border-radius:10px;
    background:#4f46e5;
    color:#fff;
    font-size:17px;
    font-weight:bold;
    cursor:pointer;
    transition:.3s;
}

.login-btn:hover{
    background:#372fcf;
}

.error{
    color:red;
    font-size:14px;
    margin-top:5px;
}

@media (max-width:480px){

    .login-card{
        padding:25px;
        border-radius:15px;
    }

    .login-card h2{
        font-size:26px;
    }

    .form-group input{
        font-size:16px;
        padding:13px;
    }

    .login-btn{
        font-size:16px;
    }

}