:root {
    --purple: #7360f2;
    --bg: #ffffff;
    --gray: #f0f0f5;
}

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

body { background: #eee; display: flex; justify-content: center; }

.viber-test {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--purple);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
}

.chat-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
    font-size: 14px;
}

.sent { align-self: flex-end; background: #e2dffc; }
.received { align-self: flex-start; background: var(--gray); }

.input-area {
    padding: 10px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 5px;
}

input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
}

button {
    background: var(--purple);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 20px;
    cursor: pointer;
}

/* Menu Styles */
.menu-btn {
    position: absolute;
    right: 10px;
    top: 8px;
    background: white;
    color: var(--purple);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.menu-btn:hover {
    background: #f0f0f5;
}

.overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 100;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
}

.overlay.active {
    right: 0;
}

.overlay-header {
    background: var(--purple);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: 1px solid white;
    padding: 5px 10px;
}

.contact-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.contact-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    background: #ddd;
    border-radius: 50%;
}
