* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 400px;
    height: 100vh;
    max-height: 800px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #dbdbdb;
    overflow: hidden;
}

/* Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #efefef;
    background-color: #fff;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left > i {
    font-size: 20px;
    color: #262626;
    cursor: pointer;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h2 {
    font-size: 15px;
    font-weight: 600;
    color: #262626;
}

.user-info p {
    font-size: 12px;
    color: #8e8e8e;
}

.header-right {
    display: flex;
    gap: 20px;
}

.header-right i {
    font-size: 20px;
    color: #262626;
    cursor: pointer;
}

/* Chat Box */
.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background-color: #fff;
}

.chat-box::-webkit-scrollbar {
    display: none;
}
.chat-box {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Profile Preview */
.profile-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 10px;
}

.preview-pic {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}

.profile-preview h3 {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 4px;
}

.profile-preview p {
    font-size: 14px;
    color: #8e8e8e;
    margin-bottom: 16px;
}

.view-profile-btn {
    background-color: #efefef;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #262626;
    cursor: pointer;
}

.date-stamp {
    text-align: center;
    font-size: 12px;
    color: #8e8e8e;
    margin: 16px 0;
}

.message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 75%;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.hidden-avatar {
    visibility: hidden;
}

.message-content {
    padding: 12px 16px;
    border-radius: 22px;
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
}

.received {
    align-self: flex-start;
}

.received .message-content {
    background-color: #efefef;
    color: #262626;
    border-bottom-left-radius: 4px;
}

.sent {
    align-self: flex-end;
}

.sent .message-content {
    background: linear-gradient(135deg, #7c3aed, #0095f6);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Input Area */
.chat-input-area {
    display: flex;
    align-items: center;
    padding: 8px 16px 16px 16px;
    gap: 12px;
    background-color: #fff;
}

.camera-icon {
    width: 40px;
    height: 40px;
    background-color: #0095f6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #efefef;
    border-radius: 24px;
    padding: 10px 16px;
    gap: 12px;
}

.input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: #262626;
}

.input-wrapper input::placeholder {
    color: #8e8e8e;
}

.pill-icons {
    display: flex;
    gap: 16px;
    color: #262626;
    font-size: 20px;
}

.pill-icons i {
    cursor: pointer;
}

@media (max-width: 400px) {
    .chat-container {
        max-width: 100%;
        max-height: 100vh;
        border: none;
        box-shadow: none;
    }
}
