* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* FUNDO ANIMADO */
.fundo-musical {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.nota-musical {
    position: absolute;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.08);
    animation: flutuarNota 15s linear infinite;
    animation-delay: calc(var(--i) * -3s);
}

.botao-perfil {
    font-size: 23px;
    color: white;
    padding: 5px 10px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.botao-perfil:hover {
    background: #7b1fa2;
}

@keyframes flutuarNota {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }

    10%,
    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-10vh) scale(1.2);
        opacity: 0;
    }
}

.contatos {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
}

.contatos h2 {
    font-size: 40px;
    margin-bottom: 20px;
    color: #ffffff;
    margin-top: 70px;
}

.contatos p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #c3b9ff;
}

.contatos form {
    display: flex;
    flex-direction: column;
    max-width: 350px;
    width: 100%;
    margin-bottom: 30px;
}

.contatos input,
.contatos textarea {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #c3b9ff;
}

.contatos textarea {
    resize: none;
    min-height: 100px;
}

.contatos button {
    background: #9c27b0;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contatos button:hover {
    background: #7b1fa2;
    transform: translateY(-2px);
}

/* CONTAINER DE MENSAGENS */
.mensagens-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Estilos para foto de perfil e layout de mensagem */
.mensagem-cabecalho {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.foto-perfil {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid #9c27b0;
    flex-shrink: 0;
}

.mensagem-info {
    flex: 1;
}

.mensagem-info h3 {
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* Caixa da mensagem */
.mensagem {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    animation: fadeIn 0.5s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.mensagem .email {
    font-size: 12px;
    color: #c3b9ff;
    margin: 0;
    text-align: left;
}

.mensagem .texto {
    color: #ffffff;
    line-height: 1.5;
    padding: 10px;
    border-radius: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 15px;
    text-align: left;
}

.mensagem .data {
    font-size: 12px;
    color: #888;
    text-align: right;
}

/* Esconde o input de arquivo original */
#imagem {
    display: none;
}

#imagem+label {
    display: inline-block;
    padding: 8px 20px;
    background-color: #9c27b0;
    color: white;
    margin-bottom: 20px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

#imagem+label:hover {
    background-color: #7b1fa2;
}

#image-preview button:hover {
    background-color: #cc0000;
}


/* Botão excluir */
.excluir-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    display: flex;

}

.excluir-btn:hover {
    background: #ff3742;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para o cabeçalho do usuário */
.user-header {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.user-header span {
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.user-icon {
    background: #9c27b0;
    border-radius: 50%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.botao-login,
.botao-logout {
    background: #9c27b0;
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.botao-logout {
    background: #ff4757;
}

.botao-login:hover {
    background: #7b1fa2;
}

.botao-logout:hover {
    background: #ff3742;
}

.mensagem-login {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 20px 0;
}

.mensagem-login p {
    margin-bottom: 15px;
    font-size: 18px;
    color: #c3b9ff;
}

#form-mensagem {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    width: 100%;
    margin: 0 auto 30px auto;
}

#form-mensagem textarea {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #c3b9ff;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.botao-admin {
    background: #ff9800;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.botao-admin:hover {
    background: #e68900;
    transform: rotate(20deg);
}

.tag-admin {
    background-color: red;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;

    padding: 2px 5px;
    border-radius: 3px;
}


/* RESPONSIVIDADE */
@media (max-width: 1024px) {
    .mensagens-container {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .contatos form {
        max-width: 90%;
    }

    .mensagens-container {
        max-width: 90%;
    }

    .mensagem {
        padding: 12px;
    }

    .mensagem .texto {
        font-size: 14px;
    }

    .mensagem-cabecalho h3 {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .mensagens-container {
        padding: 10px;
    }

    .mensagem {
        padding: 10px;
        border-radius: 10px;
    }

    .foto-perfil {
        width: 35px;
        height: 35px;
    }

    .mensagem .texto {
        font-size: 13px;
    }

    .mensagem .data {
        font-size: 11px;
    }
}