* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 90%;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    overflow: hidden;
}

/* সাইডবার স্টাইল */
.sidebar {
    width: 350px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 28px;
    color: #0088cc;
}

.logo h1 {
    color: #333;
    font-size: 20px;
}

.new-chat-btn {
    background: #0088cc;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.search-box {
    padding: 15px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

.search-box i {
    position: absolute;
    right: 30px;
    top: 28px;
    color: #999;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 5px;
}

.chat-item:hover {
    background: #e9ecef;
}

.chat-item.active {
    background: #0088cc;
    color: white;
}

.chat-item.active .chat-info h3 {
    color: white;
}

.chat-item.active .chat-info p {
    color: rgba(255,255,255,0.8);
}

.avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin-right: 15px;
}

.chat-info {
    flex: 1;
}

.chat-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
    color: #333;
}

.chat-info p {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    text-align: right;
}

.time {
    font-size: 12px;
    color: #999;
    display: block;
    margin-bottom: 5px;
}

.badge {
    background: #ff3b30;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 15px;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #e9ecef;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
}

.menu-btn:hover {
    background: #e9ecef;
}

.menu-btn.active {
    color: #0088cc;
    background: #e9ecef;
}

/* চ্যাট এরিয়া স্টাইল */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-info h2 {
    font-size: 18px;
    color: #333;
}

.contact-info p {
    font-size: 14px;
    color: #666;
}

.chat-actions {
    display: flex;
    gap: 15px;
}

.chat-actions button {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
}

.chat-actions button:hover {
    background: #f0f0f0;
}

.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f0f2f5;
}

.message {
    max-width: 60%;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 15px;
    position: relative;
    word-wrap: break-word;
}

.message.received {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.sent {
    background: #0088cc;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message .time {
    font-size: 11px;
    margin-top: 5px;
    text-align: right;
    opacity: 0.7;
}

.message-input {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #e9ecef;
}

.message-input input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.message-input button {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s;
}

.message-input button:hover {
    background: #f0f0f0;
}

.send-btn {
    background: #0088cc !important;
    color: white !important;
}

/* রেসপনসিভ ডিজাইন */
@media (max-width: 768px) {
    .app-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .chat-area {
        display: none;
    }
}