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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #0b141a;
    color: #e9edef;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.mobile-container {
    width: 375px;
    height: 667px;
    background: #0b141a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header Styles */
.chat-header {
    background: #202c33;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    border-bottom: 1px solid #2a3942;
}

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

.back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    background: #00a884;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-size: 16px;
    font-weight: 500;
}

.contact-status {
    font-size: 13px;
    color: #8696a0;
}

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

.icon-btn {
    background: none;
    border: none;
    color: #8696a0;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

/* Messages Container */
.messages-container {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
    background: #0b141a;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23111b21' fill-opacity='0.06' fill-rule='evenodd'/%3E%3C/svg%3E");
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Message Styles */
.message {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 7.5px;
    position: relative;
    word-wrap: break-word;
    margin-bottom: 4px;
}

.message.sent {
    background: #005c4b;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.message.received {
    background: #202c33;
    align-self: flex-start;
    border-top-left-radius: 0;
}

.message-content {
    font-size: 14.2px;
    line-height: 19px;
    color: #e9edef;
}

.message-time {
    font-size: 11px;
    color: #8696a0;
    text-align: right;
    margin-top: 2px;
    float: right;
    margin-left: 8px;
}

.message-date {
    text-align: center;
    color: #8696a0;
    font-size: 12.5px;
    margin: 15px 0;
    padding: 6px 12px;
    background: #182229;
    border-radius: 7.5px;
    align-self: center;
}

/* Input Container */
.input-container {
    background: #202c33;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #2a3942;
}

.input-wrapper {
    flex: 1;
    background: #2a3942;
    border-radius: 20px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emoji-btn, .attach-btn, .camera-btn {
    background: none;
    border: none;
    color: #8696a0;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #e9edef;
    font-size: 15px;
    outline: none;
    padding: 8px 0;
}

.message-input::placeholder {
    color: #8696a0;
}

.mic-btn {
    background: #00a884;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Control Panel */
.control-panel {
    background: #202c33;
    padding: 20px;
    border-top: 1px solid #2a3942;
    max-height: 300px;
    overflow-y: auto;
}

.control-panel h3 {
    color: #e9edef;
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    color: #8696a0;
    font-size: 13px;
    margin-bottom: 5px;
}

.control-input, .control-textarea, .control-select {
    width: 100%;
    background: #2a3942;
    border: 1px solid #3d4b52;
    border-radius: 8px;
    padding: 10px 12px;
    color: #e9edef;
    font-size: 14px;
    outline: none;
}

.control-textarea {
    resize: vertical;
    min-height: 60px;
}

.control-input:focus, .control-textarea:focus, .control-select:focus {
    border-color: #00a884;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn.primary {
    background: #00a884;
    color: white;
}

.btn.primary:hover {
    background: #008f70;
}

.btn.secondary {
    background: #2a3942;
    color: #e9edef;
}

.btn.secondary:hover {
    background: #34424a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #374248;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #455a64;
}