:root {
    --tg-blue: #0088cc;
    --tg-bg: #e7ebf0;
    --tg-sent: #effdde;
    --tg-received: #ffffff;
    --text-dark: #222222;
}

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

body { background: var(--tg-bg); display: flex; justify-content: center; height: 100vh; }

.tg-container {
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header */
.header {
    background: var(--tg-blue);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-info h2 { font-size: 16px; font-weight: 600; }
.header-info p { font-size: 12px; opacity: 0.8; }

/* Chat Area */
.chat-area {
    flex: 1;
    background: #cad3d8;
    background-image: url('https://www.transparenttextures.com/patterns/pinstriped-suit.png');
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.msg.received {
    align-self: flex-start;
    background: var(--tg-received);
    border-bottom-left-radius: 4px;
}

.msg.sent {
    align-self: flex-end;
    background: var(--tg-sent);
    border-bottom-right-radius: 4px;
}

.msg-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

/* Input */
.input-area {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
}

input {
    flex: 1;
    border: none;
    padding: 10px;
    outline: none;
    font-size: 15px;
}

.send-btn {
    color: var(--tg-blue);
    font-size: 24px;
    cursor: pointer;
}

/* Sidebar Menu */
.menu-btn { cursor: pointer; font-size: 18px; }

.overlay {
    position: fixed;
    top: 0; left: -100%;
    width: 80%; max-width: 300px; height: 100%;
    background: white;
    z-index: 100;
    transition: 0.3s;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
}

.overlay.active { left: 0; }

.overlay-header {
    background: var(--tg-blue);
    color: white;
    padding: 30px 20px;
}

.contact-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}
.contact-item:hover { background: #f9f9f9; }
