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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a1014;
    height: 100vh;
    overflow: hidden;
}

.whatsapp-container {
    max-width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #0b141a;
}

/* Header estilo WhatsApp */
.whatsapp-header {
    background-color: #202c33;
    padding: 10px 16px;
    border-bottom: 1px solid #2a3942;
}

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

.back-button {
    color: #aebac1;
    font-size: 24px;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.back-button:hover {
    color: #ffffff;
}

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

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.contact-details {
    flex: 1;
}

.contact-name {
    color: #e9edef;
    font-size: 16px;
    font-weight: 400;
    margin: 0;
}

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

/* Área de mensagens */
.messages-area {
    flex: 1;
    overflow-y: auto;
    background-image: 
        linear-gradient(rgba(11, 20, 26, 0.9), rgba(11, 20, 26, 0.9)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%23202c33" width="100" height="100"/><circle fill="%23182229" cx="50" cy="50" r="2"/></svg>');
    background-size: 100% 100%, 50px 50px;
    padding: 20px;
}

.messages-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Mensagens */
.message {
    display: flex;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.received {
    justify-content: flex-start;
}

.message-content {
    background-color: #202c33;
    border-radius: 8px;
    padding: 6px 8px;
    max-width: 400px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Mensagem de áudio */
.audio-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
}

.play-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #00a884;
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.play-button:hover {
    background-color: #06cf9c;
    transform: scale(1.05);
}

.play-button:active {
    transform: scale(0.95);
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.audio-waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
    flex: 1;
}

.bar {
    width: 3px;
    background-color: #8696a0;
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
}

.bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.bar:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.bar:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.bar:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.bar:nth-child(5) { height: 12px; animation-delay: 0.4s; }
.bar:nth-child(6) { height: 14px; animation-delay: 0.5s; }
.bar:nth-child(7) { height: 10px; animation-delay: 0.6s; }
.bar:nth-child(8) { height: 12px; animation-delay: 0.7s; }
.bar:nth-child(9) { height: 16px; animation-delay: 0.8s; }
.bar:nth-child(10) { height: 8px; animation-delay: 0.9s; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

.audio-duration {
    color: #8696a0;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    min-width: 35px;
}

.message-meta {
    display: flex;
    justify-content: flex-end;
    padding: 2px 4px 0;
    gap: 4px;
}

.message-time {
    color: #8696a0;
    font-size: 11px;
}

/* Mensagem quando não há áudios */
.no-messages {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    color: #8696a0;
}

.no-messages i {
    font-size: 80px;
    margin-bottom: 20px;
    color: #667eea;
}

.no-messages p {
    font-size: 18px;
    margin-bottom: 10px;
    color: #e9edef;
}

.no-messages .hint {
    font-size: 14px;
    color: #8696a0;
}

/* Botao flutuante do WhatsApp */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* Scrollbar customizada */
.messages-area::-webkit-scrollbar {
    width: 6px;
}

.messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
    background: #374045;
    border-radius: 3px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
    background: #485a64;
}

/* Responsivo */
@media (max-width: 768px) {
    .whatsapp-header {
        padding: 8px 12px;
    }

    .contact-name {
        font-size: 15px;
    }

    .contact-status {
        font-size: 12px;
    }

    .messages-area {
        padding: 12px;
    }

    .message-content {
        max-width: 85%;
    }

    .no-messages i {
        font-size: 60px;
    }

    .no-messages p {
        font-size: 16px;
    }
}
